aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2015-06-15 13:27:38 +0200
committerRobin Dupret <robin.dupret@gmail.com>2015-06-15 18:16:40 +0200
commita023d5391ef4f70c56eff6f3c386da393eb44648 (patch)
treed0bbe9259a09685b7c5867e5ae24f8b9b19bae0a /actionpack/lib
parentce882b17f4363ef9ce59cb11bf5460579d0b1f1f (diff)
downloadrails-a023d5391ef4f70c56eff6f3c386da393eb44648.tar.gz
rails-a023d5391ef4f70c56eff6f3c386da393eb44648.tar.bz2
rails-a023d5391ef4f70c56eff6f3c386da393eb44648.zip
A few documentation edits [ci skip]
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/api.rb20
-rw-r--r--actionpack/lib/action_controller/metal/params_wrapper.rb2
2 files changed, 12 insertions, 10 deletions
diff --git a/actionpack/lib/action_controller/api.rb b/actionpack/lib/action_controller/api.rb
index d8149e0232..3af63b8892 100644
--- a/actionpack/lib/action_controller/api.rb
+++ b/actionpack/lib/action_controller/api.rb
@@ -4,7 +4,7 @@ require 'action_controller/log_subscriber'
module ActionController
# API Controller is a lightweight version of <tt>ActionController::Base</tt>,
- # created for applications that don't require all functionality that a complete
+ # 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.
#
@@ -61,10 +61,10 @@ module ActionController
# In some scenarios you may want to add back some functionality provided by
# <tt>ActionController::Base</tt> 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> and <tt>respond_with</tt> methods.
- # Adding it is quite simple, you just need to include the module in a specific
- # controller or in <tt>ApplicationController</tt> in case you want it
- # available to your entire app:
+ # 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:
#
# class ApplicationController < ActionController::API
# include ActionController::MimeResponds
@@ -87,16 +87,18 @@ module ActionController
class API < Metal
abstract!
- # Shortcut helper that returns all the ActionController::API modules except the ones passed in the argument:
+ # Shortcut helper that returns all the ActionController::API modules except
+ # the ones passed as arguments:
#
# class MetalController
- # ActionController::API.without_modules(:Redirecting, :DataStreaming).each do |left|
+ # ActionController::API.without_modules(:ForceSSL, :UrlFor).each do |left|
# include left
# end
# end
#
# This gives better control over what you want to exclude and makes it easier
- # to create an api controller class, instead of listing the modules required manually.
+ # to create an API controller class, instead of listing the modules required
+ # manually.
def self.without_modules(*modules)
modules = modules.map do |m|
m.is_a?(Symbol) ? ActionController.const_get(m) : m
@@ -120,7 +122,7 @@ module ActionController
ForceSSL,
DataStreaming,
- # Before callbacks should also be executed the earliest as possible, so
+ # Before callbacks should also be executed as early as possible, so
# also include them at the bottom.
AbstractController::Callbacks,
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb
index 8a4ea70649..cdfc523bd4 100644
--- a/actionpack/lib/action_controller/metal/params_wrapper.rb
+++ b/actionpack/lib/action_controller/metal/params_wrapper.rb
@@ -40,7 +40,7 @@ module ActionController
# wrap_parameters :person, include: [:username, :password]
# end
#
- # On ActiveRecord models with no +:include+ or +:exclude+ option set,
+ # On Active Record models with no +:include+ or +:exclude+ option set,
# it will only wrap the parameters returned by the class method
# <tt>attribute_names</tt>.
#