Skip to content

Commit

Permalink
* Add a model_name class method for Authlogic::Session for rails 3 co…
Browse files Browse the repository at this point in the history
…mpatibility. Will be using ActiveModel eventually, but this should be a quick fix.
  • Loading branch information
binarylogic committed Jul 13, 2009
1 parent dec9ee3 commit b0d65dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rdoc
@@ -1,6 +1,7 @@
== 2.1.2

* Return the newly create object for the class level create method, instead of a boolean
* Add a model_name class method for Authlogic::Session for rails 3 compatibility. Will be using ActiveModel eventually, but this should be a quick fix.

== 2.1.1 released 2009-7-04

Expand Down
7 changes: 6 additions & 1 deletion lib/authlogic/session/active_record_trickery.rb
Expand Up @@ -33,10 +33,15 @@ def self_and_descendents_from_active_record
[self]
end

# For Rails >2.3, fix mispelling
# For rails >2.3, fix mispelling
def self_and_descendants_from_active_record
[self]
end

# For rails >3.0
def self.model_name
ActiveModel::Name.new(self.to_s)
end
end

module InstanceMethods
Expand Down

0 comments on commit b0d65dc

Please sign in to comment.