Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Unused methods, module, etc.

  • Loading branch information...
commit 4e05bfb8e254c3360a3ca4a6cb332995314338fe 1 parent b7b27fc
@amatsuda amatsuda authored
View
8 activerecord/test/models/company_in_module.rb
@@ -71,14 +71,6 @@ class Account < ActiveRecord::Base
i.belongs_to :nested_qualified_billing_firm, :class_name => 'MyApplication::Billing::Nested::Firm'
i.belongs_to :nested_unqualified_billing_firm, :class_name => 'Nested::Firm'
end
-
- validate :check_empty_credit_limit
-
- protected
-
- def check_empty_credit_limit
- errors.add_on_empty "credit_limit"
- end
end
end
end
View
8 activerecord/test/models/person.rb
@@ -91,14 +91,6 @@ class NestedPerson < ActiveRecord::Base
has_one :best_friend, :class_name => 'NestedPerson', :foreign_key => :best_friend_id
accepts_nested_attributes_for :best_friend, :update_only => true
-
- def comments=(new_comments)
- raise RuntimeError
- end
-
- def best_friend_first_name=(new_name)
- assign_attributes({ :best_friend_attributes => { :first_name => new_name } })
- end
end
class Insure
View
3  activerecord/test/models/task.rb
@@ -1,5 +1,2 @@
class Task < ActiveRecord::Base
- def updated_at
- ending
- end
end
View
9 activerecord/test/models/topic.rb
@@ -26,12 +26,6 @@ def call
end
}.new(self)
- module NamedExtension
- def two
- 2
- end
- end
-
has_many :replies, :dependent => :destroy, :foreign_key => "parent_id"
has_many :approved_replies, -> { approved }, class_name: 'Reply', foreign_key: "parent_id", counter_cache: 'replies_count'
has_many :replies_with_primary_key, :class_name => "Reply", :dependent => :destroy, :primary_key => "title", :foreign_key => "parent_title"
@@ -108,9 +102,6 @@ class ImportantTopic < Topic
end
class BlankTopic < Topic
- def blank?
- true
- end

I think this one was added for a reason? To check that blank? true wouldn't break? 8424d0d

@rafaelfranca Owner

Yes. Please revert

@rafaelfranca Owner

Also it would be nice to add a comment, so it will not be removed again

@amatsuda Collaborator

Hrm. To me it seems like this blank? is not actually called. But alright, I'll revert this anyway.

@amatsuda Collaborator

Ahh. I understand.:bulb: This blank? would not be called but needs to be there.

@rafaelfranca Owner

Yes. It is not called since the bug was fixed. See https://github.com/rails/rails/pull/8204/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
end
module Web
@carlosantoniodasilva

I think this one was added for a reason? To check that blank? true wouldn't break? 8424d0d

@rafaelfranca

Yes. Please revert

@rafaelfranca

Also it would be nice to add a comment, so it will not be removed again

@amatsuda

Hrm. To me it seems like this blank? is not actually called. But alright, I'll revert this anyway.

@amatsuda

Ahh. I understand.:bulb: This blank? would not be called but needs to be there.

@rafaelfranca

Yes. It is not called since the bug was fixed. See https://github.com/rails/rails/pull/8204/files

Please sign in to comment.
Something went wrong with that request. Please try again.