Its not called at all:
after :create do |license|
puts "Creating slots"
if 0 == Slot.import_legacy(license.id)
license.create_slots
end
end
The console does not show the "Creating slots" text.
@Piotr: I would have to override new and create for that to work,
correct?
On Feb 23, 2:17 am, Igor Elland <[email protected]> wrote:
> Just too be sure, the hook is not being called or the condition is never
> satisfied and it gives you the impression the hook is not being called?
>
> On 22. feb. 2012, at 23:13, Philipp Kursawe wrote:
>
>
>
>
>
>
>
> > Hello,
>
> > I love DM but this issue is driving me crazy:
>
> > after :create do |license|
> > if 0 == Slot.import_legacy(license.id)
> > license.create_slots
> > end
> > end
>
> > This hook is never called. Neither with License.new.save nor with
> > License.create
> > The license object is saved but the hook is not called.
>
> > Any ideas or workarounds?
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "DataMapper" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/datamapper?hl=en.
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.