##// END OF EJS Templates
acts_as_versioned use old style (Rails 2.x) of method call for #all (#24348)....
Jean-Philippe Lang -
r15568:2b70d977052a
parent child
Show More
@@ -469,9 +469,10 module ActiveRecord #:nodoc:
469 469
470 470 # Finds versions of a specific model. Takes an options hash like <tt>find</tt>
471 471 def find_versions(id, options = {})
472 versioned_class.all({
473 :conditions => ["#{versioned_foreign_key} = ?", id],
474 :order => 'version' }.merge(options))
472 versioned_class.
473 where(options[:conditions] || {versioned_foreign_key => id}).
474 limit(options[:limit]).
475 order('version')
475 476 end
476 477
477 478 # Returns an array of columns that are versioned. See non_versioned_columns
General Comments 0
You need to be logged in to leave comments. Login now