Module: EaselHelpers::Helpers::RjsHelper
- Included in:
- EaselHelpers::Helpers
- Defined in:
- lib/easel_helpers/helpers/rjs_helper.rb
Instance Method Summary collapse
Instance Method Details
#inline_flash(page, flash, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/easel_helpers/helpers/rjs_helper.rb', line 5 def inline_flash(page, flash, = {}) container_id = [:container] || "flash-container" current_flash = flash flash.discard unless [:keep_flash] if [:replace] page.replace_html container_id, (current_flash) else page.insert_html :top, container_id, (current_flash) end end |