mjbellantoni / formtastic-bootstrap

Formtastic form builder to generate Twitter Bootstrap-friendly markup.
MIT License
444 stars 217 forks source link

FormtasticBootstrap namespace for inputs breaks helper #106

Closed vimutter closed 9 years ago

vimutter commented 10 years ago

In lib/formtastic-bootstrap/helpers/input_helper.rb you overwrite one method for default input constant name, but in parent method there is parent constant used with const_defined?. That constant should also be replaced.

sodabrew commented 10 years ago

Ok, replacing/overriding this: https://github.com/justinfrench/formtastic/blob/master/lib/formtastic/helpers/input_helper.rb#L303-339

vimutter commented 10 years ago

@sodabrew Not both of them, only last one.

vimutter commented 10 years ago

@sodabrew Please find code&tests attached

sodabrew commented 10 years ago

Do we also want to fall back on the Formtastic versions if there isn't a FormtasticBootstrap version of an input?

vimutter commented 10 years ago

@sodabrew Well, it is not connected with that particular issue, but that would be handy too. In the case somebody upgrading.

ignat-z commented 10 years ago

updated with using both namespaces

ignat-z commented 10 years ago

I can rest this implementation and only 6 tests will be still broken or use more cleaner version without overriding standard_input_class_name and broke 54 tests, in such case, probably later will nice to change standard_action_class_name in FormtasticBootstrap::Helpers::ActionHelper for same reasons