From a023d5391ef4f70c56eff6f3c386da393eb44648 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Mon, 15 Jun 2015 13:27:38 +0200 Subject: A few documentation edits [ci skip] --- actionpack/lib/action_controller/api.rb | 20 +++++++++++--------- .../lib/action_controller/metal/params_wrapper.rb | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'actionpack/lib') 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 ActionController::Base, - # 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 # ActionController::Base that is not present by default in # ActionController::API, for instance MimeResponds. This - # module gives you the respond_to and respond_with methods. - # 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 to your entire app: + # module gives you the respond_to 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 # attribute_names. # -- cgit v1.2.3