Skip to content

Commit

Permalink
Merge pull request maxdemarzi#7 from blizkreeg/working
Browse files Browse the repository at this point in the history
use Hash merge instead of assignment to allow for property mixins
  • Loading branch information
blizkreeg committed Jul 17, 2013
2 parents 49e4951 + 53cb809 commit 2261f3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/deja/schema_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def schema
end

def attributes(attrs)
@@all_attributes[self.name] = attrs
@@all_attributes[self.name] ||= {}
@@all_attributes[self.name].merge!(attrs)
attrs.each do |attr, type|
send(:attr_accessor, attr)
end
Expand Down

0 comments on commit 2261f3c

Please sign in to comment.