search for: simple_form

Displaying 20 results from an estimated 21 matches for "simple_form".

2012 Jan 07
2
set a default value with simple_form
hello anyone know how i can set a default integer value with simple_form, i have code like this below in my view but its not working. <%= f.input :age, :value => ''30'' %> i would like the input box to have the value of 30 by default thanks for any help. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are...
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 di...
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 Rai...
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...
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,
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-/JYPxA3...
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 ap...
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...
2006 Feb 24
5
need help with form layout
Is there some way to format the layout of the fields within a form? I''ve got about 10 fields that I''d like to lay out in a couple of columns. Tried putting them in a table and that didn''t work too good. Any pointers will be very much appreciated. Thanks, Bill -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 May 03
0
Simple_Form and Simple_Fields_For and working in Form_Tag, Fields_For
...want: <%= form_tag(update_individual_photos_path, :method => "put") do %> <%= fields_for "photos[]", @photo do |f| %> ................. <% end -%> <%= submit_tag("Post") %> <% end %> But i would like to move to doing this with simple_form_for and simple_fields_for but i cant get it working. Looks like simple_fields_for cant work with "photos[]", @photo ? Is it possible to call Simple_Fields_For with the same syntax as Fields_For ? -- You received this message because you are subscribed to the Google Groups "Ruby on...
2013 Jan 26
4
Best practice to handle this
..., 0 represents "Easy", 1 represents "Normal" and 2 represents "Hard". What I did was first to define it as a hash like this: DIFFICULTIES = { "Easy" => 0, "Normal" => 1, "Hard" => 2 } Then I can easily pass this to, for instance, simple_form and it will generate a nice dropdown with the correct values. But let''s say that I have the value and want to display the text. Then I''d have to iterate over the hash to find which key corresponds to the right value. Right? Not that big of an issue when there are three values...
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...
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
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
2012 Feb 01
0
Rails 3.1 form & routes.rb [newbie]
Hi all, maybe is a newbie question anyway 1. I create de rails app with # rails new {my app} 2. after I add some gem to my Gemfile source ''http://rubygems.org'' gem ''rails'', ''3.1.1'' gem ''sqlite3'' gem ''simple_form'' gem ''execjs'' gem ''therubyracer'' # Gems used only for assets and not required # in production environments by default. group :assets do gem ''sass-rails'', ''~> 3.1.4'' gem ''coffee-rails'', ...
2012 Sep 08
0
Client side form validations
Can anyone point me in the direction of what is the best way to implement client side validations in rails? It seems like it is/used to be client_side_validations, but I can''t get it to work with formtastic or simple_form. Is there a gem out there that will do client side form validations out of the box, or do I need to write my own javascript? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to...
2014 Apr 19
0
How to has_one/belongs_to association only return the objects unassociated in combobox?
I have two models (Car and Driver) and a combobox to select which driver belongs to which car. I want the combobox just show the objects that have not yet been associated. # vehicle belongs_to: driver # driver has_one: vehicle # simple_form # vehicle/_form.html.haml = f.association: driver, label_method: :name, value_method: :id How to ensure validation before saving, to avoid problems of concurrent accesses? Thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group....
2012 Dec 04
0
Empty test suite is run after every rake task
...b.com/rails/prototype_legacy_helper.git'' gem "open_flash_chart", ''0.0.0'', :path => ''vendor/cache/git/open_flash_chart'' # :git => ''git://github.com/pullmonkey/open_flash_chart.git'' gem "dynamic_form" gem "simple_form" gem "starling" gem ''selenium-client'', ''1.2.18'' gem ''selenium-webdriver'', ''2.25.0'' gem ''iso8583'', ''0.1.3'' # ---------------------- # plugin gems # ---------------------- gem...