ruby on rails - ActiveAdmin and Devise - skip_confirmation! on create action -


i want call user.skip_confirmation while account created admin in admin panel. want user confirm account in further steps of registration process, not on create. idea have override create in controller:

controller   def create     user = user.new     user.skip_confirmation!     user.confirmed_at = nil     user.save!   end end 

the problem is, have different attr_accessibles standard user , admin, , works, because activeadmin uses inheritedresources:

attr_accessible :name, :surname attr_accessible :name, :surname, invitation_token, :as => :admin 

it doesn't work after changed create (it worked before). how can want , still able use :as => :admin feature?

i @ answer , none solving issue @ hand. solve simplest way shown below.

before_create |user|  user.skip_confirmation! end 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -