I want to call user.skip_confirmation
while his account is created by admin in admin panel. I want user to confirm his account in further steps of registration process, but not on create
. The only idea I have is to override create
in controller:
controller do
def create
user = User.new
user.skip_confirmation!
user.confirmed_at = nil
user.save!
end
end
The problem is, I have different attr_accessible
s for standard user and admin, and it works, because ActiveAdmin uses InheritedResources:
attr_accessible :name, :surname
attr_accessible :name, :surname, invitation_token, :as => :admin
It doesn't work after I changed create
(it worked before). How can I do what I want and still be able to use this :as => :admin
feature?