Module: Brightcontent::BaseControllerExt::DefaultActions

Included in:
Brightcontent::BaseController
Defined in:
lib/brightcontent/base_controller_ext/default_actions.rb

Instance Method Summary collapse

Instance Method Details

#createObject



12
13
14
# File 'lib/brightcontent/base_controller_ext/default_actions.rb', line 12

def create
  create! { resource_redirect_path }
end

#destroyObject



20
21
22
# File 'lib/brightcontent/base_controller_ext/default_actions.rb', line 20

def destroy
  destroy! { resource_index_path }
end

#showObject



4
5
6
7
8
9
10
# File 'lib/brightcontent/base_controller_ext/default_actions.rb', line 4

def show
  if request.format == :html
    redirect_to action: :edit
  else
    show!
  end
end

#updateObject



16
17
18
# File 'lib/brightcontent/base_controller_ext/default_actions.rb', line 16

def update
  update! { resource_redirect_path }
end