Should be at least one call like
delivery.edit_hook :load_available_methods
before you will can call
delivery.edit_hook << :load_available_methods_2
On Mar 18, 6:44 pm, Alan Gutierrez <a...@blogometer.com> wrote:
> The documentation says you can do this:
>
> delivery.edit_hook << :perform_additional_logic
>
> But when I do that like so:
>
> confirm.update_hook << :my_nifty_hook
> def my_nifty_hook
> raise "I'm hooked!"
> end
>
> I get an exception:
>
> You have a nil object when you didn't expect it! (NoMethodError)
> You might have expected an instance of Array.
> The error occurred while evaluating nil.<<
>
> When I look at the code for hooks, I don't see how you can append. Is
> this a nice idea that has not yet been implemented. (I'm on edge.)
>
> Alan Gutierrez
--
You received this message because you are subscribed to the Google Groups "Spree" group.
To post to this group, send email to spree-user@googlegroups.com.
To unsubscribe from this group, send email to spree-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spree-user?hl=en.
No comments:
Post a Comment