Module: BrickLayer::LayoutHelper
- Defined in:
- app/helpers/brick_layer/layout_helper.rb
Instance Method Summary collapse
Instance Method Details
#nested_routes(routes) ⇒ Object
14 15 16 17 18 |
# File 'app/helpers/brick_layer/layout_helper.rb', line 14 def nested_routes(routes) routes.map do |route, sub_routes| render(route) + content_tag(:ul, nested_routes(sub_routes), :class => "sub_routes") end.join.html_safe end |
#standalone_navigation ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'app/helpers/brick_layer/layout_helper.rb', line 2 def html = '' BrickLayer.data_sets_standalones.each do |klass_in_symbol_form| klass_to_model_param = klass_in_symbol_form.to_s.underscore.pluralize html += content_tag :li do content_tag(:a, klass_in_symbol_form.to_s.underscore.titlecase, :href => data_sets_path(:model => klass_to_model_param)) end end content_tag( :ul, content_tag(:li, "Standalone Content") + html.html_safe ) end |