[ogre] no before_destroy
Kevin Driedger
linuxbox at gmail.com
Tue Sep 19 01:48:20 UTC 2006
before_destroy is an ActiveRecord callback, try putting it on your model.
On 9/18/06, Michael P. Soulier <msoulier at digitaltorque.ca> wrote:
>
> Hey,
>
> So I'm looking at "Agile Web Development with Rails", and I'm on page 134.
> Here a "before_destroy" method is added to prevent the dave user from
> being
> deleted.
>
> When I try the same thing in my controller, I get this
>
> undefined method `before_destroy' for AdminUsersController:Class
>
> I have this
>
> class AdminUsersController < ApplicationController
> before_filter :authorize, :except => :login
> before_destroy :dont_destroy_msoulier
>
> but it doesn't like the before_destroy.
>
> I can work around it for now, but I'm curious as to why this example isn't
> working for me.
>
> Thanks,
> Mike
> --
> Michael P. Soulier <msoulier at digitaltorque.ca>
> "Any intelligent fool can make things bigger and more complex... It
> takes a touch of genius - and a lot of courage to move in the opposite
> direction." --Albert Einstein
>
>
> _______________________________________________
> Ogre mailing list
> Ogre at lists.jadedpixel.com
> http://lists.jadedpixel.com/mailman/listinfo/ogre
>
>
>
>
--
]{evin ])riedger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jadedpixel.com/pipermail/ogre/attachments/20060918/15360a3b/attachment-0001.html
More information about the Ogre
mailing list