diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb index fcc091997..5fbb91abf 100644 --- a/config/initializers/10-patches.rb +++ b/config/initializers/10-patches.rb @@ -12,6 +12,6 @@ ActiveRecord::Errors.default_error_messages = { :wrong_length => "activerecord_error_wrong_length", :taken => "activerecord_error_taken", :not_a_number => "activerecord_error_not_a_number" -} +} if ActiveRecord::Errors.respond_to?('default_error_messages=') ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }