Class: Optimacms::Admin::AdminBaseController

Inherits:
Optimacms::ApplicationController show all
Defined in:
app/controllers/optimacms/admin/admin_base_controller.rb

Instance Method Summary collapse

Methods inherited from Optimacms::ApplicationController

#current_lang, #not_found

Methods included from Optimacms::ApplicationHelper

#block, #block_with_edit, #eval_meta_string, #fix_quotes, #meta_tags, #method_missing, #msg, #tinymce_editor_insert_block, #url_for

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Optimacms::ApplicationHelper

Instance Method Details

#after_sign_in_path_for(resource) ⇒ Object

devise



26
27
28
29
30
31
32
33
# File 'app/controllers/optimacms/admin/admin_base_controller.rb', line 26

def (resource)
  if resource.is_a?(CmsAdminUser)
    dashboard_path
  else
    root_path
  end

end

#redirect_to_res(res) ⇒ Object

redirects



37
38
39
40
# File 'app/controllers/optimacms/admin/admin_base_controller.rb', line 37

def redirect_to_res(res)
  v_res = res ? 1 : 0
  redirect_to res_common_path(res: v_res)
end

#set_layout_modal_oldObject

modal



16
17
18
19
20
21
# File 'app/controllers/optimacms/admin/admin_base_controller.rb', line 16

def set_layout_modal_old
  if @modal==1
    self.class.layout false
  end

end