Permalink
Browse files

Unused methods, module, etc.

  • Loading branch information...
1 parent b7b27fc commit 4e05bfb8e254c3360a3ca4a6cb332995314338fe @amatsuda amatsuda committed Jan 24, 2013
@@ -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
@@ -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
@@ -1,5 +1,2 @@
class Task < ActiveRecord::Base
- def updated_at
- ending
- end
end
@@ -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
@carlosantoniodasilva

carlosantoniodasilva Jan 24, 2013

Owner

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

@rafaelfranca

rafaelfranca Jan 24, 2013

Owner

Yes. Please revert

@rafaelfranca

rafaelfranca Jan 24, 2013

Owner

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

@amatsuda

amatsuda Jan 24, 2013

Member

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

@amatsuda

amatsuda Jan 24, 2013

Member

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

@rafaelfranca

rafaelfranca Jan 24, 2013

Owner

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

end
module Web

0 comments on commit 4e05bfb

Please sign in to comment.