Skip to content

Commit

Permalink
Merge pull request #9 from brynary/class_attribute
Browse files Browse the repository at this point in the history
Switch from class_inheritable_accessor to class_attribute
  • Loading branch information
bkeepers committed Jul 23, 2011
2 parents cbfe32e + 7e6a49c commit f7a0609
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/joint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/joint/class_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7a0609

Please sign in to comment.