Rails 3.1. The generated user identifier or class

I want the chain to select the part inside my Formtastic form. But is it possible to set custom identifiers for multiple samples for future AJAX replacement?

This does not work:

<%= semantic_form_for [:admin, @production_year] do |f| %> <%= f.inputs do %> <%= f.input :car_model, :label => "CarModel", :as => :select, :collection => Brand.find(:all, :order => "name ASC"), :id => "brand_id" %> <% end %> <% end %> 
+6
source share
1 answer

Parameters must be passed to the hash file input_html, for example:

 <%= f.input :car_model, :input_html => { :id => "brand_id" } %> 
+15
source

Source: https://habr.com/ru/post/899370/


All Articles