Skip to content

Commit

Permalink
Use .nil? instead of == nil
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbuker authored Oct 19, 2016
1 parent 78dff91 commit fbd9dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sorcery/model/submodules/magic_login.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def load_from_magic_login_token(token)
# when magic_login_mailer_disabled is false
def validate_mailer_defined
msg = "To use magic_login submodule, you must define a mailer (config.magic_login_mailer = YourMailerClass)."
raise ArgumentError, msg if @sorcery_config.magic_login_mailer == nil and @sorcery_config.magic_login_mailer_disabled == false
raise ArgumentError, msg if @sorcery_config.magic_login_mailer.nil? and @sorcery_config.magic_login_mailer_disabled == false
end

def define_magic_login_fields
Expand Down

0 comments on commit fbd9dd3

Please sign in to comment.