Browse files

Merge pull request #9 from brynary/class_attribute

Switch from class_inheritable_accessor to class_attribute
  • Loading branch information...
2 parents cbfe32e + 7e6a49c commit f7a060933bc9fb21fb4b2114c79706b4eb8e3f02 @bkeepers bkeepers committed Jul 23, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/joint.rb
  2. +1 −1 lib/joint/class_methods.rb
View
2 lib/joint.rb
@@ -6,7 +6,7 @@ module Joint
extend ActiveSupport::Concern
included do
- class_inheritable_accessor :attachment_names
+ class_attribute :attachment_names
self.attachment_names = Set.new
include attachment_accessor_module
end
View
2 lib/joint/class_methods.rb
@@ -8,7 +8,7 @@ def attachment(name, options = {})
options.symbolize_keys!
name = name.to_sym
- self.attachment_names << name
+ self.attachment_names = attachment_names.dup.add(name)
after_save :save_attachments
after_save :destroy_nil_attachments

0 comments on commit f7a0609

Please sign in to comment.