@@ -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. |
|
|
473 |
:conditions => |
|
|
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