开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜