ActiveAdmin调用after_save

时间:2013-10-01 05:59:49

标签: ruby-on-rails activeadmin

我有一个ActiveAdmin类,我已经为某些更改编写了create action,因为在“create”中没有调用after_save,但它在“update”上工作正常。有没有办法在手动创建时注册回调???

感谢。

ActiveAdmin.register MyClassName do
 def create 
 end
 after_save do |myclassname|
  #This doesn't get called on create
  #Works fine on update
 end
end

0 个答案:

没有答案