Module: BillyCms::ContentHelper
- Defined in:
- app/helpers/billy_cms/content_helper.rb
Instance Method Summary collapse
Instance Method Details
#cms_image(obj, options = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'app/helpers/billy_cms/content_helper.rb', line 9 def cms_image(obj, = {}) content_tag :div, class: "page-content page-content-binary", 'billycms-attribute' => 'content', 'billycms-page' => obj[:id] do image_tag(obj.content.to_s) + file_field_tag(:obj_input_file) end end |
#page_field(page, field, options = {}) ⇒ Object
4 5 6 7 |
# File 'app/helpers/billy_cms/content_helper.rb', line 4 def page_field(page, field, = {}) tag_name = [:tag] || :div content_tag tag_name, page.send(field).to_s.html_safe, class: "page-#{field.to_s}", 'billycms-attribute' => field.to_s, 'billycms-page' => page[:id], contenteditable: false end |