diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-08 17:25:06 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-08 17:25:06 +0000 |
commit | 04d032ed436ed76a83a45978c9840e8ad8aea669 (patch) | |
tree | 51cdee8a12894e95aa10bab1ba4e4e14095aba4a /activerecord/lib/active_record/mixins | |
parent | 14b4040a306306b984cc00f7cedfa71d6f604989 (diff) | |
download | rails-04d032ed436ed76a83a45978c9840e8ad8aea669.tar.gz rails-04d032ed436ed76a83a45978c9840e8ad8aea669.tar.bz2 rails-04d032ed436ed76a83a45978c9840e8ad8aea669.zip |
scope_condition defaults to 1 on list mixin
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@89 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/mixins')
-rw-r--r-- | activerecord/lib/active_record/mixins/list.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/mixins/list.rb b/activerecord/lib/active_record/mixins/list.rb index b75d3d9ca1..d0efb02396 100644 --- a/activerecord/lib/active_record/mixins/list.rb +++ b/activerecord/lib/active_record/mixins/list.rb @@ -5,8 +5,8 @@ module ActiveRecord module Mixins # This mixin provides the capabilities for sorting and reordering a number of objects in list. # The class that has this mixin included needs to have a "position" column defined as an integer on - # the mapped database table. Further more, you need to implement the <tt>scope_condition</tt> that - # defines how to separate one list from another. + # the mapped database table. Further more, you need to implement the <tt>scope_condition</tt> if you want + # to separate one list from another. # # Todo list example: # @@ -98,7 +98,7 @@ module ActiveRecord private # Overwrite this method to define the scope of the list changes - def scope_condition; end + def scope_condition() "1" end def higher_item self.class.find_first( |