Class: Panel::MetaControllersController

Inherits:
BaseController show all
Defined in:
app/controllers/com/panel/meta_controllers_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

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/com/panel/meta_controllers_controller.rb', line 5

def index
  q_params = {}
  q_params.merge! params.permit(:business_identifier, :namespace_identifier)

  @meta_businesses = MetaBusiness.order(position: :asc)
  @meta_controllers = MetaController.includes(:meta_actions).default_where(q_params).page(params[:page])
end

#meta_actionsObject



29
30
31
32
# File 'app/controllers/com/panel/meta_controllers_controller.rb', line 29

def meta_actions
  @meta_controller = MetaController.find params[:meta_controller_id]
  @meta_actions = @meta_controller.meta_actions
end

#meta_controllersObject



22
23
24
25
26
27
# File 'app/controllers/com/panel/meta_controllers_controller.rb', line 22

def meta_controllers
  q_params = {}
  q_params.merge! params.permit(:business_identifier, :namespace_identifier)

  @meta_controllers = MetaController.where(q_params)
end

#meta_namespacesObject



17
18
19
20
# File 'app/controllers/com/panel/meta_controllers_controller.rb', line 17

def meta_namespaces
  @meta_business = MetaBusiness.find_by identifier: params[:business_identifier]
  @meta_namespaces = @meta_business.meta_namespaces
end

#syncObject



13
14
15
# File 'app/controllers/com/panel/meta_controllers_controller.rb', line 13

def sync
  MetaController.sync
end