diff options
-rw-r--r-- | actionpack/lib/action_dispatch/http/request.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/deprecation/behaviors.rb | 6 | ||||
-rw-r--r-- | activesupport/lib/active_support/deprecation/proxy_wrappers.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/testing/time_helpers.rb | 2 | ||||
-rw-r--r-- | guides/source/association_basics.md | 5 | ||||
-rw-r--r-- | guides/source/configuring.md | 3 | ||||
-rw-r--r-- | guides/source/i18n.md | 5 | ||||
-rw-r--r-- | guides/source/routing.md | 7 |
9 files changed, 22 insertions, 14 deletions
diff --git a/actionpack/lib/action_dispatch/http/request.rb b/actionpack/lib/action_dispatch/http/request.rb index fe83c01562..3c62c055e5 100644 --- a/actionpack/lib/action_dispatch/http/request.rb +++ b/actionpack/lib/action_dispatch/http/request.rb @@ -228,7 +228,7 @@ module ActionDispatch alias_method :uuid, :request_id - def x_request_id # :nodoc + def x_request_id # :nodoc: @env[HTTP_X_REQUEST_ID] end @@ -259,7 +259,7 @@ module ActionDispatch end end - # returns true if request content mime type is + # Returns true if the request's content MIME type is # +application/x-www-form-urlencoded+ or +multipart/form-data+. def form_data? FORM_DATA_MEDIA_TYPES.include?(content_mime_type.to_s) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index ed19819d63..dd7dcb9cdd 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -662,7 +662,7 @@ module ActiveRecord # [<tt>:foreign_key</tt>] # Add an appropriate foreign key. Defaults to false. # [<tt>:polymorphic</tt>] - # Wether an additional +_type+ column should be added. Defaults to false. + # Whether an additional +_type+ column should be added. Defaults to false. # # ====== Create a user_id integer column # diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index 0cdc7e96f7..28d2d78643 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -39,8 +39,8 @@ module ActiveSupport } # Behavior module allows to determine how to display deprecation messages. - # You can set any behaviors from +DEFAULT_BEHAVIORS+ constant or create - # custom behavior. Available behaviors: + # You can create a custom behavior or set any from the +DEFAULT_BEHAVIORS+ + # constant. Available behaviors are: # # [+raise+] Raise <tt>ActiveSupport::DeprecationException</tt>. # [+stderr+] Log all deprecation warnings to +$stderr+. @@ -49,7 +49,7 @@ module ActiveSupport # [+silence+] Do nothing. # # Setting behaviors only affects deprecations that happen after boot time. - # For more information you can read documentation for +behavior=+ method. + # For more information you can read the documentation of the +behavior=+ method. module Behavior # Whether to print a backtrace along with the warning. attr_accessor :debug diff --git a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb index c6d2b5e795..9b264cbb79 100644 --- a/activesupport/lib/active_support/deprecation/proxy_wrappers.rb +++ b/activesupport/lib/active_support/deprecation/proxy_wrappers.rb @@ -127,7 +127,7 @@ module ActiveSupport @deprecator = deprecator end - # Returns class of a new constant. + # Returns the class of the new constant. # # PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune) # PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006') diff --git a/activesupport/lib/active_support/testing/time_helpers.rb b/activesupport/lib/active_support/testing/time_helpers.rb index 3478b09423..fca0947c5b 100644 --- a/activesupport/lib/active_support/testing/time_helpers.rb +++ b/activesupport/lib/active_support/testing/time_helpers.rb @@ -39,7 +39,7 @@ module ActiveSupport end end - # Contain helpers that help you test passage of time. + # Contains helpers that help you test passage of time. module TimeHelpers # Changes current time to the time in the future or in the past by a given time difference by # stubbing +Time.now+, +Date.today+, and +DateTime.now+. diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md index 3f63c31cce..05dd0d2a04 100644 --- a/guides/source/association_basics.md +++ b/guides/source/association_basics.md @@ -1473,7 +1473,8 @@ The `collection.clear` method removes all objects from the collection according @customer.orders.clear ``` -WARNING: Objects will be delete if they're associated with `dependent: :destroy`, just like `dependent: :delete_all`. +WARNING: Objects will be deleted if they're associated with `dependent: :destroy`, +just like `dependent: :delete_all`. ##### `collection.empty?` @@ -1512,7 +1513,7 @@ The `collection.where` method finds objects within the collection based on the c ##### `collection.exists?(...)` -The `collection.exists?` method checks whether an object meeting the supplied +The `collection.exists?` method checks whether an object meeting the supplied conditions exists in the collection. It uses the same syntax and options as [`ActiveRecord::Base.exists?`](http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-exists-3F). diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 634b9c1ad0..d74aa319e7 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -186,7 +186,8 @@ The full set of methods that can be used in this block are as follows: * `javascript_engine` configures the engine to be used (for eg. coffee) when generating assets. Defaults to `:js`. * `orm` defines which orm to use. Defaults to `false` and will use Active Record by default. * `resource_controller` defines which generator to use for generating a controller when using `rails generate resource`. Defaults to `:controller`. -* `resource_route` defines whether inject resource route definition in routes or not. Defaults to `true`. +* `resource_route` defines whether a resource route definition should be generated + or not. Defaults to `true`. * `scaffold_controller` different from `resource_controller`, defines which generator to use for generating a _scaffolded_ controller when using `rails generate scaffold`. Defaults to `:scaffold_controller`. * `stylesheets` turns on the hook for stylesheets in generators. Used in Rails for when the `scaffold` generator is run, but this hook can be used in other generates as well. Defaults to `true`. * `stylesheet_engine` configures the stylesheet engine (for eg. sass) to be used when generating assets. Defaults to `:css`. diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 51eaf4ba5a..9f0ed1a85b 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -500,7 +500,10 @@ You can make use of this feature, e.g. when working with a large amount of stati ### Organization of Locale Files -When you are using the default SimpleStore shipped with the i18n library, dictionaries are stored in plain-text files on the disc. Putting translations for all parts of your application in one file per locale could be hard to manage. You can store these files in a hierarchy which makes sense to you. +When you are using the default SimpleStore shipped with the i18n library, +dictionaries are stored in plain-text files on the disk. Putting translations +for all parts of your application in one file per locale could be hard to +manage. You can store these files in a hierarchy which makes sense to you. For example, your `config/locales` directory could look like this: diff --git a/guides/source/routing.md b/guides/source/routing.md index b1e4c8ad86..52f11f92bd 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -809,13 +809,16 @@ As long as `Sprockets` responds to `call` and returns a `[status, headers, body] NOTE: For the curious, `'articles#index'` actually expands out to `ArticlesController.action(:index)`, which returns a valid Rack application. -If you specify a rack application as the endpoint for a matcher remember that the route will be unchanged in the receiving application. With the following route your rack application should expect the route to be '/admin': +If you specify a Rack application as the endpoint for a matcher, remember that +the route will be unchanged in the receiving application. With the following +route your Rack application should expect the route to be '/admin': ```ruby match '/admin', to: AdminApp, via: :all ``` -If you would prefer to have your rack application receive requests at the root path instead use mount: +If you would prefer to have your Rack application receive requests at the root +path instead, use mount: ```ruby mount AdminApp, at: '/admin' |