Class: Spree::Admin::Users::ApiKeyController
Instance Method Summary
collapse
#set_user_language_locale_key
Instance Method Details
#create ⇒ Object
7
8
9
10
11
12
|
# File 'app/controllers/spree/admin/users/api_key_controller.rb', line 7
def create
if user.generate_spree_api_key!
flash[:success] = t('spree.admin.api.key_generated')
end
redirect_to edit_admin_user_path(user)
end
|
#destroy ⇒ Object
14
15
16
17
18
19
|
# File 'app/controllers/spree/admin/users/api_key_controller.rb', line 14
def destroy
if user.clear_spree_api_key!
flash[:success] = t('spree.admin.api.key_cleared')
end
redirect_to edit_admin_user_path(user)
end
|