Skip to content

Commit

Permalink
Fixed init ordering issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Smith committed Nov 13, 2013
1 parent 404cc81 commit 6629038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/soulless/accessors.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def define_reader(attribute)

def define_writer(attribute)
self.class.send(:define_method, "#{attribute}=".to_sym) do |value|
super(value)
define_dirty_writer(attribute, value)
super(value)
define_association_writer(attribute)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/soulless/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ def i18n_scope
end

def initialize(params = {})
init_dirty
init_accessors(attribute_set.map { |a| a.name })
super
init_dirty
end

def persisted?
Expand Down

0 comments on commit 6629038

Please sign in to comment.