Sha256: 9bd557149e8feb91700ec3ce8db1b3761202ca2a349c7f88f2ba10947d63957c
Contents?: true
Size: 459 Bytes
Versions: 11
Compression:
Stored size: 459 Bytes
Contents
Spree::Admin::UsersController.class_eval do before_filter :load_roles, :only => [:edit, :new, :update, :create, :generate_api_key, :clear_api_key] def generate_api_key if @user.generate_api_key! flash.notice = t('api.key_generated') end redirect_to edit_admin_user_path(@user) end def clear_api_key if @user.clear_api_key! flash.notice = t('api.key_cleared') end redirect_to edit_admin_user_path(@user) end end
Version data entries
11 entries across 11 versions & 1 rubygems