Module: InlineHelper
- Defined in:
- app/helpers/inline_helper.rb
Instance Method Summary collapse
-
#phrase(*args) ⇒ Object
Normal phrase phrase(“headline”, url: www.infinum.co/yabadaba, inverse: true, scope: “models.errors”) Data model phrase phrase(record, :title, inverse: true, class: phrase-record-title).
Instance Method Details
#phrase(*args) ⇒ Object
Normal phrase phrase(“headline”, url: www.infinum.co/yabadaba, inverse: true, scope: “models.errors”) Data model phrase phrase(record, :title, inverse: true, class: phrase-record-title)
7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/inline_helper.rb', line 7 def phrase(*args) if args[0].class.in? [String, Symbol] key, = args[0].to_s, (args[1] || {}) inline(phrasing_extract_record(key, ), :value, ) else record, attribute, = args[0], args[1], args[2] inline(record, attribute, || {}) end end |