@@ -8,10 +8,9 env: | |||
|
8 | 8 | rvm: |
|
9 | 9 | - 2.0.0 |
|
10 | 10 | - 1.9.3 |
|
11 |
- rbx |
|
|
11 | - rbx | |
|
12 | 12 | - jruby-19mode |
|
13 | 13 | - 1.8.7 |
|
14 | - rbx-18mode | |
|
15 | 14 | - jruby-18mode |
|
16 | 15 | gemfile: |
|
17 | 16 | - gemfiles/Gemfile.rails-3.0.rb |
@@ -23,6 +23,12 gem 'railties', RAILS_VERSION | |||
|
23 | 23 | gem 'activerecord', RAILS_VERSION |
|
24 | 24 | gem 'actionpack', RAILS_VERSION |
|
25 | 25 | |
|
26 | platforms :rbx do | |
|
27 | gem 'rubysl', '~> 2.0' | |
|
28 | gem 'rubysl-test-unit' | |
|
29 | end | |
|
30 | ||
|
31 | ||
|
26 | 32 | # Add Oracle Adapters |
|
27 | 33 | # gem 'ruby-oci8' |
|
28 | 34 | # gem 'activerecord-oracle_enhanced-adapter' |
@@ -92,7 +92,8 module CollectiveIdea #:nodoc: | |||
|
92 | 92 | :foreign_key => parent_column_name, |
|
93 | 93 | :counter_cache => acts_as_nested_set_options[:counter_cache], |
|
94 | 94 | :inverse_of => (:children unless acts_as_nested_set_options[:polymorphic]), |
|
95 | :polymorphic => acts_as_nested_set_options[:polymorphic] | |
|
95 | :polymorphic => acts_as_nested_set_options[:polymorphic], | |
|
96 | :touch => acts_as_nested_set_options[:touch] | |
|
96 | 97 | end |
|
97 | 98 | |
|
98 | 99 | def acts_as_nested_set_default_options |
@@ -103,7 +104,8 module CollectiveIdea #:nodoc: | |||
|
103 | 104 | :depth_column => 'depth', |
|
104 | 105 | :dependent => :delete_all, # or :destroy |
|
105 | 106 | :polymorphic => false, |
|
106 | :counter_cache => false | |
|
107 | :counter_cache => false, | |
|
108 | :touch => false | |
|
107 | 109 | }.freeze |
|
108 | 110 | end |
|
109 | 111 |
@@ -23,7 +23,9 module CollectiveIdea | |||
|
23 | 23 | if acts_as_nested_set_options[:scope] |
|
24 | 24 | scope = proc {|node| |
|
25 | 25 | scope_column_names.inject("") {|str, column_name| |
|
26 |
|
|
|
26 | column_value = node.send(column_name) | |
|
27 | cond = column_value.nil? ? "IS NULL" : "= #{connection.quote(column_value)}" | |
|
28 | str << "AND #{connection.quote_column_name(column_name)} #{cond} " | |
|
27 | 29 | } |
|
28 | 30 | } |
|
29 | 31 | end |
General Comments 0
You need to be logged in to leave comments.
Login now