From 1cf7eb1ca84a65fead68104572bc2cbac1fe95a0 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 8 Dec 2004 16:02:18 +0000 Subject: Added ActiveRecord::Mixins::List that can decorates an existing class with methods like move_higher/lower, move_to_top/bottom git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@84 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/CHANGELOG | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'activerecord/CHANGELOG') diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index ca16757ae7..1d73dde70a 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,17 @@ *CVS* +* Added ActiveRecord::Mixins::List that can decorates an existing class with methods like move_higher/lower, move_to_top/bottom. Example: + + class TodoItem < ActiveRecord::Base + include ActiveRecord::Mixins::List + belongs_to :todo_list + + private + def scope_condition + "todo_list_id = #{todo_list_id}" + end + end + * Added the option for sanitizing find_by_sql and the offset parts in regular finds [Sam Stephenson]. Examples: Project.find_all ["category = ?", category_name], "created ASC", ["? OFFSET ?", 15, 20] -- cgit v1.2.3