diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-11-02 22:07:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-02 22:07:45 -0400 |
commit | c3db9297c8886c404eddef806f40a6cb31c898c3 (patch) | |
tree | 33ac6100e97f271b12638c610cdf532704074cc3 /activerecord | |
parent | aa6bcbbac8517d5b077f21073e9902637d7c7157 (diff) | |
parent | 0d7ab973e15b476ed42471395027e329f95c8951 (diff) | |
download | rails-c3db9297c8886c404eddef806f40a6cb31c898c3.tar.gz rails-c3db9297c8886c404eddef806f40a6cb31c898c3.tar.bz2 rails-c3db9297c8886c404eddef806f40a6cb31c898c3.zip |
Merge pull request #31038 from y-yagi/remove_unused_classes
Remove unused classes
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index bc7e288500..661605d3e5 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -140,26 +140,6 @@ module ActiveRecord class HasOneThroughCantAssociateThroughHasOneOrManyReflection < ThroughCantAssociateThroughHasOneOrManyReflection #:nodoc: end - class HasManyThroughCantAssociateNewRecords < ActiveRecordError #:nodoc: - def initialize(owner = nil, reflection = nil) - if owner && reflection - super("Cannot associate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to create the has_many :through record associating them.") - else - super("Cannot associate new records.") - end - end - end - - class HasManyThroughCantDissociateNewRecords < ActiveRecordError #:nodoc: - def initialize(owner = nil, reflection = nil) - if owner && reflection - super("Cannot dissociate new records through '#{owner.class.name}##{reflection.name}' on '#{reflection.source_reflection.class_name rescue nil}##{reflection.source_reflection.name rescue nil}'. Both records must have an id in order to delete the has_many :through record associating them.") - else - super("Cannot dissociate new records.") - end - end - end - class ThroughNestedAssociationsAreReadonly < ActiveRecordError #:nodoc: def initialize(owner = nil, reflection = nil) if owner && reflection @@ -189,16 +169,6 @@ module ActiveRecord end end - class ReadOnlyAssociation < ActiveRecordError #:nodoc: - def initialize(reflection = nil) - if reflection - super("Cannot add to a has_many :through association. Try adding to #{reflection.through_reflection.name.inspect}.") - else - super("Read-only reflection error.") - end - end - end - # This error is raised when trying to destroy a parent instance in N:1 or 1:1 associations # (has_many, has_one) when there is at least 1 child associated instance. # ex: if @project.tasks.size > 0, DeleteRestrictionError will be raised when trying to destroy @project |