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

Version Path
spree_api-1.0.7 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.6 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.4 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.3 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.2 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.1 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.0 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.0.rc4 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.0.rc3 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.0.rc2 app/controllers/spree/admin/users_controller_decorator.rb
spree_api-1.0.0.rc1 app/controllers/spree/admin/users_controller_decorator.rb