Class: Auth::Admin::OauthUsersController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/auth/admin/oauth_users_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



24
25
26
27
# File 'app/controllers/auth/admin/oauth_users_controller.rb', line 24

def destroy
  @oauth_user.destroy
  redirect_to oauth_users_url, notice: 'Oauth user was successfully destroyed.'
end

#indexObject



4
5
6
7
8
9
10
11
# File 'app/controllers/auth/admin/oauth_users_controller.rb', line 4

def index
  if params[:user_id]
    @user = User.find(params[:user_id])
    @oauth_users = @user.oauth_users.page(params[:page])
  else
    @oauth_users = OauthUser.page(params[:page])
  end
end

#showObject



13
14
# File 'app/controllers/auth/admin/oauth_users_controller.rb', line 13

def show
end

#updateObject



16
17
18
19
20
21
22
# File 'app/controllers/auth/admin/oauth_users_controller.rb', line 16

def update
  if @oauth_user.update(oauth_user_params)
    redirect_to @oauth_user, notice: 'Oauth user was successfully updated.'
  else
    render head: :no_content
  end
end