aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/responder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/metal/responder.rb')
-rw-r--r--actionpack/lib/action_controller/metal/responder.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb
index ebadb29ea7..3794e277f6 100644
--- a/actionpack/lib/action_controller/metal/responder.rb
+++ b/actionpack/lib/action_controller/metal/responder.rb
@@ -9,7 +9,7 @@ module ActionController #:nodoc:
# respond_to :html, :xml, :json
#
# def index
- # @people = Person.find(:all)
+ # @people = Person.all
# respond_with(@people)
# end
# end
@@ -162,6 +162,11 @@ module ActionController #:nodoc:
navigation_behavior(e)
end
+ # to_js simply tries to render a template. If no template is found, raises the error.
+ def to_js
+ default_render
+ end
+
# All other formats follow the procedure below. First we try to render a
# template, if the template is not available, we verify if the resource
# responds to :to_format and display it.