@@ -469,9 +469,10 module ActiveRecord #:nodoc: | |||||
469 |
|
469 | |||
470 | # Finds versions of a specific model. Takes an options hash like <tt>find</tt> |
|
470 | # Finds versions of a specific model. Takes an options hash like <tt>find</tt> | |
471 | def find_versions(id, options = {}) |
|
471 | def find_versions(id, options = {}) | |
472 |
versioned_class. |
|
472 | versioned_class. | |
473 |
:conditions => |
|
473 | where(options[:conditions] || {versioned_foreign_key => id}). | |
474 | :order => 'version' }.merge(options)) |
|
474 | limit(options[:limit]). | |
|
475 | order('version') | |||
475 | end |
|
476 | end | |
476 |
|
477 | |||
477 | # Returns an array of columns that are versioned. See non_versioned_columns |
|
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