similar to: set a default value with simple_form

Displaying 20 results from an estimated 10000 matches similar to: "set a default value with simple_form"

2012 Jul 03
4
Rails compatibility with Ubuntu
Hi All, I want to know the compatibility of Ubuntu with Rails. Anyone know which Ubuntu version support Rails 2.x and Rails 3.x. -- Mandeep Kaur http://mandeepsimak.wordpress.com/ -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2012 Jan 19
4
redirect_to with a hash instead of parameters
All, I have numerous places in my codebase like this: redirect_to :action => ''schedule_by_uid_and_run_date'', :uid => @schedule.first.train_uid, :year => @date.year, :month => @date.month, :day => @date.day I''d like to replace the :year, :month and :day parameters with a hash containing the three parameters. @date is an instance of a Date class,
2012 Jan 06
1
How to pass a field from simple_form as a hidden div value
Hi folks Im trying to pass a value to my hidden div using simple_form but im not sure how to do this, was wondering if anyone could help me with this. Here is my view using simple_form <%= f.label "First name" %> <%= f.text_field :first_name %> <%= f.label "Last name" %> <%= f.text_field :last_name %> <%= f.input :full_name, :as =>
2011 May 24
2
simple_form disable html5
Hello, How do I disable html5 with simple_form gem? I tried to type: SimpleForm.html5 = false in environment.rb But this throws error. undefined method `html5='' for SimpleForm:Module (NoMethodError) Even though I see... module SimpleForm ... mattr_accessor :html5 @@html5 = true ... end Any explanation on this? How I can disable it in any other ways? Thanks. -- Posted via
2012 Apr 23
1
Simple_form bootstrap style inline-form not working properly
Anyone familiar with bootstrap and simple_form. Please help! http://stackoverflow.com/questions/10279164/simple-form-bootstrap-style-inline-form-not-working-properly -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To
2012 Jun 01
0
How to set the default value on a simple_form association
Folks Im using simple_form and im able to see a selection of users from my drop down list but im trying to set the default value. Here is what ive tried <%= f.association :people, :input_html => { :value => ''someval'' } %> i want someval to be set in the selection by default. Any help would be appreciated. -- Posted via http://www.ruby-forum.com/. -- You received
2014 Mar 14
0
AngularJS options with a simple_form checkbox
Hi guys, How does one assign ng-model to a checkbox in simple_form? I have tried adding it like this: =f.input :super_admin , label: false, checked_value: true, unchecked_value: false, as: :boolean,:input_html=>{"ng-model"=>"superadmincbx"} but my ng-hide does not work. %span{"ng-hide"=>"superadmincbx"} I'm also using the Batarang
2012 Apr 07
1
AJAX form (using simple_form) with preserved error validation
I know it''s unlikely that anyone will check this link, but here''s hoping http://stackoverflow.com/questions/10051050/ajax-form-using-simple-form-with-preserved-error-validation Sorry, too hard to explain without showing the pics. Abram -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group,
2010 Dec 20
1
Check whether link present nor not using cucumber
Hi, I am using cucumber with webrat for testing my application. I have admin role in my application. When admin logs into the system he able to see the "Users" link which gives an interface to manage users for admin. I have written the feature like as follows:- Feature: List All Users So that Admin can manage users Scenario: Login as Admin When I login with user "username"
2013 Jan 26
4
Best practice to handle this
Hi! I have a model which has a field that can have three values only. I store the value in the database as an integer, 0, 1 or 2, but when I display it I want a more appropriate text. And, I want it to be translatable using i18n. Let''s say that it corresponds to how difficult something is. So, 0 represents "Easy", 1 represents "Normal" and 2 represents
2013 Mar 02
3
Help Radio button
Hi i''m fairly new to ruby on rails and i''m creating a form using simple_form and in one bit i have radio buttons and say i have 3 buttons a,b,c so i want it to be if a is pressed then certain text fields show, and if b is pressed a different set of text fields show and similarly for c. Can anyone help me on this? -- You received this message because you are subscribed to
2012 Feb 07
10
Ruby Developer position
Please let me know your interest in following. Location: Columbia, SC Duration: 12 months+ Rate: $65/hr 1099/c2c Required Skills: RUBY, RAILS, GIT, MYSQL, CUCUMBER, RSPEC, JQUERY, EXCELLENT ORAL AND WRITTEN COMMUNICATION SKILLS, TEST-DRIVEN DEVELOPMENT, LINUX, OS X, JSON, COMMAND LINE, SQL, SSH, HAML, SCSS Thanks Sandeep Sandeep Jain Software People Inc. www.softwarepeople.us
2010 Jun 16
0
:wrapper_tag, :wrapper_class options (and more) with simple_form and Rails 2.3 ?
Hi, I''m making my first Rails project and I''m using the simple_form gem (version 1.0) with a Rails app (version 2.3.5). simple_form repository v=1.0 Is there any way to implement the nice options :wrapper_tag, :wrapper_class, :wrapper_error_class ? Or maybe I''m missing something? :-D Thank you for your advices Fro_oo ps : I can''t change my Rails gem and
2011 Mar 10
4
Multi-model forms
Hi guys, I''m new to ruby and rails and I''m working on multi model forms, specifically 3. I''m using this http://guides.rubyonrails.org/getting_started.html as a start, and its got a 2 Model example but I cant seem to get the last one working. These are my models: Country name:string code:string (has_one :address) Address address_line1:string
2011 Jun 27
2
insert value of primary key into another field before record is saved
Hey all, I created a seed task: def books! books = Book.where(:type_id => Type.find_by_name(''Fiction'')).order(''id'') books.each do |book| @books = 4.times.map do |i| subbook! "#{book.book_num}-#{i}".to_s, :book_state => BookState[:available].id, :book => book end end puts "log it:
2012 Mar 04
3
Which command run after change Models
Hi: I''m reading and learning from the Rails tutorial at [1] but not building the sample application instead I''m trying to build my own. After generate all the migration and build the main classes for Models I made some modifications to them in order to build relationship between tables now I think that I need to run some command to generate the scaffold again with proper
2010 Sep 09
17
formtastic issue
Hello, I will try to explain it step by step :-) I just created a new rails 3 app, then I created a new controller... rails generate controller admin::users I didn''t forget to add the resources in the routes.rb file like this. namespace :admin do resources :users end Now I try to use formtastic to create the form but I get erorr that my users_path doesn''t exist?
2013 Feb 17
5
Where do Gems Live (e.g. CKEditor)
I''m a Rails newbie and I have added the CKEditor Gem which is working okay. To configure the gem though, you have to edit the config file, which is also working when I do that. However, when I push to github and pull to my other computer, the config file is not changed. This lead me to the following broader question: when you use a gem, where does the code go and how can you make sure it
2010 Jan 04
3
Generate PDF
Hi ! I need to create some pdf from my application. I have a table people with a field address and I need to generate a pdf of label of each address ( I think 10 labels per page). The pdf can have around 500 pages. Which library should I use to do it ? I read some information about different library to generate pdf but I don''t know if all library are a good choice for generate
2010 Jun 21
14
Controllers, what? why?
Hi, I am starting to learn rails and I went through the guide and a couple of tutorials. Even though I understand controllers or at least I can use them I can''t see yet the whole picture. Why do you need several controllers for a single application? If a controller is just a class whose methods interface with models and views, why not have a single controller for the whole application?