Skip to content

Commit

Permalink
. Conditional after_create
Browse files Browse the repository at this point in the history
  • Loading branch information
kschiess committed Jun 4, 2010
1 parent 58a37b8 commit cf6559d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/floor_manager/employee.rb
Expand Up @@ -27,7 +27,12 @@ def create(floor, overrides)
produce_instance.tap { |i| produce_instance.tap { |i|
apply_attributes(i, :none, floor, overrides) apply_attributes(i, :none, floor, overrides)
i.save! i.save!
apply_attributes(i, :after_create, floor) }
unless @attributes[:after_create].empty?
apply_attributes(i, :after_create, floor)
i.save!
end
}
end end


# Returns just the attributes that would be used. # Returns just the attributes that would be used.
Expand Down

0 comments on commit cf6559d

Please sign in to comment.