Skip to content

Commit

Permalink
Ensure attempted record exists
Browse files Browse the repository at this point in the history
Fixes a NoMethodError.
  • Loading branch information
blt04 committed Jun 4, 2012
1 parent c204de2 commit 8508415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/authlogic_crowd/session.rb
Expand Up @@ -140,7 +140,7 @@ def validate_by_crowd
errors.add_to_base(I18n.t('error_messages.crowd_missing_using_token', :default => "missing user token"))
end

unless self.attempted_record.valid?
unless self.attempted_record && self.attempted_record.valid?
errors.add_to_base('record is not valid')
end

Expand Down

0 comments on commit 8508415

Please sign in to comment.