Permalink
Browse files

Fixed error with determining whether to use Rails 3 scopes

  • Loading branch information...
1 parent a3e052d commit 36eb9b9a087b99c4e64919c102ea8fe70314e6dc Stefan Kroes committed Oct 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/ancestry/has_ancestry.rb
@@ -39,7 +39,7 @@ def has_ancestry options = {}
# Save ActiveRecord version
self.cattr_accessor :rails_3
- self.rails_3 = defined?(ActiveRecord::VERSION) and ActiveRecord::VERSION::MAJOR >= 3
+ self.rails_3 = defined?(ActiveRecord::VERSION) && ActiveRecord::VERSION::MAJOR >= 3
# Workaround to support Rails 2
scope_method = if rails_3 then :scope else :named_scope end

0 comments on commit 36eb9b9

Please sign in to comment.