Skip to content

Commit

Permalink
fixed devise deprecation warning for config.email_regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemuel Barango committed Apr 21, 2016
1 parent 6b00283 commit 0b43493
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
# config.email_regexp = /\A[^@]+@[^@]+\z/
config.email_regexp = /\A[^@\s]+@([^@\s]+\.)+[^@\W]+\z/

# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
Expand Down

1 comment on commit 0b43493

@pedrocalgaro
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning still remains, looks like the correct config should be:

config.email_regexp = /\A[^@\s]+@[^@\s]+\z/

As they say on the warning.

Please sign in to comment.