Module: PhrasingPlusHelper
- Defined in:
- app/helpers/phrasing_plus_helper.rb
Instance Method Summary collapse
- #phrasing_background_image_tag(key, options = {}, &block) ⇒ Object
- #phrasing_image_tag(key, options = {}) ⇒ Object
Instance Method Details
#phrasing_background_image_tag(key, options = {}, &block) ⇒ Object
8 9 10 11 12 13 |
# File 'app/helpers/phrasing_plus_helper.rb', line 8 def phrasing_background_image_tag(key, = {}, &block) image = PhrasingImage.find_or_create_by(key: key) wrapped_html = capture(&block) if block_given? = PhrasingBackgroundImageWidget.new(image, self, wrapped_html, ) render 'phrasing_plus/editable_background_image', widget: end |
#phrasing_image_tag(key, options = {}) ⇒ Object
2 3 4 5 6 |
# File 'app/helpers/phrasing_plus_helper.rb', line 2 def phrasing_image_tag(key, = {}) image = PhrasingImage.find_or_create_by(key: key) = PhrasingImageWidget.new(image, self, ) render 'phrasing_plus/editable_image', widget: end |