Class: MegaBar::MasterLayoutsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/mega_bar/master_layouts_controller.rb

Instance Method Summary collapse

Instance Method Details

#administering_page?Boolean

Returns:

  • (Boolean)


15
16
17
18
# File 'app/controllers/mega_bar/master_layouts_controller.rb', line 15

def administering_page?
  return true
  session[:admin_pages].include?(@mega_page[:page_id].to_s)
end

#envObject



11
12
13
# File 'app/controllers/mega_bar/master_layouts_controller.rb', line 11

def env
  request.env
end

#render_layout_with_sectionsObject



3
4
5
6
7
8
9
# File 'app/controllers/mega_bar/master_layouts_controller.rb', line 3

def render_layout_with_sections
  @mega_layout_sections ||= env["mega_final_layout_sections"]
  @mega_layout ||= env[:mega_layout]
  @mega_page = env[:mega_page]
  template = Template.find(@mega_layout[:template_id])
  render template.code_name
end