Module: AsanaExceptionNotifier::HeredocHelper
- Included in:
- ApplicationHelper
- Defined in:
- lib/asana_exception_notifier/helpers/heredoc_helper.rb
Overview
helper methods that use Heredoc syntax
Class Method Summary collapse
-
.link_helper(link) ⇒ String
This method creates a HTML link , that when will be clicked will trigger the toggle of a fieldset, by either making it hidden or visible.
-
.mount_table(array, options = {}) ⇒ String
Gets a bidimensional array and create a table.
Class Method Details
.link_helper(link) ⇒ String
This method creates a HTML link , that when will be clicked will trigger the toggle of a fieldset, by either making it hidden or visible
11 12 13 14 15 |
# File 'lib/asana_exception_notifier/helpers/heredoc_helper.rb', line 11 def link_helper(link) <<-HTML <a href="javascript:void(0)" onclick="AjaxExceptionNotifier.hideAllAndToggle('#{link.downcase}')">#{link.camelize}</a> HTML end |
.mount_table(array, options = {}) ⇒ String
Gets a bidimensional array and create a table. The first array is used as label.
23 24 25 26 27 28 29 30 31 |
# File 'lib/asana_exception_notifier/helpers/heredoc_helper.rb', line 23 def mount_table(array, = {}) header = array. <<-HTML <table #{hash_to_html_attributes()}> <thead><tr><th>#{get_table_headers(header)}</th></tr></thead> <tbody>#{get_table_rows(array)}</tbody> </table> HTML end |