Skip to content

Commit

Permalink
Rails model errors are now again correctly styled using Bootstrap CSS…
Browse files Browse the repository at this point in the history
… classes
  • Loading branch information
remomueller committed Aug 12, 2016
1 parent b566bce commit 1e1ccaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### Bug Fix
- Mobile devices no longer need to click twice to vote
- Rails model errors are now again correctly styled using Bootstrap CSS classes

## 14.0.0 (August 9, 2016)

Expand Down
5 changes: 5 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ class Application < Rails::Application
# Run "rails time:zones" for a list of tasks for finding time zone names. Default is UTC.
config.time_zone = 'Eastern Time (US & Canada)'

# Overwrite Rails errors to use Bootstrap CSS classes
config.action_view.field_error_proc = Proc.new do |html_tag, instance|
"<span class=\"has-error\">#{html_tag}</span>".html_safe
end

# Add Model subfolders to autoload_paths
# config.autoload_paths += Dir[Rails.root.join('app', 'models', '{**/}')]
config.autoload_paths << Rails.root.join('app', 'models', 'admin')
Expand Down

0 comments on commit 1e1ccaf

Please sign in to comment.