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.
Formtastic, by default, uses a method named
label_with_nested_checkboxfor 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/inputsdirectory, if there is any. That’s the “standard” place where someone can modify Formtastic pluginsconfig/initializersdirectory. To see if there is any Formtastic monkeypatching there.vendorsdirectory.