Module: ConstructorPages::PagesHelper
- Includes:
- TreeviewHelper
- Defined in:
- app/helpers/constructor_pages/pages_helper.rb
Instance Method Summary
collapse
#arrow_buttons_for, #for_select
Instance Method Details
#image_tag_with_at2x(name_at_1x, options = {}) ⇒ Object
9
10
11
12
|
# File 'app/helpers/constructor_pages/pages_helper.rb', line 9
def image_tag_with_at2x(name_at_1x, options={})
name_at_2x = name_at_1x.gsub(%r{\.\w+$}, '@2x\0')
image_tag(name_at_1x, options.merge("data-at2x" => asset_path(name_at_2x)))
end
|
#templates ⇒ Object
5
6
7
|
# File 'app/helpers/constructor_pages/pages_helper.rb', line 5
def templates
Template.all.map{|t| ["#{'--'*t.level} #{t.name}", t.id]}
end
|