Class: Panel::MetaActionsController

Inherits:
BaseController show all
Defined in:
app/controllers/com/panel/meta_actions_controller.rb

Constant Summary

Constants included from RailsCom::Application

RailsCom::Application::LOCALE_MAP

Instance Method Summary collapse

Methods included from RailsCom::Application

#current_title, #default_form_params, #default_params, #json_format?, #set_country, #set_flash, #set_locale, #set_timezone, #set_variant

Instance Method Details

#createObject



14
15
16
17
18
19
20
# File 'app/controllers/com/panel/meta_actions_controller.rb', line 14

def create
  @meta_action = @meta_controller.meta_actions.build(meta_action_params)

  unless @meta_action.save
    render :new, locals: { model: @meta_action }, status: :unprocessable_entity
  end
end

#indexObject



6
7
8
# File 'app/controllers/com/panel/meta_actions_controller.rb', line 6

def index
  @meta_actions = @meta_controller.meta_actions
end

#newObject



10
11
12
# File 'app/controllers/com/panel/meta_actions_controller.rb', line 10

def new
  @meta_action = @meta_controller.meta_actions.build
end

#rolesObject



22
23
24
# File 'app/controllers/com/panel/meta_actions_controller.rb', line 22

def roles
  @roles = @meta_action.roles
end