Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adds ActiveModel::Conversion and persisted? to Session mix-in to conf…

…orm to ActiveModel API
  • Loading branch information...
commit 7ffbce8535e0765ac95a37252e24c5bf0b39b31e 1 parent 7a6f362
Ryan Foster and Patrick Reagan authored reagent committed

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. +5 0 lib/simplest_auth/session.rb
5 lib/simplest_auth/session.rb
@@ -4,6 +4,7 @@ module Session
4 4
5 5 included do
6 6 include ActiveModel::Validations
  7 + include ActiveModel::Conversion
7 8
8 9 attr_accessor :email, :password
9 10
@@ -40,6 +41,10 @@ def user
40 41 @user ||= user_class.authenticate(email, password)
41 42 end
42 43
  44 + def persisted?
  45 + false
  46 + end
  47 +
43 48 private
44 49
45 50 def user_exists_for_credentials

0 comments on commit 7ffbce8

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