stefankroes/ancestry — pull request #126 by adammck (2013-04-09 19:05:26+00:00)
Title: Test against Rails 4.0.0.beta1, and fix deprecation warnings

This continues the work started by @NARKOZ in #125. It's pretty simple, with the exception of this part in the test suite (not the library itself):

```ruby
# Rails < 4 doesn't support lambda default_scopes (only hashes)
# But Rails >= 4 logs deprecation warnings for hash default_scopes
if ActiveRecord::VERSION::MAJOR >= 4
model.send :default_scope, lambda { model.where(default_scope_params) }
else
model.send :default_scope, { :conditions => default_scope_params }
end
```

Someone more familiar with `default_scope` than me might be able to come up with a better solution.