seyhunak / twitter-bootstrap-rails

Twitter Bootstrap for Rails 6.0, Rails 5 - Rails 4.x Asset Pipeline
https://github.com/seyhunak/twitter-bootstrap-rails
4.49k stars 997 forks source link

Validation error messages on themed forms are no longer removed #748

Closed Sprachprofi closed 10 years ago

Sprachprofi commented 10 years ago

In the default branch of this gem, applying bootstrap:themed to scaffold-generated forms will remove the validation error messages functionality (see issue #747). This is a dangerous default behavior because users may not know that this has been removed, nor what they should do in order to regain the functionality.

I restored the functionality and also applied Bootstrap-compliant styling to the validation error message (see screenshot) in order to improve the default behavior of this gem for those who don't install SimpleForms.

bootstrap-rails-with-validation-errors

toadkicker commented 10 years ago

Can you undo the changes in Readme? Also I don't understand why in _form.html.erb you moved L#2? Lastly if the template requires a change can you include it in all the supported formats?

Sprachprofi commented 10 years ago

Undone.

In _form.html.erb I did not move L#2, I inserted the error messages above the form elements. L2 is a loop over the form elements and obviously we don't want the error message to appear looped.

Note that my changes are for the active branch, Bootstrap 2.3.2, not the Bootstrap3. Afaik this branch does not support other formats; if I missed any files, let me know.

toadkicker commented 10 years ago

Awesome thanks. I will give this a test later today since Travis is complaining about rest-client in the gemfile and reporting errors.