Class: ActionView::Helpers::JavaScriptElementProxy
- Inherits:
-
JavaScriptProxy
- Object
- Builder::BlankSlate
- JavaScriptProxy
- ActionView::Helpers::JavaScriptElementProxy
- Defined in:
- lib/action_view/helpers/prototype_helper.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(generator, id) ⇒ JavaScriptElementProxy
constructor
A new instance of JavaScriptElementProxy.
- #reload ⇒ Object
- #replace(*options_for_render) ⇒ Object
- #replace_html(*options_for_render) ⇒ Object
Constructor Details
#initialize(generator, id) ⇒ JavaScriptElementProxy
Returns a new instance of JavaScriptElementProxy.
769 770 771 772 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 769 def initialize(generator, id) @id = id super(generator, "$(#{id.to_json})") end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActionView::Helpers::JavaScriptProxy
Instance Method Details
#reload ⇒ Object
782 783 784 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 782 def reload replace :partial => @id.to_s end |
#replace(*options_for_render) ⇒ Object
778 779 780 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 778 def replace(*) call 'replace', @generator.send(:render, *) end |
#replace_html(*options_for_render) ⇒ Object
774 775 776 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 774 def replace_html(*) call 'update', @generator.send(:render, *) end |