Module: AbstractInterface::ViewHelper
- Defined in:
- lib/abstract_interface/view_helper.rb
Instance Method Summary collapse
-
#b ⇒ Object
(also: #builder)
Basic.
- #build_layout(layout = nil) ⇒ Object
- #themed_resource(resource) ⇒ Object
Instance Method Details
#b ⇒ Object Also known as: builder
Basic
6 7 8 |
# File 'lib/abstract_interface/view_helper.rb', line 6 def b @b ||= AbstractInterface::ViewBuilder.new self end |
#build_layout(layout = nil) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/abstract_interface/view_helper.rb', line 15 def build_layout layout = nil # Configuring current_theme.layout = layout # Rendering current_theme.layout_definition['slots'].each do |slot_name, slots| slots = Array(slots) slots.each do |partial| content_for slot_name do render :partial => partial end end end end |
#themed_resource(resource) ⇒ Object
11 12 13 |
# File 'lib/abstract_interface/view_helper.rb', line 11 def themed_resource resource "/#{AbstractInterface.plugin_name.should_not_be!(:blank)}/themes/#{current_theme.name}/#{resource}" end |