Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed bug that prevented ActiveRecord.model_name to work with Rails 2…

….3.x

Signed-off-by: Ben Johnson <bjohnson@binarylogic.com>
  • Loading branch information...
commit 73c4cccb38189f0e52e1e362992dfb9db7d1206f 1 parent faa063f
@dcrec1 dcrec1 authored binarylogic committed
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/authlogic/session/active_record_trickery.rb
View
3  lib/authlogic/session/active_record_trickery.rb
@@ -40,7 +40,8 @@ def self_and_descendants_from_active_record
# For rails >3.0
def model_name
- ActiveModel::Name.new(self.to_s)
+ clazz = defined?(ActiveModel) ? ActiveModel::Name : ActiveSupport::ModelName
+ clazz.new(self.to_s)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.