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

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

Instance Method Summary collapse

Instance Method Details

#becomeObject



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

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

#createObject



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

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

#indexObject



6
7
# File 'app/controllers/openstax/accounts/dev/accounts_controller.rb', line 6

def index
end

#searchObject



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

def search
  handle_with(AccountsSearch)
end