Permalink
Browse files

Merge pull request #397 from Hermanverschooten/fix_translation

Error message should be a proc
  • Loading branch information...
2 parents 9db2719 + b5c806e commit 0691e39e28b0b1e24ad0a12117f578f818977016 @binarylogic committed Mar 3, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/authlogic/acts_as_authentic/email.rb
@@ -65,7 +65,7 @@ def merge_validates_length_of_email_field_options(options = {})
# * <tt>Default:</tt> {:with => Authlogic::Regex.email, :message => lambda {I18n.t('error_messages.email_invalid', :default => "should look like an email address.")}}
# * <tt>Accepts:</tt> Hash of options accepted by validates_format_of
def validates_format_of_email_field_options(value = nil)
- rw_config(:validates_format_of_email_field_options, value, {:with => Authlogic::Regex.email, :message => I18n.t('error_messages.email_invalid', :default => "should look like an email address.")})
+ rw_config(:validates_format_of_email_field_options, value, {:with => Authlogic::Regex.email, :message => Proc.new{I18n.t('error_messages.email_invalid', :default => "should look like an email address.")}})
end
alias_method :validates_format_of_email_field_options=, :validates_format_of_email_field_options

0 comments on commit 0691e39

Please sign in to comment.