Module: ActionView::Helpers::JavaScriptHelper
- Defined in:
- lib/versatile_rjs/to_function_ext.rb
Instance Method Summary collapse
- #_versatile_rjs_function_block_extraction(block) ⇒ Object
- #button_to_function_with_block(name, function = nil, html_options = {}, &block) ⇒ Object
- #link_to_function_with_block(name, function = nil, html_options = {}, &block) ⇒ Object
Instance Method Details
#_versatile_rjs_function_block_extraction(block) ⇒ Object
17 18 19 |
# File 'lib/versatile_rjs/to_function_ext.rb', line 17 def _versatile_rjs_function_block_extraction(block) VersatileRJS::Page.new(self).evaluate(&block).to_script.gsub(/[\r\n]+/, '') end |
#button_to_function_with_block(name, function = nil, html_options = {}, &block) ⇒ Object
5 6 7 8 9 |
# File 'lib/versatile_rjs/to_function_ext.rb', line 5 def (name, function = nil, ={}, &block) function = _versatile_rjs_function_block_extraction(block) if block_given? (name, function, ) end |
#link_to_function_with_block(name, function = nil, html_options = {}, &block) ⇒ Object
11 12 13 14 15 |
# File 'lib/versatile_rjs/to_function_ext.rb', line 11 def link_to_function_with_block(name, function = nil, ={}, &block) function = _versatile_rjs_function_block_extraction(block) if block_given? link_to_function_without_block(name, function, ) end |