Browse files

Switch from class_inheritable_accessor to class_attribute

* class_inheritable_accessor is deprecated in Rails 3.1
  • Loading branch information...
1 parent cbfe32e commit 7e6a49c8bbc5988381fd0fa7dd5e72dbdd4301f8 @brynary brynary 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 7e6a49c

Please sign in to comment.