Module: BiteHelper
- Defined in:
- lib/bites/bite_helper.rb
Instance Method Summary collapse
Instance Method Details
#text_bite(identifier, options) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/bites/bite_helper.rb', line 2 def text_bite(identifier, ) bite = Bite.find_by(identifier: identifier) return bite_form(bite) if @bite_authentication return Bite.create(identifier: identifier, text: .default).text if bite.nil? return bite.text unless bite.text.blank? return [:default] if .present? end |