diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2013-07-02 21:56:51 +0530 |
---|---|---|
committer | Neeraj Singh <neerajdotname@gmail.com> | 2013-07-02 22:08:42 +0530 |
commit | d80334488ff5c83e63cca3fb70250e9002a2f0c3 (patch) | |
tree | d9a1c43f290b9ba7c35c38fe2c6fc6b36b4c42d2 /activerecord/test/models | |
parent | f875d319ad32d63ce2d3e8a343b059858f28dd97 (diff) | |
download | rails-d80334488ff5c83e63cca3fb70250e9002a2f0c3.tar.gz rails-d80334488ff5c83e63cca3fb70250e9002a2f0c3.tar.bz2 rails-d80334488ff5c83e63cca3fb70250e9002a2f0c3.zip |
Removed support for deprecated `finder_sql` in associations.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/company.rb | 4 | ||||
-rw-r--r-- | activerecord/test/models/company_in_module.rb | 4 | ||||
-rw-r--r-- | activerecord/test/models/project.rb | 8 |
3 files changed, 0 insertions, 16 deletions
diff --git a/activerecord/test/models/company.rb b/activerecord/test/models/company.rb index 12fb183bb3..bc50578759 100644 --- a/activerecord/test/models/company.rb +++ b/activerecord/test/models/company.rb @@ -48,10 +48,6 @@ class Firm < Company has_many :clients_with_interpolated_conditions, ->(firm) { where "rating > #{firm.rating}" }, :class_name => "Client" has_many :clients_like_ms, -> { where("name = 'Microsoft'").order("id") }, :class_name => "Client" has_many :clients_like_ms_with_hash_conditions, -> { where(:name => 'Microsoft').order("id") }, :class_name => "Client" - ActiveSupport::Deprecation.silence do - has_many :clients_using_sql, :class_name => "Client", :finder_sql => proc { "SELECT * FROM companies WHERE client_of = #{id}" } - has_many :clients_using_finder_sql, :class_name => "Client", :finder_sql => 'SELECT * FROM companies WHERE 1=1' - end has_many :plain_clients, :class_name => 'Client' has_many :readonly_clients, -> { readonly }, :class_name => 'Client' has_many :clients_using_primary_key, :class_name => 'Client', diff --git a/activerecord/test/models/company_in_module.rb b/activerecord/test/models/company_in_module.rb index 461bb0de09..38b0b6aafa 100644 --- a/activerecord/test/models/company_in_module.rb +++ b/activerecord/test/models/company_in_module.rb @@ -10,10 +10,6 @@ module MyApplication has_many :clients_sorted_desc, -> { order("id DESC") }, :class_name => "Client" has_many :clients_of_firm, -> { order "id" }, :foreign_key => "client_of", :class_name => "Client" has_many :clients_like_ms, -> { where("name = 'Microsoft'").order("id") }, :class_name => "Client" - ActiveSupport::Deprecation.silence do - has_many :clients_using_sql, :class_name => "Client", :finder_sql => 'SELECT * FROM companies WHERE client_of = #{id}' - end - has_one :account, :class_name => 'MyApplication::Billing::Account', :dependent => :destroy end diff --git a/activerecord/test/models/project.rb b/activerecord/test/models/project.rb index f893754b9f..9e8e3e04d2 100644 --- a/activerecord/test/models/project.rb +++ b/activerecord/test/models/project.rb @@ -9,14 +9,6 @@ class Project < ActiveRecord::Base has_and_belongs_to_many :salaried_developers, -> { where "salary > 0" }, :class_name => "Developer" ActiveSupport::Deprecation.silence do - has_and_belongs_to_many :developers_with_finder_sql, :class_name => "Developer", :finder_sql => proc { "SELECT t.*, j.* FROM developers_projects j, developers t WHERE t.id = j.developer_id AND j.project_id = #{id} ORDER BY t.id" } - has_and_belongs_to_many :developers_with_multiline_finder_sql, :class_name => "Developer", :finder_sql => proc { - "SELECT - t.*, j.* - FROM - developers_projects j, - developers t WHERE t.id = j.developer_id AND j.project_id = #{id} ORDER BY t.id" - } has_and_belongs_to_many :developers_by_sql, :class_name => "Developer", :delete_sql => proc { |record| "DELETE FROM developers_projects WHERE project_id = #{id} AND developer_id = #{record.id}" } end |