Class: OpenStax::Accounts::Dev::AccountsController

Inherits:
BaseController show all
Defined in:
app/controllers/openstax/accounts/dev/accounts_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#configuration

Instance Method Details

#becomeObject



20
21
22
23
24
# File 'app/controllers/openstax/accounts/dev/accounts_controller.rb', line 20

def become
  @account = Account.find_by(openstax_uid: params[:id])
  (@account)
  redirect_back key: :accounts_return_to, strategies: [:session]
end

#createObject



15
16
17
18
# File 'app/controllers/openstax/accounts/dev/accounts_controller.rb', line 15

def create
  handle_with(AccountsCreate,
              complete: lambda { redirect_to dev_accounts_path })
end

#indexObject



8
9
# File 'app/controllers/openstax/accounts/dev/accounts_controller.rb', line 8

def index
end

#searchObject



11
12
13
# File 'app/controllers/openstax/accounts/dev/accounts_controller.rb', line 11

def search
  handle_with(AccountsSearch)
end