diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-16 13:52:57 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-16 14:28:19 -0800 |
commit | 5f608fc7c4fa3ac793f1eb1b1f418033dfb13049 (patch) | |
tree | c07f01d96a12c4064887f9a05607d449e11a6c38 /activerecord | |
parent | c801f233df9d20c59d9756a5279365603dc5cbbd (diff) | |
download | rails-5f608fc7c4fa3ac793f1eb1b1f418033dfb13049.tar.gz rails-5f608fc7c4fa3ac793f1eb1b1f418033dfb13049.tar.bz2 rails-5f608fc7c4fa3ac793f1eb1b1f418033dfb13049.zip |
removing space errors
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 6 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 600f59026e..34247deb02 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -182,7 +182,7 @@ module ActiveRecord unless options.blank? raise ArgumentError, "If finder_sql/counter_sql is used then options cannot be passed" end - + @reflection.klass.count_by_sql(custom_counter_sql) else @@ -435,10 +435,10 @@ module ActiveRecord # replace the SELECT clause with COUNT(*), preserving any hints within /* ... */ counter_sql = @reflection.options[:finder_sql].sub(/SELECT\b(\/\*.*?\*\/ )?(.*)\bFROM\b/im) { "SELECT #{$1}COUNT(*) FROM" } end - + interpolate_sql(counter_sql) end - + def custom_finder_sql interpolate_sql(@reflection.options[:finder_sql]) end diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 09bba213ce..7cd04a1ad5 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -211,12 +211,12 @@ module ActiveRecord :create => construct_create_scope } end - + # Implemented by subclasses def construct_find_scope raise NotImplementedError end - + # Implemented by (some) subclasses def construct_create_scope {} |