Class: MegaBar::MasterLayoutSectionsController

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

Instance Method Summary collapse

Instance Method Details

#envObject



22
23
24
# File 'app/controllers/mega_bar/master_layout_sections_controller.rb', line 22

def env
  request.env
end

#render_layout_section_adminObject



13
14
15
16
17
18
19
20
# File 'app/controllers/mega_bar/master_layout_sections_controller.rb', line 13

def render_layout_section_admin
  # If we're already rendering something, return a placeholder
  if performed?
    render plain: "<!-- Section Placeholder -->"
  else
    render 'render_layout_section_admin'
  end
end

#render_layout_section_with_blocksObject



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

def render_layout_section_with_blocks
  @blocks = env['mega_final_blocks']
  @mega_layout_section = env[:mega_layout_section]
  @mega_layout = env[:mega_layout]
  @mega_page = env[:mega_page]
  @tabs =  @blocks.select{|blck| blck[:actions] == 'show'}

  render
end