Class: Oauth::ApplicationsController

Inherits:
Doorkeeper::ApplicationsController
  • Object
show all
Includes:
Gitlab::CurrentSettings, Gitlab::GonHelper, PageLayoutHelper
Defined in:
app/controllers/oauth/applications_controller.rb

Instance Method Summary collapse

Methods included from PageLayoutHelper

#blank_container, #container_class, #fluid_layout, #header_title, #nav, #page_card_attributes, #page_card_meta_tags, #page_description, #page_image, #page_title, #sidebar

Methods included from Gitlab::GonHelper

#add_gon_variables

Methods included from Gitlab::CurrentSettings

#current_application_settings, #fake_application_settings

Instance Method Details

#createObject


16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/controllers/oauth/applications_controller.rb', line 16

def create
  @application = Doorkeeper::Application.new(application_params)

  @application.owner = current_user

  if @application.save
    flash[:notice] = I18n.t(:notice, scope: [:doorkeeper, :flash, :applications, :create])
    redirect_to oauth_application_url(@application)
  else
    set_index_vars
    render :index
  end
end

#indexObject


12
13
14
# File 'app/controllers/oauth/applications_controller.rb', line 12

def index
  set_index_vars
end