Devise after_create in overrided RegistrationsController, Rails 3
I need to call after_create :something inside overrided Devise class RegistrationsController. Like this:
class RegistrationsController < Devis开发者_高级运维e::RegistrationsController
after_create :something
end
But it does't work:
undefined method `after_create' for RegistrationsController:Class
What's wrong?
after_create
is an ActiveRecord hook, not a controller hook. Maybe you're looking for after_filter
?
精彩评论