Model callback upon successful creation

20 views
Skip to first unread message

hyn

unread,
Sep 6, 2011, 5:37:57 AM9/6/11
to Ohm Ruby
How can I get my Ohm model automatically call a method right after its
id is assigned?

Michel Martens

unread,
Sep 6, 2011, 5:41:50 AM9/6/11
to ohm-...@googlegroups.com


On Tue, Sep 6, 2011 at 11:37 AM, hyn <hisaoki...@gmail.com> wrote:
How can I get my Ohm model automatically call a method right after its
id is assigned?

You can use Ohm::Callbacks, check the documentation here: http://cyx.github.com/ohm-contrib/doc/Ohm/Callbacks.html

It is part of the ohm-contrib gem.

hyn

unread,
Sep 6, 2011, 6:26:30 AM9/6/11
to Ohm Ruby
thanks, exactly what I need.

On Sep 6, 6:41 pm, Michel Martens <mic...@soveran.com> wrote:
Reply all
Reply to author
Forward
0 new messages