Skip to content
Browse files

Merge pull request #314 from jovoto-team/master

Fix I18n bug for email field and login field
  • Loading branch information...
2 parents 256e8cf + db01cf1 commit ef7bb3d502e9eabacdea2aebb7d78ad2d6b40893 @binarylogic committed Jun 1, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/authlogic/acts_as_authentic/email.rb
  2. +1 −1 lib/authlogic/acts_as_authentic/login.rb
View
4 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 => lambda {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
@@ -107,4 +107,4 @@ def self.included(klass)
end
end
end
-end
+end
View
2 lib/authlogic/acts_as_authentic/login.rb
@@ -62,7 +62,7 @@ def merge_validates_length_of_login_field_options(options = {})
# * <tt>Default:</tt> {:with => Authlogic::Regex.login, :message => lambda {I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")}}
# * <tt>Accepts:</tt> Hash of options accepted by validates_format_of
def validates_format_of_login_field_options(value = nil)
- rw_config(:validates_format_of_login_field_options, value, {:with => Authlogic::Regex.login, :message => I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")})
+ rw_config(:validates_format_of_login_field_options, value, {:with => Authlogic::Regex.login, :message => lambda {I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")}})
end
alias_method :validates_format_of_login_field_options=, :validates_format_of_login_field_options

0 comments on commit ef7bb3d

Please sign in to comment.
Something went wrong with that request. Please try again.