lib/action_controller/api.rb in actionpack-7.0.2.4 vs lib/action_controller/api.rb in actionpack-7.0.3
- old
+ new
@@ -3,11 +3,11 @@
require "action_view"
require "action_controller"
require "action_controller/log_subscriber"
module ActionController
- # API Controller is a lightweight version of <tt>ActionController::Base</tt>,
+ # API Controller is a lightweight version of ActionController::Base,
# created for applications that don't require all functionalities that a complete
# \Rails controller provides, allowing you to create controllers with just the
# features that you need for API only applications.
#
# An API Controller is different from a normal controller in the sense that
@@ -30,11 +30,11 @@
# render json: posts
# end
# end
#
# Request, response, and parameters objects all work the exact same way as
- # <tt>ActionController::Base</tt>.
+ # ActionController::Base.
#
# == Renders
#
# The default API Controller stack includes all renderers, which means you
# can use <tt>render :json</tt> and siblings freely in your controllers. Keep
@@ -49,21 +49,21 @@
#
# == Redirects
#
# Redirects are used to move from one action to another. You can use the
# <tt>redirect_to</tt> method in your controllers in the same way as in
- # <tt>ActionController::Base</tt>. For example:
+ # ActionController::Base. For example:
#
# def create
# redirect_to root_url and return if not_authorized?
# # do stuff here
# end
#
# == Adding New Behavior
#
# In some scenarios you may want to add back some functionality provided by
- # <tt>ActionController::Base</tt> that is not present by default in
+ # ActionController::Base that is not present by default in
# <tt>ActionController::API</tt>, for instance <tt>MimeResponds</tt>. This
# module gives you the <tt>respond_to</tt> method. Adding it is quite simple,
# you just need to include the module in a specific controller or in
# +ApplicationController+ in case you want it available in your entire
# application:
@@ -81,10 +81,10 @@
# format.xml { render xml: posts }
# end
# end
# end
#
- # Make sure to check the modules included in <tt>ActionController::Base</tt>
+ # Make sure to check the modules included in ActionController::Base
# if you want to use any other functionality that is not provided
# by <tt>ActionController::API</tt> out of the box.
class API < Metal
abstract!