Reputation: 2919
I have this template:
- f.inputs do
= user.input :is_vip?, :as => :boolean, :label=>'VIP'
= f.input :test, :as => :boolean, :required => false, :label => "This is TEST company"
= f.input :multi_destination, :as => :boolean, :required => false, :label => "Multi destination"
It's fully working thing. But the code that the browser receive is different in my localhost and in stage server. I don't know where to dig. CSSes are exactly the same, sources are same, everything is the same.
Upvotes: 0
Views: 155
Reputation: 52651
Formtastic, by default, uses a method named label_with_nested_checkbox
for rendering boolean input fields. That method renders the checkbox inside the label - like you are getting in localhost.
Formtastic doesn't have any "default way" to "take the input field out of the label" (his author confirmed this to me on this question) It must have been patched somehow to do that. Here're some possible places to look:
apps/inputs
directory, if there is any. That's the "standard" place where someone can modify Formtastic pluginsconfig/initializers
directory. To see if there is any Formtastic monkeypatching there.vendors
directory.Upvotes: 2