Commit 5f9e19f6 authored by jplang's avatar jplang

acts_as_versioned use old style (Rails 2.x) of method call for #all (#24348).

git-svn-id: https://svn.redmine.org/redmine/trunk@15950 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent ed8f66d2
......@@ -469,9 +469,10 @@ module ActiveRecord #:nodoc:
# Finds versions of a specific model. Takes an options hash like <tt>find</tt>
def find_versions(id, options = {})
versioned_class.all({
:conditions => ["#{versioned_foreign_key} = ?", id],
:order => 'version' }.merge(options))
versioned_class.
where(options[:conditions] || {versioned_foreign_key => id}).
limit(options[:limit]).
order('version')
end
# Returns an array of columns that are versioned. See non_versioned_columns
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment