From 97877e1a23e10a2d134241a3f7a00a0652e966e0 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 16 May 2016 01:38:16 +0530 Subject: [PATCH 01/15] Add `ActiveRecord::Migration::CheckPending` to default middlewares for API Apps [ci skip] --- guides/source/api_app.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guides/source/api_app.md b/guides/source/api_app.md index 485294dc02..9a0b3016c1 100644 --- a/guides/source/api_app.md +++ b/guides/source/api_app.md @@ -212,6 +212,7 @@ An API application comes with the following middleware by default: - `ActionDispatch::RemoteIp` - `ActionDispatch::Reloader` - `ActionDispatch::Callbacks` +- `ActiveRecord::Migration::CheckPending` - `Rack::Head` - `Rack::ConditionalGet` - `Rack::ETag` From 8a00a8c8e124a83cf9564e9b3f9683cf01556e04 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 16 May 2016 01:47:32 +0530 Subject: [PATCH 02/15] Change output genereated for middlewares on a new application. This has changed quite a bit after Executor middleware addition. [ci skip] --- guides/source/rails_on_rack.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index d67702f52e..0098b25c62 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -105,25 +105,25 @@ For a freshly generated Rails application, this might produce something like: use Rack::Sendfile use ActionDispatch::Static use ActionDispatch::Executor -use # +use ActiveSupport::Cache::Strategy::LocalCache::Middleware use Rack::Runtime use Rack::MethodOverride use ActionDispatch::RequestId use Rails::Rack::Logger use ActionDispatch::ShowExceptions +use WebConsole::Middleware use ActionDispatch::DebugExceptions use ActionDispatch::RemoteIp use ActionDispatch::Reloader use ActionDispatch::Callbacks use ActiveRecord::Migration::CheckPending -use ActiveRecord::ConnectionAdapters::ConnectionManagement -use ActiveRecord::QueryCache use ActionDispatch::Cookies use ActionDispatch::Session::CookieStore use ActionDispatch::Flash use Rack::Head use Rack::ConditionalGet use Rack::ETag +use ActionView::Digestor::PerRequestDigestCacheExpiry run Rails.application.routes ``` From 80b23fedfb6dddc1885cace126d5caae8d232564 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 16 May 2016 01:56:44 +0530 Subject: [PATCH 03/15] The `ActiveRecord::ConnectionAdapters::ConnectionManagement` and `ActiveRecord::QueryCache` middlewares were removed with `Executor` addition on d3c9d808e3e242155a44fd2a89ef272cfade8fe8 Removes traces and reference of these from all places. [ci skip] --- guides/source/command_line.md | 2 +- guides/source/configuring.md | 2 -- guides/source/rails_on_rack.md | 12 ++---------- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/guides/source/command_line.md b/guides/source/command_line.md index 0e6d119681..f766403228 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -433,7 +433,7 @@ Ruby version 2.2.2 (x86_64-linux) RubyGems version 2.4.6 Rack version 1.6 JavaScript Runtime Node.js (V8) -Middleware Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, #, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, Rack::Head, Rack::ConditionalGet, Rack::ETag +Middleware Rack::Sendfile, ActionDispatch::Static, ActionDispatch::Executor, #, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, Rack::Head, Rack::ConditionalGet, Rack::ETag Application root /home/foobar/commandsapp Environment development Database adapter sqlite3 diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 66aae112d8..51a2649ec0 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -224,8 +224,6 @@ Every Rails application comes with a standard set of middleware which it uses in * `ActionDispatch::RemoteIp` checks for IP spoofing attacks and gets valid `client_ip` from request headers. Configurable with the `config.action_dispatch.ip_spoofing_check`, and `config.action_dispatch.trusted_proxies` options. * `Rack::Sendfile` intercepts responses whose body is being served from a file and replaces it with a server specific X-Sendfile header. Configurable with `config.action_dispatch.x_sendfile_header`. * `ActionDispatch::Callbacks` runs the prepare callbacks before serving the request. -* `ActiveRecord::ConnectionAdapters::ConnectionManagement` cleans active connections after each request, unless the `rack.test` key in the request environment is set to `true`. -* `ActiveRecord::QueryCache` caches all SELECT queries generated in a request. If any INSERT or UPDATE takes place then the cache is cleaned. * `ActionDispatch::Cookies` sets cookies for the request. * `ActionDispatch::Session::CookieStore` is responsible for storing the session in cookies. An alternate middleware can be used for this by changing the `config.action_controller.session_store` to an alternate value. Additionally, options passed to this can be configured by using `config.action_controller.session_options`. * `ActionDispatch::Flash` sets up the `flash` keys. Only available if `config.action_controller.session_store` is set to a value. diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index 0098b25c62..831a878cf6 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -149,9 +149,9 @@ You can add a new middleware to the middleware stack using any of the following # Push Rack::BounceFavicon at the bottom config.middleware.use Rack::BounceFavicon -# Add Lifo::Cache after ActiveRecord::QueryCache. +# Add Lifo::Cache after ActionDispatch::Executor. # Pass { page_cache: false } argument to Lifo::Cache. -config.middleware.insert_after ActiveRecord::QueryCache, Lifo::Cache, page_cache: false +config.middleware.insert_after ActionDispatch::Executor, Lifo::Cache, page_cache: false ``` #### Swapping a Middleware @@ -267,14 +267,6 @@ Much of Action Controller's functionality is implemented as Middlewares. The fol * Checks pending migrations and raises `ActiveRecord::PendingMigrationError` if any migrations are pending. -**`ActiveRecord::ConnectionAdapters::ConnectionManagement`** - -* Cleans active connections after each request, unless the `rack.test` key in the request environment is set to `true`. - -**`ActiveRecord::QueryCache`** - -* Enables the Active Record query cache. - **`ActionDispatch::Cookies`** * Sets cookies for the request. From e464b3cb3b32f968758f21549b17e4d0338e9dd0 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 16 May 2016 02:56:14 +0530 Subject: [PATCH 04/15] Pass over API Apps guide grammar. [ci skip] --- guides/source/api_app.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/guides/source/api_app.md b/guides/source/api_app.md index 9a0b3016c1..f373d313cc 100644 --- a/guides/source/api_app.md +++ b/guides/source/api_app.md @@ -340,7 +340,7 @@ API application, especially if one of your API clients is the browser: - `Rack::MethodOverride` - `ActionDispatch::Cookies` - `ActionDispatch::Flash` -- For sessions management +- For session management * `ActionDispatch::Session::CacheStore` * `ActionDispatch::Session::CookieStore` * `ActionDispatch::Session::MemCacheStore` @@ -374,10 +374,8 @@ controller modules by default: - `AbstractController::Rendering` and `ActionController::ApiRendering`: Basic support for rendering. - `ActionController::Renderers::All`: Support for `render :json` and friends. - `ActionController::ConditionalGet`: Support for `stale?`. -- `ActionController::BasicImplicitRender`: Makes sure to return an empty response - if there's not an explicit one. -- `ActionController::StrongParameters`: Support for parameters white-listing in - combination with Active Model mass assignment. +- `ActionController::BasicImplicitRender`: Makes sure to return an empty response, if there isn't an explicit one. +- `ActionController::StrongParameters`: Support for parameters white-listing in combination with Active Model mass assignment. - `ActionController::ForceSSL`: Support for `force_ssl`. - `ActionController::DataStreaming`: Support for `send_file` and `send_data`. - `AbstractController::Callbacks`: Support for `before_action` and @@ -387,8 +385,8 @@ controller modules by default: hooks defined by Action Controller (see [the instrumentation guide](active_support_instrumentation.html#action-controller) for more information regarding this). -- `ActionController::ParamsWrapper`: Wraps the parameters hash into a nested hash - so you don't have to specify root elements sending POST requests for instance. +- `ActionController::ParamsWrapper`: Wraps the parameters hash into a nested hash, + so that you don't have to specify root elements sending POST requests for instance. Other plugins may add additional modules. You can get a list of all modules included into `ActionController::API` in the rails console: From 8bd0d347f1bd7e2c9c6d28b7a3209e4227421b17 Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Tue, 17 May 2016 02:47:37 +0530 Subject: [PATCH 05/15] PerRequestDigestCacheExpiry middlware was been removed. Removed traces, for the same. https://github.com/rails/rails/commit/23b6a9c0fcb8992e18450d6fe0680bf09685b7db [ci skip] --- guides/source/rails_on_rack.md | 1 - 1 file changed, 1 deletion(-) diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index 831a878cf6..8148f70c31 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -123,7 +123,6 @@ use ActionDispatch::Flash use Rack::Head use Rack::ConditionalGet use Rack::ETag -use ActionView::Digestor::PerRequestDigestCacheExpiry run Rails.application.routes ``` From 73874a163f82dfb326c65a3e414d04b180b9074b Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 17 May 2016 22:46:07 -0400 Subject: [PATCH 06/15] Add tick marks + small grammar change [ci skip] --- guides/source/rails_application_templates.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/source/rails_application_templates.md b/guides/source/rails_application_templates.md index 3b773d84f8..3e99ee7021 100644 --- a/guides/source/rails_application_templates.md +++ b/guides/source/rails_application_templates.md @@ -15,14 +15,14 @@ After reading this guide, you will know: Usage ----- -To apply a template, you need to provide the Rails generator with the location of the template you wish to apply using the -m option. This can either be a path to a file or a URL. +To apply a template, you need to provide the Rails generator with the location of the template you wish to apply using the `-m` option. This can either be a path to a file or a URL. ```bash $ rails new blog -m ~/template.rb $ rails new blog -m http://example.com/template.rb ``` -You can use the task `app:template` to apply templates to an existing Rails application. The location of the template needs to be passed in to an environment variable named LOCATION. Again, this can either be path to a file or a URL. +You can use the `app:template` Rake task to apply templates to an existing Rails application. The location of the template needs to be passed in via the LOCATION environment variable. Again, this can either be path to a file or a URL. ```bash $ bin/rails app:template LOCATION=~/template.rb From 578ae253df4e122fe13232379cf0b5f34351834c Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Wed, 18 May 2016 09:07:01 -0400 Subject: [PATCH 07/15] Light grammar edits to beginning of Routing guide [ci skip] --- guides/source/routing.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/source/routing.md b/guides/source/routing.md index 81321c7405..756e0fefd7 100644 --- a/guides/source/routing.md +++ b/guides/source/routing.md @@ -9,16 +9,16 @@ After reading this guide, you will know: * How to interpret the code in `config/routes.rb`. * How to construct your own routes, using either the preferred resourceful style or the `match` method. -* What parameters to expect an action to receive. +* How to declare route parameters, which are passed onto controller actions. * How to automatically create paths and URLs using route helpers. -* Advanced techniques such as constraints and Rack endpoints. +* Advanced techniques such as creating constraints and mounting Rack endpoints. -------------------------------------------------------------------------------- The Purpose of the Rails Router ------------------------------- -The Rails router recognizes URLs and dispatches them to a controller's action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views. +The Rails router recognizes URLs and dispatches them to a controller's action, or to a Rack application. It can also generate paths and URLs, avoiding the need to hardcode strings in your views. ### Connecting URLs to Code From 644db8a8ed31c65249c66ac41ad8c3eb5f9a7671 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Thu, 19 May 2016 12:41:59 -0400 Subject: [PATCH 08/15] `routes.rb` --> `config/routes.rb` For consistency. [ci skip] --- actionpack/lib/action_dispatch/routing.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing.rb b/actionpack/lib/action_dispatch/routing.rb index 67f441dfec..337859feb1 100644 --- a/actionpack/lib/action_dispatch/routing.rb +++ b/actionpack/lib/action_dispatch/routing.rb @@ -89,7 +89,7 @@ module ActionDispatch # # Example: # - # # In routes.rb + # # In config/routes.rb # get '/login' => 'accounts#login', as: 'login' # # # With render, redirect_to, tests, etc. @@ -101,7 +101,7 @@ module ActionDispatch # # Use root as a shorthand to name a route for the root path "/". # - # # In routes.rb + # # In config/routes.rb # root to: 'blogs#index' # # # would recognize http://www.example.com/ as @@ -114,7 +114,7 @@ module ActionDispatch # Note: when using +controller+, the route is simply named after the # method you call on the block parameter rather than map. # - # # In routes.rb + # # In config/routes.rb # controller :blog do # get 'blog/show' => :list # get 'blog/delete' => :delete @@ -196,7 +196,7 @@ module ActionDispatch # # Rails.application.reload_routes! # - # This will clear all named routes and reload routes.rb if the file has been modified from + # This will clear all named routes and reload config/routes.rb if the file has been modified from # last load. To absolutely force reloading, use reload!. # # == Testing Routes From 9c0791b045f6e03b59246c42198cfc27c9ba2812 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 21 May 2016 11:16:52 -0400 Subject: [PATCH 09/15] Small grammar fixes for Action Controller Overview [ci skip] --- guides/source/action_controller_overview.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 848c9caa59..91d1549ef4 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -21,7 +21,7 @@ After reading this guide, you will know: What Does a Controller Do? -------------------------- -Action Controller is the C in MVC. After routing has determined which controller to use for a request, the controller is responsible for making sense of the request and producing the appropriate output. Luckily, Action Controller does most of the groundwork for you and uses smart conventions to make this as straightforward as possible. +Action Controller is the C in MVC. After the router has determined which controller to use for a request, the controller is responsible for making sense of the request and producing the appropriate output. Luckily, Action Controller does most of the groundwork for you and uses smart conventions to make this as straightforward as possible. For most conventional [RESTful](http://en.wikipedia.org/wiki/Representational_state_transfer) applications, the controller will receive the request (this is invisible to you as the developer), fetch or save data from a model and use a view to create HTML output. If your controller needs to do things a little differently, that's not a problem, this is just the most common way for a controller to work. @@ -145,7 +145,7 @@ So for example, if you are sending this JSON content: Your controller will receive `params[:company]` as `{ "name" => "acme", "address" => "123 Carrot Street" }`. -Also, if you've turned on `config.wrap_parameters` in your initializer or called `wrap_parameters` in your controller, you can safely omit the root element in the JSON parameter. In this case, the parameters will be cloned and wrapped with a key chosen based on your controller's name. So the above JSON POST can be written as: +Also, if you've turned on `config.wrap_parameters` in your initializer or called `wrap_parameters` in your controller, you can safely omit the root element in the JSON parameter. In this case, the parameters will be cloned and wrapped with a key chosen based on your controller's name. So the above JSON request can be written as: ```json { "name": "acme", "address": "123 Carrot Street" } @@ -199,7 +199,8 @@ practice to help prevent accidentally allowing users to update sensitive model attributes. In addition, parameters can be marked as required and will flow through a -predefined raise/rescue flow to end up as a 400 Bad Request. +predefined raise/rescue flow that will result in a 400 Bad Request being +returned if not all required parameters are passed in. ```ruby class PeopleController < ActionController::Base @@ -213,8 +214,8 @@ class PeopleController < ActionController::Base # This will pass with flying colors as long as there's a person key # in the parameters, otherwise it'll raise a # ActionController::ParameterMissing exception, which will get - # caught by ActionController::Base and turned into that 400 Bad - # Request reply. + # caught by ActionController::Base and turned into a 400 Bad + # Request error. def update person = current_account.people.find(params[:id]) person.update!(person_params) From 983fa3b29f8eb0846f1b5cb6b8aea5f07dfb5ecb Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 22 May 2016 21:44:31 +0800 Subject: [PATCH 10/15] Update i18n guide about how to change locale and translations paths [ci skip] - config/application.rb no longer has comments about how to specify load paths or change default locale after https://github.com/rails/rails/commit/28dcadc0140dfdeb. --- guides/source/i18n.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 0edfa072f8..92045e0647 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -109,12 +109,13 @@ The **translations load path** (`I18n.load_path`) is an array of paths to files NOTE: The backend lazy-loads these translations when a translation is looked up for the first time. This backend can be swapped with something else even after translations have already been announced. -The default `config/application.rb` file has instructions on how to add locales from another directory and how to set a different default locale. +You can change the default locale and also configure the translations load +paths in `config/application.rb` as follows: ```ruby -# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. -# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] -# config.i18n.default_locale = :de + config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] + + config.i18n.default_locale = :de ``` The load path must be specified before any translations are looked up. To change the default locale from an initializer instead of `config/application.rb`: From 1c030578d6fddbe37c7e8a35db7bfb37278d349e Mon Sep 17 00:00:00 2001 From: Vipul A M Date: Mon, 23 May 2016 18:51:52 -0700 Subject: [PATCH 11/15] - :scissors: space in code to match previous defaults. - Grammar edits. --- guides/source/i18n.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/guides/source/i18n.md b/guides/source/i18n.md index 92045e0647..f3802a142f 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -109,12 +109,10 @@ The **translations load path** (`I18n.load_path`) is an array of paths to files NOTE: The backend lazy-loads these translations when a translation is looked up for the first time. This backend can be swapped with something else even after translations have already been announced. -You can change the default locale and also configure the translations load -paths in `config/application.rb` as follows: +You can change the default locale as well as configure the translations load paths in `config/application.rb` as follows: ```ruby config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - config.i18n.default_locale = :de ``` From 3b1b957b6f1482ce260c8f4ecaad6e5b2bbd8316 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Fri, 27 May 2016 22:10:45 -0400 Subject: [PATCH 12/15] `behaviour` --> `behavior` http://edgeguides.rubyonrails.org/api_documentation_guidelines.html#english --- activesupport/lib/active_support/deprecation/behaviors.rb | 2 +- railties/lib/rails/application/finisher.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index dc24e2d0e1..35a9e5f8b8 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -2,7 +2,7 @@ require "active_support/notifications" module ActiveSupport # Raised when ActiveSupport::Deprecation::Behavior#behavior is set with :raise. - # You would set :raise, as a behaviour to raise errors and proactively report exceptions from deprecations. + # You would set :raise, as a behavior to raise errors and proactively report exceptions from deprecations. class DeprecationException < StandardError end diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb index 0aed6c1351..4e24640510 100644 --- a/railties/lib/rails/application/finisher.rb +++ b/railties/lib/rails/application/finisher.rb @@ -95,7 +95,7 @@ module Rails elsif config.allow_concurrency == :unsafe # Do nothing, even if we know this is dangerous. This is the - # historical behaviour for true. + # historical behavior for true. else # Default concurrency setting: enabled, but safe From 350b7b616233688b890c7374c613b9aa39b76897 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Sat, 28 May 2016 16:40:10 -0400 Subject: [PATCH 13/15] Light edits to Action Cable Overview guide [ci skip] --- guides/source/action_cable_overview.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md index 5cc280072e..cbd49dc8a5 100644 --- a/guides/source/action_cable_overview.md +++ b/guides/source/action_cable_overview.md @@ -84,7 +84,7 @@ The cookie is then automatically sent to the connection instance when a new conn is attempted, and you use that to set the `current_user`. By identifying the connection by this same current_user, you're also ensuring that you can later retrieve all open connections by a given user (and potentially disconnect them all if the user is deleted -or deauthorized). +or unauthorized). ### Channels @@ -138,7 +138,7 @@ end ### Connections Consumers require an instance of the connection on their side. This can be -established using the following Javascript, which is generated by default in Rails: +established using the following JavaScript, which is generated by default in Rails: #### Connect Consumer @@ -155,7 +155,7 @@ established using the following Javascript, which is generated by default in Rai }).call(this); ``` -This will ready a consumer that'll connect against /cable on your server by default. +This will ready a consumer that'll connect against `/cable` on your server by default. The connection won't be established until you've also specified at least one subscription you're interested in having. From f832ebf49692caeea3c405cbbfd795e6ccc05656 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 31 May 2016 10:47:34 -0400 Subject: [PATCH 14/15] `will be` --> `is` [ci skip] --- guides/source/action_view_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md index 0e6bb76101..f68abbae3c 100644 --- a/guides/source/action_view_overview.md +++ b/guides/source/action_view_overview.md @@ -15,7 +15,7 @@ After reading this guide, you will know: What is Action View? -------------------- -In Rails, web requests are handled by [Action Controller](action_controller_overview.html) and Action View. Typically, Action Controller will be concerned with communicating with the database and performing CRUD actions where necessary. Action View is then responsible for compiling the response. +In Rails, web requests are handled by [Action Controller](action_controller_overview.html) and Action View. Typically, Action Controller is concerned with communicating with the database and performing CRUD actions where necessary. Action View is then responsible for compiling the response. Action View templates are written using embedded Ruby in tags mingled with HTML. To avoid cluttering the templates with boilerplate code, a number of helper classes provide common behavior for forms, dates, and strings. It's also easy to add new helpers to your application as it evolves. From cf2158cbbf12a3a00c780ef5136f11b77c566713 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Thu, 2 Jun 2016 09:35:52 -0400 Subject: [PATCH 15/15] Grammar fixes for Contributing guide Not sure why #25239, but it had good changes, so I'm manually pulling in the changes. [Jon Moss, Rajat Bansal] [ci skip] --- guides/source/contributing_to_ruby_on_rails.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/guides/source/contributing_to_ruby_on_rails.md b/guides/source/contributing_to_ruby_on_rails.md index 59c902e148..49d5f5a555 100644 --- a/guides/source/contributing_to_ruby_on_rails.md +++ b/guides/source/contributing_to_ruby_on_rails.md @@ -25,7 +25,7 @@ Reporting an Issue Ruby on Rails uses [GitHub Issue Tracking](https://github.com/rails/rails/issues) to track issues (primarily bugs and contributions of new code). If you've found a bug in Ruby on Rails, this is the place to start. You'll need to create a (free) GitHub account in order to submit an issue, to comment on them or to create pull requests. -NOTE: Bugs in the most recent released version of Ruby on Rails are likely to get the most attention. Also, the Rails core team is always interested in feedback from those who can take the time to test _edge Rails_ (the code for the version of Rails that is currently under development). Later in this guide you'll find out how to get edge Rails for testing. +NOTE: Bugs in the most recent released version of Ruby on Rails are likely to get the most attention. Also, the Rails core team is always interested in feedback from those who can take the time to test _edge Rails_ (the code for the version of Rails that is currently under development). Later in this guide, you'll find out how to get edge Rails for testing. ### Creating a Bug Report @@ -58,7 +58,7 @@ WARNING: Please do not report security vulnerabilities with public GitHub issue Please don't put "feature request" items into GitHub Issues. If there's a new feature that you want to see added to Ruby on Rails, you'll need to write the code yourself - or convince someone else to partner with you to write the code. -Later in this guide you'll find detailed instructions for proposing a patch to +Later in this guide, you'll find detailed instructions for proposing a patch to Ruby on Rails. If you enter a wish list item in GitHub Issues with no code, you can expect it to be marked "invalid" as soon as it's reviewed. @@ -189,7 +189,7 @@ Contributing to the Rails Code ### Setting Up a Development Environment -To move on from submitting bugs to helping resolve existing issues or contributing your own code to Ruby on Rails, you _must_ be able to run its test suite. In this section of the guide you'll learn how to setup the tests on your own computer. +To move on from submitting bugs to helping resolve existing issues or contributing your own code to Ruby on Rails, you _must_ be able to run its test suite. In this section of the guide, you'll learn how to setup the tests on your own computer. #### The Easy Way @@ -299,9 +299,9 @@ Please see the benchmark/ips [README](https://github.com/evanphx/benchmark-ips/b ### Running Tests It is not customary in Rails to run the full test suite before pushing -changes. The railties test suite in particular takes a long time, and even -more if the source code is mounted in `/vagrant` as happens in the recommended -workflow with the [rails-dev-box](https://github.com/rails/rails-dev-box). +changes. The railties test suite in particular takes a long time, and takes an +especially long time if the source code is mounted in `/vagrant` as happens in +the recommended workflow with the [rails-dev-box](https://github.com/rails/rails-dev-box). As a compromise, test what your code obviously affects, and if the change is not in railties, run the whole test suite of the affected component. If all @@ -662,7 +662,7 @@ Changes that are merged into master are intended for the next major release of R For simple fixes, the easiest way to backport your changes is to [extract a diff from your changes in master and apply them to the target branch](http://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git). -First make sure your changes are the only difference between your current branch and master: +First, make sure your changes are the only difference between your current branch and master: ```bash $ git log master..HEAD