Class: ActionView::Helpers::JavaScriptElementProxy
- Inherits:
-
JavaScriptProxy
- Object
- JavaScriptProxy
- ActionView::Helpers::JavaScriptElementProxy
- Defined in:
- lib/jrails.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(generator, id) ⇒ JavaScriptElementProxy
constructor
A new instance of JavaScriptElementProxy.
- #replace(*options_for_render) ⇒ Object
- #replace_html(*options_for_render) ⇒ Object
Constructor Details
#initialize(generator, id) ⇒ JavaScriptElementProxy
Returns a new instance of JavaScriptElementProxy.
156 157 158 159 |
# File 'lib/jrails.rb', line 156 def initialize(generator, id) @id = id super(generator, "$(\"##{id}\")") end |
Instance Method Details
#replace(*options_for_render) ⇒ Object
165 166 167 |
# File 'lib/jrails.rb', line 165 def replace(*) call 'replaceWith', @generator.send(:render, *) end |
#replace_html(*options_for_render) ⇒ Object
161 162 163 |
# File 'lib/jrails.rb', line 161 def replace_html(*) call 'html', @generator.send(:render, *) end |