instance method
update_page
Ruby on Rails 3.0.20
Since v2.2.3 Last seen in v3.0.20Signature
update_page(&block)
Yields a JavaScriptGenerator and returns the generated JavaScript code. Use this to update multiple elements on a page in an Ajax response. See JavaScriptGenerator for more information.
Example:
update_page do |page| page.hide 'spinner' end
Parameters
-
blockblock
Source
# File actionpack/lib/action_view/helpers/prototype_helper.rb, line 580
def update_page(&block)
JavaScriptGenerator.new(view_context, &block).to_s.html_safe
end
Defined in actionpack/lib/action_view/helpers/prototype_helper.rb line 580
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::PrototypeHelper