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.
768 769 770 771 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 768 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
781 782 783 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 781 def reload replace :partial => @id.to_s end |
#replace(*options_for_render) ⇒ Object
777 778 779 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 777 def replace(*) call 'replace', @generator.send(:render, *) end |
#replace_html(*options_for_render) ⇒ Object
773 774 775 |
# File 'lib/action_view/helpers/prototype_helper.rb', line 773 def replace_html(*) call 'update', @generator.send(:render, *) end |