Created
August 25, 2010 16:31
-
-
Save knowuh/549811 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*[has-dev][~/lab/ruby/has/vendor/plugins]$ diff -r ./acts_as_list/lib ./acts_as_list.git/lib rvm:ruby-1.8.7-p249@has | |
diff -r ./acts_as_list/lib/active_record/acts/list.rb ./acts_as_list.git/lib/active_record/acts/list.rb | |
42,45c42,49 | |
< if #{configuration[:scope].to_s}.nil? | |
< "#{configuration[:scope].to_s} IS NULL" | |
< else | |
< "#{configuration[:scope].to_s} = \#{#{configuration[:scope].to_s}}" | |
--- | |
> self.class.send(:sanitize_sql_hash_for_conditions, { :#{configuration[:scope].to_s} => send(:#{configuration[:scope].to_s}) }) | |
> end | |
> ) | |
> elsif configuration[:scope].is_a?(Array) | |
> scope_condition_method = %( | |
> def scope_condition | |
> attrs = %w(#{configuration[:scope].join(" ")}).inject({}) do |memo,column| | |
> memo[column.intern] = send(column.intern); memo | |
46a51 | |
> self.class.send(:sanitize_sql_hash_for_conditions, attrs) | |
66c71 | |
< before_destroy :remove_from_list | |
--- | |
> before_destroy :decrement_positions_on_lower_items |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment