From a20b440bd22c1ca3a53962551724ea621813bdf7 Mon Sep 17 00:00:00 2001
From: Toshimaru Returns true if the given controller is capable of rendering a path. A subclass of Returns true if the given controller is capable of rendering a path. A subclass of Given a key (as described in Given a key (as described in Check if a cached fragment from the location signified by Check if a cached fragment from the location signified by Reads a cached fragment from the location signified by Reads a cached fragment from the location signified by Writes Writes Normalizes arguments and options, and then delegates to Supported options depend on the underlying Supported options depend on the underlying In this example, the subscribed and unsubscribed methods are not callable methods, as they were already declared in In this example, the subscribed and unsubscribed methods are not callable methods, as they were already declared in Also note that in this example, Stub Stub Returns the name of the channel, underscored, without the Returns the name of the channel, underscored, without the An An instance of the current channel, created when you call A list of all messages that have been transmitted into the channel. Represents a single remote connection found via Represents a single remote connection found via
Returns
@@ -415,7 +415,7 @@ String
AbstractController::Base may return false. An Email controller for example does not support paths, only full URLs.AbstractController::Base may return false. An Email controller for example does not support paths, only full URLs.
Parameters
diff --git a/src/7.1/classes/AbstractController/Caching/Fragments.html b/src/7.1/classes/AbstractController/Caching/Fragments.html
index d6ae7dc0c1..228e431ec1 100644
--- a/src/7.1/classes/AbstractController/Caching/Fragments.html
+++ b/src/7.1/classes/AbstractController/Caching/Fragments.html
@@ -108,7 +108,7 @@ action_name - The name of an action to be testedaction_name - The name of an action to be tested
expire_fragment), returns a key array suitable for use in reading, writing, or expiring a cached fragment. All keys begin with :views, followed by ENV["RAILS_CACHE_ID"] or ENV["RAILS_APP_VERSION"] if set, followed by any controller-wide key prefix values, ending with the specified key value.expire_fragment), returns a key array suitable for use in reading, writing, or expiring a cached fragment. All keys begin with :views, followed by ENV["RAILS_CACHE_ID"] or ENV["RAILS_APP_VERSION"] if set, followed by any controller-wide key prefix values, ending with the specified key value.
key exists (see expire_fragment for acceptable formats).key exists (see expire_fragment for acceptable formats).
key (see expire_fragment for acceptable formats).key (see expire_fragment for acceptable formats).
content to the location signified by key (see expire_fragment for acceptable formats).content to the location signified by key (see expire_fragment for acceptable formats).
render_to_body and sticks the result in self.response_body.render_to_body implementation.render_to_body implementation.Action process
end
-
ActionCable::Channel::Base, but #appear and #away are. #generate_connection_token is also not callable, since it’s a private method. You’ll see that appear accepts a data parameter, which it then uses as part of its model call. #away does not, since it’s simply a trigger action.ActionCable::Channel::Base, but appear and away are. generate_connection_token is also not callable, since it’s a private method. You’ll see that appear accepts a data parameter, which it then uses as part of its model call. away does not, since it’s simply a trigger action.current_user is available because it was marked as an identifying attribute on the connection. All such identifiers will automatically create a delegation method of the same name on the channel instance.
Action Cable Channel Stub
-stream_from to track streams for the channel. Add public aliases for subscription_confirmation_sent? and subscription_rejected?.stream_from to track streams for the channel. Add public aliases for subscription_confirmation_sent? and subscription_rejected?.
Channel ending. If the channel is in a namespace, then the namespaces are represented by single colon separators in the channel name.Channel ending. If the channel is in a namespace, then the namespaces are represented by single colon separators in the channel name.ChatChannel.channel_name # => 'chat'
Chats::AppearancesChannel.channel_name # => 'chats:appearances'
diff --git a/src/7.1/classes/ActionCable/Channel/TestCase.html b/src/7.1/classes/ActionCable/Channel/TestCase.html
index 40140b8cf4..c0b76fcb42 100644
--- a/src/7.1/classes/ActionCable/Channel/TestCase.html
+++ b/src/7.1/classes/ActionCable/Channel/TestCase.html
@@ -88,13 +88,13 @@ Basic example<
Special methods
ActionCable::Channel::TestCase will also automatically provide the following instance methods for use in the tests:
diff --git a/src/7.1/classes/ActionCable/RemoteConnections/RemoteConnection.html b/src/7.1/classes/ActionCable/RemoteConnections/RemoteConnection.html
index 5f03631149..1e77156101 100644
--- a/src/7.1/classes/ActionCable/RemoteConnections/RemoteConnection.html
+++ b/src/7.1/classes/ActionCable/RemoteConnections/RemoteConnection.html
@@ -31,7 +31,7 @@ ActionCable::Channel::ConnectionStub, representing the current HTTP connection.subscribe.
Action Cable Remote Connection
-ActionCable.server.remote_connections.where(*). Exists solely for the purpose of calling disconnect on that connection.ActionCable.server.remote_connections.where(*). Exists solely for the purpose of calling disconnect on that connection.Test adapter extends the ActionCable::SubscriptionAdapter::Async adapter, so it could be used in system tests too.
An API Controller is different from a normal controller in the sense that by default it doesn’t include a number of features that are usually required by browser access only: layouts and templates rendering, flash, assets, and so on. This makes the entire controller stack thinner, suitable for API applications. It doesn’t mean you won’t have such features if you need them: they’re all available for you to include in your application, they’re just not part of the default API controller stack.
Normally, ApplicationController is the only controller that inherits from ActionController::API. All other controllers in turn inherit from ApplicationController.
Normally, ApplicationController is the only controller that inherits from ActionController::API. All other controllers in turn inherit from ApplicationController.
A sample controller could look like this:
@@ -71,7 +71,7 @@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 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:
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 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
@@ -89,7 +89,7 @@ Adding New Behavi
end
-Make sure to check the modules included in ActionController::Base if you want to use any other functionality that is not provided by ActionController::API out of the box.
Make sure to check the modules included in ActionController::Base if you want to use any other functionality that is not provided by ActionController::API out of the box.
Action Controllers are the core of a web request in Rails. They are made up of one or more actions that are executed on request and then either it renders a template or redirects to another action. An action is defined as a public method on the controller, which will automatically be made accessible to the web-server through Rails Routes.
-By default, only the ApplicationController in a Rails application inherits from ActionController::Base. All other controllers inherit from ApplicationController. This gives you one class to configure things such as request forgery protection and filtering of sensitive request parameters.
By default, only the ApplicationController in a Rails application inherits from ActionController::Base. All other controllers inherit from ApplicationController. This gives you one class to configure things such as request forgery protection and filtering of sensitive request parameters.
A sample controller could look like this:
diff --git a/src/7.1/classes/ActionController/ConditionalGet.html b/src/7.1/classes/ActionController/ConditionalGet.html index e2c8415d59..ee31ee50cd 100644 --- a/src/7.1/classes/ActionController/ConditionalGet.html +++ b/src/7.1/classes/ActionController/ConditionalGet.html @@ -113,21 +113,21 @@Sets the Cache-Control header, overwriting existing directives. This method will also ensure an HTTP Date header for client compatibility.
Sets the Cache-Control header, overwriting existing directives. This method will also ensure an HTTP Date header for client compatibility.
Defaults to issuing the private directive, so that intermediate caches must not cache the response.
:public
+:publicIf true, replaces the default private directive with the public directive.
:must_revalidate
+:must_revalidateIf true, adds the must-revalidate directive.
:stale_while_revalidate
+:stale_while_revalidateSets the value of the stale-while-revalidate directive.
:stale_if_error
+:stale_if_errorSets the value of the stale-if-error directive.
Sets the etag, last_modified, or both on the response, and renders a 304 Not Modified response if the request is already fresh.
:etag
+:etagSets a “weak” ETag validator on the response. See the :weak_etag option.
:weak_etag
+:weak_etagSets a “weak” ETag validator on the response. Requests that specify an If-None-Match header may receive a 304 Not Modified response if the ETag matches exactly.
A weak ETag indicates semantic equivalence, not byte-for-byte equality, so they’re good for caching HTML pages in browser caches. They can’t be used for responses that must be byte-identical, like serving Range requests within a PDF file.
:strong_etag
+A weak ETag indicates semantic equivalence, not byte-for-byte equality, so they’re good for caching HTML pages in browser caches. They can’t be used for responses that must be byte-identical, like serving Range requests within a PDF file.
:strong_etagSets a “strong” ETag validator on the response. Requests that specify an If-None-Match header may receive a 304 Not Modified response if the ETag matches exactly.
A strong ETag implies exact equality – the response must match byte for byte. This is necessary for serving Range requests within a large video or PDF file, for example, or for compatibility with some CDNs that don’t support weak ETags.
:last_modified
+A strong ETag implies exact equality – the response must match byte for byte. This is necessary for serving Range requests within a large video or PDF file, for example, or for compatibility with some CDNs that don’t support weak ETags.
:last_modifiedSets a “weak” last-update validator on the response. Subsequent requests that specify an If-Modified-Since header may receive a 304 Not Modified response if last_modified <= If-Modified-Since.
:public
+:publicBy default the Cache-Control header is private. Set this option to true if you want your application to be cacheable by other devices, such as proxy caches.
:cache_control
+:cache_controlWhen given, will overwrite an existing Cache-Control header. For a list of Cache-Control directives, see the article on MDN.
:template
+:templateBy default, the template digest for the current controller/action is included in ETags. If the action renders a different template, you can include its digest instead. If the action doesn’t render a template at all, you can pass template: false to skip any attempt to check for a template digest.
:filename - suggests a filename for the browser to use.
:type - specifies an HTTP content type. Defaults to application/octet-stream. You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. If omitted, type will be inferred from the file extension specified in :filename. If no content type is registered for the extension, the default type application/octet-stream will be used.
:type - specifies an HTTP content type. Defaults to application/octet-stream. You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. If omitted, type will be inferred from the file extension specified in :filename. If no content type is registered for the extension, the default type application/octet-stream will be used.
:disposition - specifies whether the file will be shown inline or downloaded. Valid values are "inline" and "attachment" (default).
send_data image.data, type: image.content_type, disposition: 'inline'
-See send_file for more information on HTTP Content-* headers and caching.
See send_file for more information on HTTP Content-* headers and caching.
:filename - suggests a filename for the browser to use. Defaults to File.basename(path).
:type - specifies an HTTP content type. You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. If omitted, the type will be inferred from the file extension specified in :filename. If no content type is registered for the extension, the default type application/octet-stream will be used.
:type - specifies an HTTP content type. You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. If omitted, the type will be inferred from the file extension specified in :filename. If no content type is registered for the extension, the default type application/octet-stream will be used.
:disposition - specifies whether the file will be shown inline or downloaded. Valid values are "inline" and "attachment" (default).
The Rails framework provides a large number of helpers for working with assets, dates, forms, numbers and model objects, to name a few. These helpers are available to all templates by default.
-In addition to using the standard template helpers provided, creating custom helpers to extract complicated logic or reusable functionality is strongly encouraged. By default, each controller will include all helpers. These helpers are only accessible on the controller through #helpers
In addition to using the standard template helpers provided, creating custom helpers to extract complicated logic or reusable functionality is strongly encouraged. By default, each controller will include all helpers. These helpers are only accessible on the controller through helpers
In previous versions of Rails the controller will include a helper which matches the name of the controller, e.g., MyController will automatically include MyHelper. You can revert to the old behavior with the following:
Takes raw_params and turns it into an array of parameters.
Takes raw_params and turns it into an array of parameters.
This method takes an authorization body and splits up the key-value pairs by the standardized :, ;, or \t delimiters defined in AUTHN_PAIR_DELIMITERS.
This method takes an authorization body and splits up the key-value pairs by the standardized :, ;, or \t delimiters defined in AUTHN_PAIR_DELIMITERS.
Then the returned token is "abc", and the options are {nonce: "def"}.
Returns an Array of [String, Hash] if a token is present. Returns nil if no token is found.
Returns an Array of [String, Hash] if a token is present. Returns nil if no token is found.
Parameters:filename - suggests a filename for the browser to use.
:type - specifies an HTTP content type. You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. If omitted, type will be inferred from the file extension specified in :filename. If no content type is registered for the extension, the default type ‘application/octet-stream’ will be used.
:type - specifies an HTTP content type. You can specify either a string or a symbol for a registered type with Mime::Type.register, for example :json. If omitted, type will be inferred from the file extension specified in :filename. If no content type is registered for the extension, the default type ‘application/octet-stream’ will be used.
:disposition - specifies whether the file will be shown inline or downloaded. Valid values are ‘inline’ and ‘attachment’ (default).
ActionController::Metal is the simplest possible controller, providing a valid Rack interface without the additional niceties provided by ActionController::Base.
ActionController::Metal is the simplest possible controller, providing a valid Rack interface without the additional niceties provided by ActionController::Base.
A sample metal controller might look like this:
@@ -53,7 +53,7 @@ActionController::Metal by default provides no utilities for rendering views, partials, or other responses aside from explicitly calling of response_body=, content_type=, and status=. To add the render helpers you’re used to having in a normal controller, you can do the following:
ActionController::Metal by default provides no utilities for rendering views, partials, or other responses aside from explicitly calling of response_body=, content_type=, and status=. To add the render helpers you’re used to having in a normal controller, you can do the following:
class HelloController < ActionController::Metal
include AbstractController::Rendering
diff --git a/src/7.1/classes/ActionController/MimeResponds.html b/src/7.1/classes/ActionController/MimeResponds.html
index ad17ef7b0a..438696980e 100644
--- a/src/7.1/classes/ActionController/MimeResponds.html
+++ b/src/7.1/classes/ActionController/MimeResponds.html
@@ -177,7 +177,7 @@
Mime::Type.register "image/jpeg", :jpg
-
respond_to also allows you to specify a common block for different formats by using any:
+respond_to also allows you to specify a common block for different formats by using any:
def index
@people = Person.all
diff --git a/src/7.1/classes/ActionController/Parameters.html b/src/7.1/classes/ActionController/Parameters.html
index 85e7e3bb33..c702a891b1 100644
--- a/src/7.1/classes/ActionController/Parameters.html
+++ b/src/7.1/classes/ActionController/Parameters.html
@@ -57,7 +57,7 @@ A
-
false to take no action.
-
-
:log to emit an ActiveSupport::Notifications.instrument event on the unpermitted_parameters.action_controller topic and log at the DEBUG level.
+:log to emit an ActiveSupport::Notifications.instrument event on the unpermitted_parameters.action_controller topic and log at the DEBUG level.
-
:raise to raise an ActionController::UnpermittedParameters exception.
@@ -86,7 +86,7 @@ A
Please note that these options *are not thread-safe*. In a multi-threaded environment they should only be set once at boot-time and never mutated at runtime.
-You can fetch values of ActionController::Parameters using either :key or "key".
+You can fetch values of ActionController::Parameters using either :key or "key".
params = ActionController::Parameters.new(key: "value")
params[:key] # => "value"
@@ -481,7 +481,7 @@
- Returns a new ActionController::Parameters instance. Also, sets the permitted attribute to the default value of ActionController::Parameters.permit_all_parameters.
+ Returns a new ActionController::Parameters instance. Also, sets the permitted attribute to the default value of ActionController::Parameters.permit_all_parameters.
class Person < ActiveRecord::Base
end
@@ -542,7 +542,7 @@
- Returns true if another Parameters object contains the same content and permitted flag.
+ Returns true if another Parameters object contains the same content and permitted flag.
@@ -693,7 +693,7 @@
- Returns a new ActionController::Parameters instance with nil values removed.
+ Returns a new ActionController::Parameters instance with nil values removed.
@@ -763,7 +763,7 @@
- Returns a new ActionController::Parameters instance without the blank values. Uses Object#blank? for determining if a value is blank.
+ Returns a new ActionController::Parameters instance without the blank values. Uses Object#blank? for determining if a value is blank.
@@ -870,7 +870,7 @@
- Returns a duplicate ActionController::Parameters instance with the same permitted parameters.
+ Returns a duplicate ActionController::Parameters instance with the same permitted parameters.
@@ -908,7 +908,7 @@
- Returns a new ActionController::Parameters instance with self and other_hash merged recursively.
+ Returns a new ActionController::Parameters instance with self and other_hash merged recursively.
Like with Hash#merge in the standard library, a block can be provided to merge values.
@@ -934,7 +934,7 @@
- Same as #deep_merge, but modifies self.
+ Same as deep_merge, but modifies self.
@@ -957,7 +957,7 @@
- Returns a new ActionController::Parameters instance with the results of running block once for every key. This includes the keys from the root hash and from all nested hashes and arrays. The values are unchanged.
+ Returns a new ActionController::Parameters instance with the results of running block once for every key. This includes the keys from the root hash and from all nested hashes and arrays. The values are unchanged.
@@ -994,7 +994,7 @@
- Returns the same ActionController::Parameters instance with changed keys. This includes the keys from the root hash and from all nested hashes and arrays. The values are unchanged.
+ Returns the same ActionController::Parameters instance with changed keys. This includes the keys from the root hash and from all nested hashes and arrays. The values are unchanged.
@@ -1030,7 +1030,7 @@
- Deletes a key-value pair from Parameters and returns the value. If key is not found, returns nil (or, with optional code block, yields key and returns the result). This method is similar to extract!, which returns the corresponding ActionController::Parameters object.
+ Deletes a key-value pair from Parameters and returns the value. If key is not found, returns nil (or, with optional code block, yields key and returns the result). This method is similar to extract!, which returns the corresponding ActionController::Parameters object.
@@ -1328,7 +1328,7 @@
- Returns a new ActionController::Parameters instance that filters out the given keys.
+ Returns a new ActionController::Parameters instance that filters out the given keys.
params = ActionController::Parameters.new(a: 1, b: 2, c: 3)
params.except(:a, :b) # => #<ActionController::Parameters {"c"=>3} permitted: false>
@@ -1483,7 +1483,7 @@
- Returns a parameter for the given key. If the key can’t be found, there are several options: With no other arguments, it will raise an ActionController::ParameterMissing error; if a second argument is given, then that is returned (converted to an instance of ActionController::Parameters if possible); if a block is given, then that will be run and its result returned.
+ Returns a parameter for the given key. If the key can’t be found, there are several options: With no other arguments, it will raise an ActionController::ParameterMissing error; if a second argument is given, then that is returned (converted to an instance of ActionController::Parameters if possible); if a block is given, then that will be run and its result returned.
params = ActionController::Parameters.new(person: { name: "Francesco" })
params.fetch(:person) # => #<ActionController::Parameters {"name"=>"Francesco"} permitted: false>
@@ -1794,7 +1794,7 @@
- Returns a new ActionController::Parameters instance with all keys from other_hash merged into current hash.
+ Returns a new ActionController::Parameters instance with all keys from other_hash merged into current hash.
@@ -1832,7 +1832,7 @@
- Returns the current ActionController::Parameters instance with other_hash merged into current hash.
+ Returns the current ActionController::Parameters instance with other_hash merged into current hash.
@@ -1868,7 +1868,7 @@
- Returns a new ActionController::Parameters instance that includes only the given filters and sets the permitted attribute for the object to true. This is useful for limiting which attributes should be allowed for mass updating.
+ Returns a new ActionController::Parameters instance that includes only the given filters and sets the permitted attribute for the object to true. This is useful for limiting which attributes should be allowed for mass updating.
params = ActionController::Parameters.new(user: { name: "Francesco", age: 22, role: "admin" })
permitted = params.require(:user).permit(:name, :age)
@@ -1883,7 +1883,7 @@
params.permit(:name)
-
:name passes if it is a key of params whose associated value is of type String, Symbol, NilClass, Numeric, TrueClass, FalseClass, Date, Time, DateTime, StringIO, IO, ActionDispatch::Http::UploadedFile or Rack::Test::UploadedFile. Otherwise, the key :name is filtered out.
+:name passes if it is a key of params whose associated value is of type String, Symbol, NilClass, Numeric, TrueClass, FalseClass, Date, Time, DateTime, StringIO, IO, ActionDispatch::Http::UploadedFile or Rack::Test::UploadedFile. Otherwise, the key :name is filtered out.
You may declare that the parameter should be an array of permitted scalars by mapping it to an empty array:
@@ -2116,7 +2116,7 @@
- Returns a new ActionController::Parameters instance with items that the block evaluates to true removed.
+ Returns a new ActionController::Parameters instance with items that the block evaluates to true removed.
@@ -2313,7 +2313,7 @@
- Returns a new ActionController::Parameters instance with all keys from current hash merged into other_hash.
+ Returns a new ActionController::Parameters instance with all keys from current hash merged into other_hash.
@@ -2354,7 +2354,7 @@
- Returns the current ActionController::Parameters instance with current hash merged into other_hash.
+ Returns the current ActionController::Parameters instance with current hash merged into other_hash.
@@ -2394,7 +2394,7 @@
- Returns a new ActionController::Parameters instance with only items that the block evaluates to true.
+ Returns a new ActionController::Parameters instance with only items that the block evaluates to true.
@@ -2469,7 +2469,7 @@
- Returns a new ActionController::Parameters instance that includes only the given keys. If the given keys don’t exist, returns an empty hash.
+ Returns a new ActionController::Parameters instance that includes only the given keys. If the given keys don’t exist, returns an empty hash.
params = ActionController::Parameters.new(a: 1, b: 2, c: 3)
params.slice(:a, :b) # => #<ActionController::Parameters {"a"=>1, "b"=>2} permitted: false>
@@ -2509,7 +2509,7 @@
- Returns the current ActionController::Parameters instance which contains only the given keys.
+ Returns the current ActionController::Parameters instance which contains only the given keys.
@@ -2595,7 +2595,7 @@
- Returns a safe Hash representation of the parameters with all unpermitted keys removed.
+ Returns a safe Hash representation of the parameters with all unpermitted keys removed.
params = ActionController::Parameters.new({
name: "Senjougahara Hitagi",
@@ -2838,7 +2838,7 @@
- Returns a new ActionController::Parameters instance with the results of running block once for every key. The values are unchanged.
+ Returns a new ActionController::Parameters instance with the results of running block once for every key. The values are unchanged.
@@ -2876,7 +2876,7 @@
- Performs keys transformation and returns the altered ActionController::Parameters instance.
+ Performs keys transformation and returns the altered ActionController::Parameters instance.
@@ -2913,7 +2913,7 @@
- Returns a new ActionController::Parameters instance with the results of running block once for every value. The keys are unchanged.
+ Returns a new ActionController::Parameters instance with the results of running block once for every value. The keys are unchanged.
params = ActionController::Parameters.new(a: 1, b: 2, c: 3)
params.transform_values { |x| x * 2 }
@@ -2956,7 +2956,7 @@
- Performs values transformation and returns the altered ActionController::Parameters instance.
+ Performs values transformation and returns the altered ActionController::Parameters instance.
@@ -3053,7 +3053,7 @@
- Returns values that were assigned to the given keys. Note that all the Hash objects will be converted to ActionController::Parameters.
+ Returns values that were assigned to the given keys. Note that all the Hash objects will be converted to ActionController::Parameters.
diff --git a/src/7.1/classes/ActionController/ParamsWrapper.html b/src/7.1/classes/ActionController/ParamsWrapper.html
index 84993ccb10..1d4b84c8cb 100644
--- a/src/7.1/classes/ActionController/ParamsWrapper.html
+++ b/src/7.1/classes/ActionController/ParamsWrapper.html
@@ -41,7 +41,7 @@ ParamsWrapper for :json format, instead of having to send JSON parameters like this:
{"user": {"name": "Konata"}}
@@ -65,7 +65,7 @@ ActiveModel object (such as User.new(params[:user])), you might consider passing the model class to the method instead. The ParamsWrapper will actually try to determine the list of attribute names from the model and only wrap those attributes:
class UsersController < ApplicationController
wrap_parameters Person
@@ -74,7 +74,7 @@ ParamsWrapper will actually try to determine if there’s a model related to it or not. This controller, for example:
class Admin::UsersController < ApplicationController
end
diff --git a/src/7.1/classes/ActionController/ParamsWrapper/Options/ClassMethods.html b/src/7.1/classes/ActionController/ParamsWrapper/Options/ClassMethods.html
index 9f4c3e23bb..8781b887da 100644
--- a/src/7.1/classes/ActionController/ParamsWrapper/Options/ClassMethods.html
+++ b/src/7.1/classes/ActionController/ParamsWrapper/Options/ClassMethods.html
@@ -149,7 +149,7 @@
- Sets the name of the wrapper key, or the model which ParamsWrapper would use to determine the attribute names from.
+ Sets the name of the wrapper key, or the model which ParamsWrapper would use to determine the attribute names from.
Examples
diff --git a/src/7.1/classes/ActionController/Redirecting.html b/src/7.1/classes/ActionController/Redirecting.html
index b61bf722b7..d3bd58192e 100644
--- a/src/7.1/classes/ActionController/Redirecting.html
+++ b/src/7.1/classes/ActionController/Redirecting.html
@@ -213,15 +213,15 @@
Redirects the browser to the target specified in options. This parameter can be any one of:
-
-
Hash - The URL will be generated by calling url_for with the options.
+Hash - The URL will be generated by calling url_for with the options.
-
Record - The URL will be generated by calling url_for with the options, which will reference a named URL for that record.
-
-
String starting with protocol:// (like http://) or a protocol relative reference (like //) - Is passed straight through as the target for redirection.
+String starting with protocol:// (like http://) or a protocol relative reference (like //) - Is passed straight through as the target for redirection.
-
-
String not containing a protocol - The current protocol and host is prepended to the string.
+String not containing a protocol - The current protocol and host is prepended to the string.
-
-
Proc - A block that will be executed in the controller’s context. Should return any option accepted by redirect_to.
+Proc - A block that will be executed in the controller’s context. Should return any option accepted by redirect_to.
Examples
@@ -258,7 +258,7 @@ Examples
redirect_to({ action: 'atom' }, alert: "Something serious happened")
-Statements after redirect_to in our controller get executed, so redirect_to doesn’t stop the execution of the function. To terminate the execution of the function immediately after the redirect_to, use return.
+Statements after redirect_to in our controller get executed, so redirect_to doesn’t stop the execution of the function. To terminate the execution of the function immediately after the redirect_to, use return.
redirect_to post_url(@post) and return
@@ -344,7 +344,7 @@
url_from("https://dev.example.com/profile") # => nil
-
NOTE: there’s a similarity with url_for, which generates an internal URL from various options from within the app, e.g. url_for(@post). However, url_from is meant to take an external parameter to verify as in url_from(params[:redirect_url]).
+NOTE: there’s a similarity with url_for, which generates an internal URL from various options from within the app, e.g. post) at url_for(. However, url_from is meant to take an external parameter to verify as in url_from(params[:redirect_url]).
diff --git a/src/7.1/classes/ActionController/Renderer.html b/src/7.1/classes/ActionController/Renderer.html
index e8c5464474..84cbc677a8 100644
--- a/src/7.1/classes/ActionController/Renderer.html
+++ b/src/7.1/classes/ActionController/Renderer.html
@@ -217,7 +217,7 @@ Parameter
defaults - Default values for the Rack env. Entries are specified in the same format as env. env will be merged on top of these values. defaults will be retained when calling new on a renderer instance.
-If no http_host is specified, the env HTTP host will be derived from the routes’ default_url_options. In this case, the https boolean and the script_name will also be derived from default_url_options if they were not specified. Additionally, the https boolean will fall back to Rails.application.config.force_ssl if default_url_options does not specify a protocol.
+If no http_host is specified, the env HTTP host will be derived from the routes’ default_url_options. In this case, the https boolean and the script_name will also be derived from default_url_options if they were not specified. Additionally, the https boolean will fall back to Rails.application.config.force_ssl if default_url_options does not specify a protocol.
diff --git a/src/7.1/classes/ActionController/Renderers.html b/src/7.1/classes/ActionController/Renderers.html
index fced56d31e..f9f8ee4fc3 100644
--- a/src/7.1/classes/ActionController/Renderers.html
+++ b/src/7.1/classes/ActionController/Renderers.html
@@ -161,7 +161,7 @@
end
-
Note that we used Mime for the csv mime type as it comes with Rails. For a custom renderer, you’ll need to register a mime type with Mime::Type.register.
+Note that we used Mime for the csv mime type as it comes with Rails. For a custom renderer, you’ll need to register a mime type with Mime::Type.register.
To use the csv renderer in a controller action:
@@ -298,7 +298,7 @@
Called by render in AbstractController::Rendering which sets the return value as the response_body.
-If no renderer is found, super returns control to ActionView::Rendering.render_to_body, if present.
+If no renderer is found, super returns control to ActionView::Rendering.render_to_body, if present.
diff --git a/src/7.1/classes/ActionController/Renderers/ClassMethods.html b/src/7.1/classes/ActionController/Renderers/ClassMethods.html
index a408c45809..96ec963195 100644
--- a/src/7.1/classes/ActionController/Renderers/ClassMethods.html
+++ b/src/7.1/classes/ActionController/Renderers/ClassMethods.html
@@ -103,7 +103,7 @@
Since ActionController::Metal controllers cannot render, the controller must include AbstractController::Rendering, ActionController::Rendering, and ActionController::Renderers, and have at least one renderer.
-Rather than including ActionController::Renderers::All and including all renderers, you may specify which renderers to include by passing the renderer name or names to use_renderers. For example, a controller that includes only the :json renderer (_render_with_renderer_json) might look like:
+Rather than including ActionController::Renderers::All and including all renderers, you may specify which renderers to include by passing the renderer name or names to use_renderers. For example, a controller that includes only the :json renderer (_render_with_renderer_json) might look like:
class MetalRenderingController < ActionController::Metal
include AbstractController::Rendering
@@ -118,7 +118,7 @@
end
-You must specify a use_renderer, else the controller.renderer and controller._renderers will be nil, and the action will fail.
+You must specify a use_renderer, else the controller.renderer and controller._renderers will be nil, and the action will fail.
diff --git a/src/7.1/classes/ActionController/Rendering.html b/src/7.1/classes/ActionController/Rendering.html
index ac02d45f37..1a02736c1b 100644
--- a/src/7.1/classes/ActionController/Rendering.html
+++ b/src/7.1/classes/ActionController/Rendering.html
@@ -111,21 +111,21 @@
If the first argument responds to render_in, the template will be rendered by calling render_in with the current view context.
Rendering Mode
-:partial
+:partial
-
See ActionView::PartialRenderer for details.
render partial: "posts/form", locals: { post: Post.new }
# => renders app/views/posts/_form.html.erb
- :file
+:file
-
Renders the contents of a file. This option should not be used with unsanitized user input.
render file: "/path/to/some/file"
# => renders /path/to/some/file
- :inline
+:inline
-
Renders an ERB template string.
@@ -133,21 +133,21 @@ Rendering Mode
render inline: "<h1>Hello, <%= @name %>!</h1>"
# => renders "<h1>Hello, World!</h1>"
-:body
+:body
-
Renders the provided text, and sets the content type as text/plain.
render body: "Hello, World!"
# => renders "Hello, World!"
- :plain
+:plain
-
Renders the provided text, and sets the content type as text/plain.
render plain: "Hello, World!"
# => renders "Hello, World!"
- :html
+:html
-
Renders the provided HTML string, and sets the content type as text/html. If the string is not html_safe?, performs HTML escaping on the string before rendering.
@@ -157,7 +157,7 @@ Rendering Mode
render html: "<h1>Hello, World!</h1>"
# => renders "<h1>Hello, World!</h1>"
- :json
+:json
-
Renders the provided object as JSON, and sets the content type as application/json. If the object is not a string, it will be converted to JSON by calling to_json.
@@ -169,21 +169,21 @@ Rendering Mode
By default, when a rendering mode is specified, no layout template is rendered.
Options
-:assigns
+:assigns
-
Hash of instance variable assignments for the template.
render inline: "<h1>Hello, <%= @name %>!</h1>", assigns: { name: "World" }
# => renders "<h1>Hello, World!</h1>"
- :locals
+
:locals
-
Hash of local variable assignments for the template.
render inline: "<h1>Hello, <%= name %>!</h1>", locals: { name: "World" }
# => renders "<h1>Hello, World!</h1>"
- :layout
+:layout
-
The layout template to render. Can also be false or true to disable or (re)enable the default layout template.
@@ -196,7 +196,7 @@ Options
render inline: "<h1>Hello, World!</h1>", layout: true
# => renders "<h1>Hello, World!</h1>" with the default layout
- :status
+:status
-
The HTTP status code to send with the response. Can be specified as a number or as the status name in Symbol form. Defaults to 200.
diff --git a/src/7.1/classes/ActionController/RequestForgeryProtection.html b/src/7.1/classes/ActionController/RequestForgeryProtection.html
index 249b453cee..f27f311f0a 100644
--- a/src/7.1/classes/ActionController/RequestForgeryProtection.html
+++ b/src/7.1/classes/ActionController/RequestForgeryProtection.html
@@ -715,7 +715,7 @@
- If the verify_authenticity_token before_action ran, verify that JavaScript responses are only served to same-origin GET requests.
+ If the verify_authenticity_token before_action ran, verify that JavaScript responses are only served to same-origin GET requests.
@@ -1277,7 +1277,7 @@
- If verify_authenticity_token was run (indicating that we have forgery protection enabled for this request) then also verify that we aren’t serving an unauthorized cross-origin response.
+ If verify_authenticity_token was run (indicating that we have forgery protection enabled for this request) then also verify that we aren’t serving an unauthorized cross-origin response.
diff --git a/src/7.1/classes/ActionController/TestCase.html b/src/7.1/classes/ActionController/TestCase.html
index cf50f0b609..3724047337 100644
--- a/src/7.1/classes/ActionController/TestCase.html
+++ b/src/7.1/classes/ActionController/TestCase.html
@@ -76,13 +76,13 @@ Basic example
Special instance variables
ActionController::TestCase will also automatically provide the following instance variables for use in the tests:
-- @controller
+
- @controller
-
The controller instance that will be tested.
- - @request
+
- @request
-
An ActionController::TestRequest, representing the current HTTP request. You can modify this object before sending the HTTP request. For example, you might want to set some session properties before sending a GET request.
- - @response
+
- @response
-
An ActionDispatch::TestResponse object, representing the response of the last HTTP response. In the above example, @response becomes valid after calling post. If the various assert methods are not sufficient, then you may use this object to inspect the HTTP response in detail.
diff --git a/src/7.1/classes/ActionController/TestCase/Behavior/ClassMethods.html b/src/7.1/classes/ActionController/TestCase/Behavior/ClassMethods.html
index 2ac9525abc..8f3dde5a36 100644
--- a/src/7.1/classes/ActionController/TestCase/Behavior/ClassMethods.html
+++ b/src/7.1/classes/ActionController/TestCase/Behavior/ClassMethods.html
@@ -189,7 +189,7 @@
- Sets the controller class name. Useful if the name can’t be inferred from test class. Normalizes controller_class before using.
+ Sets the controller class name. Useful if the name can’t be inferred from test class. Normalizes controller_class before using.
tests WidgetController
tests :widget
diff --git a/src/7.1/classes/ActionDispatch/Assertions/RoutingAssertions.html b/src/7.1/classes/ActionDispatch/Assertions/RoutingAssertions.html
index 14f7316f25..c048546ac5 100644
--- a/src/7.1/classes/ActionDispatch/Assertions/RoutingAssertions.html
+++ b/src/7.1/classes/ActionDispatch/Assertions/RoutingAssertions.html
@@ -101,7 +101,7 @@
- Asserts that the provided options can be used to generate the provided path. This is the inverse of assert_recognizes. The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures.
+ Asserts that the provided options can be used to generate the provided path. This is the inverse of assert_recognizes. The extras parameter is used to tell the request the names and values of additional request parameters that would be in a query string. The message parameter allows you to specify a custom error message for assertion failures.
The defaults parameter is unused.
@@ -248,7 +248,7 @@
- Asserts that path and options match both ways; in other words, it verifies that path generates options and then that options generates path. This essentially combines assert_recognizes and assert_generates into one step.
+ Asserts that path and options match both ways; in other words, it verifies that path generates options and then that options generates path. This essentially combines assert_recognizes and assert_generates into one step.
The extras hash allows you to specify options that would normally be provided as a query string to the action. The message parameter allows you to specify a custom error message to display upon failure.
diff --git a/src/7.1/classes/ActionDispatch/Cookies.html b/src/7.1/classes/ActionDispatch/Cookies.html
index 6c1330d664..65f3aec036 100644
--- a/src/7.1/classes/ActionDispatch/Cookies.html
+++ b/src/7.1/classes/ActionDispatch/Cookies.html
@@ -99,7 +99,7 @@
-
:path - The path for which this cookie applies. Defaults to the root of the application.
-
-
:domain - The domain for which this cookie applies so you can restrict to the domain level. If you use a schema like www.example.com and want to share session with user.example.com set :domain to :all. To support multiple domains, provide an array, and the first domain matching request.host will be used. Make sure to specify the :domain option with :all or Array again when deleting cookies. For more flexibility you can set the domain on a per-request basis by specifying :domain with a proc.
+:domain - The domain for which this cookie applies so you can restrict to the domain level. If you use a schema like www.example.com and want to share session with user.example.com set :domain to :all. To support multiple domains, provide an array, and the first domain matching request.host will be used. Make sure to specify the :domain option with :all or Array again when deleting cookies. For more flexibility you can set the domain on a per-request basis by specifying :domain with a proc.
domain: nil # Does not set cookie domain. (default)
domain: :all # Allow the cookie for the top most level
diff --git a/src/7.1/classes/ActionDispatch/Http/Cache/Response.html b/src/7.1/classes/ActionDispatch/Http/Cache/Response.html
index d5d2ebf2ad..902f6e8c5f 100644
--- a/src/7.1/classes/ActionDispatch/Http/Cache/Response.html
+++ b/src/7.1/classes/ActionDispatch/Http/Cache/Response.html
@@ -304,7 +304,7 @@
Weak ETags are considered to be semantically equivalent but not byte-for-byte identical. This is perfect for browser caching of HTML pages where we don’t care about exact equality, just what the user is viewing.
-Strong ETags are considered byte-for-byte identical. They allow a browser or proxy cache to support Range requests, useful for paging through a PDF file or scrubbing through a video. Some CDNs only support strong ETags and will ignore weak ETags entirely.
+Strong ETags are considered byte-for-byte identical. They allow a browser or proxy cache to support Range requests, useful for paging through a PDF file or scrubbing through a video. Some CDNs only support strong ETags and will ignore weak ETags entirely.
Weak ETags are what we almost always need, so they’re the default. Check out strong_etag= to provide a strong ETag validator.
diff --git a/src/7.1/classes/ActionDispatch/Http/FilterParameters.html b/src/7.1/classes/ActionDispatch/Http/FilterParameters.html
index f656e138da..1b0670f891 100644
--- a/src/7.1/classes/ActionDispatch/Http/FilterParameters.html
+++ b/src/7.1/classes/ActionDispatch/Http/FilterParameters.html
@@ -257,7 +257,7 @@
- Returns the ActiveSupport::ParameterFilter object used to filter in this request.
+ Returns the ActiveSupport::ParameterFilter object used to filter in this request.
diff --git a/src/7.1/classes/ActionDispatch/Integration/Session.html b/src/7.1/classes/ActionDispatch/Integration/Session.html
index 43b76d65a3..bf24ec80e5 100644
--- a/src/7.1/classes/ActionDispatch/Integration/Session.html
+++ b/src/7.1/classes/ActionDispatch/Integration/Session.html
@@ -418,7 +418,7 @@
as: Used for encoding the request with different content type. Supports :json by default and will set the appropriate request headers. The headers will be merged into the Rack env hash.
-This method is rarely used directly. Use RequestHelpers#get, RequestHelpers#post, or other standard HTTP methods in integration tests. #process is only required when using a request method that doesn’t have a method defined in the integration tests.
+This method is rarely used directly. Use RequestHelpers#get, RequestHelpers#post, or other standard HTTP methods in integration tests. process is only required when using a request method that doesn’t have a method defined in the integration tests.
This method returns the response status, after performing the request. Furthermore, if this method was called from an ActionDispatch::IntegrationTest object, then that object’s @response instance variable will point to a Response object which one can use to inspect the details of the response.
diff --git a/src/7.1/classes/ActionDispatch/IntegrationTest.html b/src/7.1/classes/ActionDispatch/IntegrationTest.html
index 6c88900ab2..ffef1757f2 100644
--- a/src/7.1/classes/ActionDispatch/IntegrationTest.html
+++ b/src/7.1/classes/ActionDispatch/IntegrationTest.html
@@ -31,7 +31,7 @@
An integration test spans multiple controllers and actions, tying them all together to ensure they work together as expected. It tests more completely than either unit or functional tests do, exercising the entire stack, from the dispatcher to the database.
-At its simplest, you simply extend IntegrationTest and write your tests using the Integration::RequestHelpers#get and/or Integration::RequestHelpers#post methods:
+At its simplest, you simply extend IntegrationTest and write your tests using the Integration::RequestHelpers#get and/or Integration::RequestHelpers#post methods:
require "test_helper"
diff --git a/src/7.1/classes/ActionDispatch/RemoteIp.html b/src/7.1/classes/ActionDispatch/RemoteIp.html
index 2f60f92461..266ff478ad 100644
--- a/src/7.1/classes/ActionDispatch/RemoteIp.html
+++ b/src/7.1/classes/ActionDispatch/RemoteIp.html
@@ -149,11 +149,11 @@
- Create a new RemoteIp middleware instance.
+ Create a new RemoteIp middleware instance.
The ip_spoofing_check option is on by default. When on, an exception is raised if it looks like the client is trying to lie about its own IP address. It makes sense to turn off this check on sites aimed at non-IP clients (like WAP devices), or behind proxies that set headers in an incorrect or confusing way (like AWS ELB).
-The custom_proxies argument can take an enumerable which will be used instead of TRUSTED_PROXIES. Any proxy setup will put the value you want in the middle (or at the beginning) of the X-Forwarded-For list, with your proxy servers after it. If your proxies aren’t removed, pass them in via the custom_proxies parameter. That way, the middleware will ignore those IP addresses, and return the one that you want.
+The custom_proxies argument can take an enumerable which will be used instead of TRUSTED_PROXIES. Any proxy setup will put the value you want in the middle (or at the beginning) of the X-Forwarded-For list, with your proxy servers after it. If your proxies aren’t removed, pass them in via the custom_proxies parameter. That way, the middleware will ignore those IP addresses, and return the one that you want.
diff --git a/src/7.1/classes/ActionDispatch/Request.html b/src/7.1/classes/ActionDispatch/Request.html
index f2ac6d8f0c..99802245d5 100644
--- a/src/7.1/classes/ActionDispatch/Request.html
+++ b/src/7.1/classes/ActionDispatch/Request.html
@@ -943,7 +943,7 @@
- Returns the String full path including params of the last URL requested.
+ Returns the String full path including params of the last URL requested.
# get "/articles"
request.fullpath # => "/articles"
@@ -1058,7 +1058,7 @@
- Returns the IP address of client as a String.
+ Returns the IP address of client as a String.
@@ -1201,7 +1201,7 @@
- The String MIME type of the request.
+ The String MIME type of the request.
# get "/articles"
request.media_type # => "application/x-www-form-urlencoded"
@@ -1319,7 +1319,7 @@
- Returns a String with the last requested path including their params.
+ Returns a String with the last requested path including their params.
# get '/foo'
request.original_fullpath # => '/foo'
@@ -1361,7 +1361,7 @@
- Returns the original request URL as a String.
+ Returns the original request URL as a String.
# get "/articles?page=2"
request.original_url # => "http://www.example.com/articles?page=2"
@@ -1463,7 +1463,7 @@
- Returns the IP address of client as a String, usually set by the RemoteIp middleware.
+ Returns the IP address of client as a String, usually set by the RemoteIp middleware.
@@ -1819,7 +1819,7 @@
If the env contains rack.early_hints then the server accepts HTTP2 push for link headers.
-The send_early_hints method accepts a hash of links as follows:
+The send_early_hints method accepts a hash of links as follows:
send_early_hints("link" => "</style.css>; rel=preload; as=style,</script.js>; rel=preload")
diff --git a/src/7.1/classes/ActionDispatch/Routing/Mapper/Base.html b/src/7.1/classes/ActionDispatch/Routing/Mapper/Base.html
index 7646153f48..292f5aec0c 100644
--- a/src/7.1/classes/ActionDispatch/Routing/Mapper/Base.html
+++ b/src/7.1/classes/ActionDispatch/Routing/Mapper/Base.html
@@ -240,13 +240,13 @@
Options
Any options not seen here are passed on as params with the URL.
-- :controller
+
- :controller
-
The route’s controller.
- - :action
+
- :action
-
The route’s action.
- - :param
+
- :param
-
Overrides the default resource identifier :id (name of the dynamic segment used to generate the routes). You can access that segment from your controller using params[<:param>]. In your router:
@@ -264,7 +264,7 @@ Options
DELETE /users/:name(.:format)
-You can override ActiveRecord::Base#to_param of a related model to construct a URL:
+You can override ActiveRecord::Base#to_param of a related model to construct a URL:
class User < ActiveRecord::Base
def to_param
@@ -275,10 +275,10 @@ Options
user = User.find_by(name: 'Phusion')
user_path(user) # => "/users/Phusion"
-- :path
+
- :path
-
The path prefix for the routes.
- - :module
+
- :module
-
The namespace for :controller.
@@ -286,11 +286,11 @@ Options
# => Sekret::PostsController
-See Scoping#namespace for its scope equivalent.
- - :as
+
See Scoping#namespace for its scope equivalent.
+- :as
-
The name used to generate routing helpers.
- - :via
+
- :via
-
Allowed HTTP verb(s) for route.
@@ -298,7 +298,7 @@ Options
match 'path', to: 'c#a', via: [:get, :post]
match 'path', to: 'c#a', via: :all
- - :to
+
- :to
-
Points to a Rack endpoint. Can be an object that responds to call or a string representing a controller’s action.
@@ -306,7 +306,7 @@ Options
match 'path', to: -> (env) { [200, {}, ["Success!"]] }, via: :get
match 'path', to: RackApp, via: :get
- - :on
+
- :on
-
Shorthand for wrapping routes in a specific RESTful context. Valid values are :member, :collection, and :new. Only use within resource(s) block. For example:
@@ -323,7 +323,7 @@ Options
end
end
- - :constraints
+
- :constraints
-
Constrains parameters with a hash of regular expressions or an object that responds to matches?. In addition, constraints other than path can also be specified with any object that responds to === (e.g. String, Array, Range, etc.).
@@ -337,8 +337,8 @@ Options
match 'path', to: 'c#a', constraints: PermitList.new, via: :get
-See Scoping#constraints for more examples with its scope equivalent.
- - :defaults
+
See Scoping#constraints for more examples with its scope equivalent.
+- :defaults
-
Sets defaults for parameters
@@ -346,15 +346,15 @@ Options
match 'path', to: 'c#a', defaults: { format: 'jpg' }, via: :get
-See Scoping#defaults for its scope equivalent.
- - :anchor
+
See Scoping#defaults for its scope equivalent.
+- :anchor
-
Boolean to anchor a match pattern. Default is true. When set to false, the pattern matches any request prefixed with the given path.
# Matches any request starting with 'path'
match 'path', to: 'c#a', anchor: false, via: :get
- - :format
+
- :format
-
Allows you to specify the default value for optional format segment or disable it by supplying false.
diff --git a/src/7.1/classes/ActionDispatch/Routing/Mapper/CustomUrls.html b/src/7.1/classes/ActionDispatch/Routing/Mapper/CustomUrls.html
index 96967d8357..708cbd333c 100644
--- a/src/7.1/classes/ActionDispatch/Routing/Mapper/CustomUrls.html
+++ b/src/7.1/classes/ActionDispatch/Routing/Mapper/CustomUrls.html
@@ -112,7 +112,7 @@
Rails.application.routes.url_helpers.browse_path
-
then it will raise a NameError. Because of this you need to be aware of the context in which you will use your custom URL helper when defining it.
+then it will raise a NameError. Because of this you need to be aware of the context in which you will use your custom URL helper when defining it.
NOTE: The direct method can’t be used inside of a scope block such as namespace or scope and will raise an error if it detects that it is.
diff --git a/src/7.1/classes/ActionDispatch/Routing/Mapper/Resources.html b/src/7.1/classes/ActionDispatch/Routing/Mapper/Resources.html
index df43a14d42..1e2b292985 100644
--- a/src/7.1/classes/ActionDispatch/Routing/Mapper/Resources.html
+++ b/src/7.1/classes/ActionDispatch/Routing/Mapper/Resources.html
@@ -243,7 +243,7 @@
- Loads another routes file with the given name located inside the config/routes directory. In that file, you can use the normal routing DSL, but do not surround it with a Rails.application.routes.draw block.
+ Loads another routes file with the given name located inside the config/routes directory. In that file, you can use the normal routing DSL, but do not surround it with a Rails.application.routes.draw block.
# config/routes.rb
Rails.application.routes.draw do
@@ -687,7 +687,7 @@
Options
Takes same options as match as well as:
-- :path_names
+
- :path_names
-
Allows you to change the segment component of the edit and new actions. Actions not specified are not changed.
@@ -695,7 +695,7 @@ Options
The above example will now change /posts/new to /posts/brand_new.
-- :path
+
- :path
-
Allows you to change the path prefix for the resource.
@@ -703,21 +703,21 @@ Options
The resource and all segments will now route to /postings instead of /posts.
- - :only
+
- :only
-
Only generate routes for the given actions.
resources :cows, only: :show
resources :cows, only: [:show, :index]
- - :except
+
- :except
-
Generate all routes except for the given actions.
resources :cows, except: :show
resources :cows, except: [:show, :index]
- - :shallow
+
- :shallow
-
Generates shallow routes for nested resource(s). When placed on a parent resource, generates shallow routes for all nested resources.
@@ -737,7 +737,7 @@ Options
This allows URLs for resources that otherwise would be deeply nested such as a comment on a blog post like /posts/a-long-permalink/comments/1234 to be shortened to just /comments/1234.
Set shallow: false on a child resource to ignore a parent’s shallow parameter.
- - :shallow_path
+
- :shallow_path
-
Prefixes nested shallow routes with the specified path.
@@ -758,7 +758,7 @@ Options
comment PATCH/PUT /sekret/comments/:id(.:format)
comment DELETE /sekret/comments/:id(.:format)
- - :shallow_prefix
+
- :shallow_prefix
-
Prefixes nested shallow route names with specified prefix.
@@ -779,10 +779,10 @@ Options
sekret_comment PATCH/PUT /comments/:id(.:format)
sekret_comment DELETE /comments/:id(.:format)
- - :format
+
- :format
-
Allows you to specify the default value for optional format segment or disable it by supplying false.
- - :param
+
- :param
-
Allows you to override the default param name of :id in the URL.
diff --git a/src/7.1/classes/ActionDispatch/Routing/Mapper/Scoping.html b/src/7.1/classes/ActionDispatch/Routing/Mapper/Scoping.html
index d0f215348b..8c651e89eb 100644
--- a/src/7.1/classes/ActionDispatch/Routing/Mapper/Scoping.html
+++ b/src/7.1/classes/ActionDispatch/Routing/Mapper/Scoping.html
@@ -340,7 +340,7 @@ Options
The :path, :as, :module, :shallow_path, and :shallow_prefix options all default to the name of the namespace.
-For options, see Base#match. For :shallow_path option, see Resources#resources.
+For options, see Base#match. For :shallow_path option, see Resources#resources.
# accessible through /sekret/posts rather than /admin/posts
namespace :admin, path: "sekret" do
@@ -415,7 +415,7 @@
Options
-
Takes same options as Base#match and Resources#resources.
+Takes same options as Base#match and Resources#resources.
# route /posts (without the prefix /admin) to +Admin::PostsController+
scope module: "admin" do
diff --git a/src/7.1/classes/ActionDispatch/Routing/PolymorphicRoutes.html b/src/7.1/classes/ActionDispatch/Routing/PolymorphicRoutes.html
index ec1214f313..f57af59c31 100644
--- a/src/7.1/classes/ActionDispatch/Routing/PolymorphicRoutes.html
+++ b/src/7.1/classes/ActionDispatch/Routing/PolymorphicRoutes.html
@@ -45,9 +45,9 @@ ActionView::Helpers::FormHelper uses polymorphic_path, so you can write form_for(@article) without having to specify :url parameter for the form action;
+
ActionView::Helpers::FormHelper uses polymorphic_path, so you can write article) at form_for( without having to specify :url parameter for the form action;
-
redirect_to (which, in fact, uses url_for) so you can write redirect_to(post) in your controllers;
-
@@ -56,7 +56,7 @@
Prefixed polymorphic helpers
-In addition to polymorphic_url and polymorphic_path methods, a number of prefixed helpers are available as a shorthand to action: "..." in options. Those are:
+In addition to polymorphic_url and polymorphic_path methods, a number of prefixed helpers are available as a shorthand to action: "..." in options. Those are:
-
edit_polymorphic_url, edit_polymorphic_path
-
diff --git a/src/7.1/classes/ActionDispatch/Routing/UrlFor.html b/src/7.1/classes/ActionDispatch/Routing/UrlFor.html
index 37749fe0f8..13abc2c8a5 100644
--- a/src/7.1/classes/ActionDispatch/Routing/UrlFor.html
+++ b/src/7.1/classes/ActionDispatch/Routing/UrlFor.html
@@ -29,7 +29,7 @@
ActionDispatch::Routing for general information about routing and config/routes.rb.
-
Tip: If you need to generate URLs from your models or some other place, then ActionDispatch::Routing::UrlFor is what you’re looking for. Read on for an introduction. In general, this module should not be included on its own, as it is usually included by url_helpers (as in Rails.application.routes.url_helpers).
+Tip: If you need to generate URLs from your models or some other place, then ActionDispatch::Routing::UrlFor is what you’re looking for. Read on for an introduction. In general, this module should not be included on its own, as it is usually included by url_helpers (as in Rails.application.routes.url_helpers).
URL generation from parameters
@@ -60,7 +60,7 @@ url_for, that already knows what the current hostname is. So if you use url_for in your controllers or your views, then you don’t need to explicitly pass the :host argument.
For convenience, mailers also include ActionDispatch::Routing::UrlFor. So within mailers, you can use url_for. However, mailers cannot access incoming web requests in order to derive hostname information, so you have to provide the :host option or set the default host using default_url_options. For more information on url_for in mailers see the ActionMailer::Base documentation.
@@ -71,7 +71,7 @@ Rails.application.routes.url_helpers in your class:
class User < ActiveRecord::Base
include Rails.application.routes.url_helpers
@@ -287,7 +287,7 @@
:script_name - Specifies application path relative to domain root. If provided, prepends application path.
-Any other key (:controller, :action, etc.) given to url_for is forwarded to the Routes module.
+Any other key (:controller, :action, etc.) given to url_for is forwarded to the Routes module.
url_for controller: 'tasks', action: 'testing', host: 'somehost.org', port: '8080'
# => 'http://somehost.org:8080/tasks/testing'
@@ -310,7 +310,7 @@
url_for(only_path: true, action: 'edit', id: 2) # => '/users/2/edit'
-Notice that no :id parameter was provided to the first url_for call and the helper used the one from the route’s path. Any path parameter implicitly used by url_for can always be overwritten like shown on the last url_for calls.
+Notice that no :id parameter was provided to the first url_for call and the helper used the one from the route’s path. Any path parameter implicitly used by url_for can always be overwritten like shown on the last url_for calls.
diff --git a/src/7.1/classes/ActionDispatch/Session/CacheStore.html b/src/7.1/classes/ActionDispatch/Session/CacheStore.html
index 0690442663..9bf18f069a 100644
--- a/src/7.1/classes/ActionDispatch/Session/CacheStore.html
+++ b/src/7.1/classes/ActionDispatch/Session/CacheStore.html
@@ -35,7 +35,7 @@ Options
-
-
cache - The cache to use. If it is not specified, Rails.cache will be used.
+cache - The cache to use. If it is not specified, Rails.cache will be used.
-
expire_after - The length of time a session will be stored before automatically expiring. By default, the :expires_in option of the cache is used.
diff --git a/src/7.1/classes/ActionDispatch/ShowExceptions.html b/src/7.1/classes/ActionDispatch/ShowExceptions.html
index cf8886bc27..9b25f91196 100644
--- a/src/7.1/classes/ActionDispatch/ShowExceptions.html
+++ b/src/7.1/classes/ActionDispatch/ShowExceptions.html
@@ -33,7 +33,7 @@ ShowExceptions. Every time there is an exception, ShowExceptions will store the exception in env["action_dispatch.exception"], rewrite the PATH_INFO to the exception status code, and call the Rack app.
In Rails applications, the exceptions app can be configured with config.exceptions_app, which defaults to ActionDispatch::PublicExceptions.
diff --git a/src/7.1/classes/ActionDispatch/SystemTestCase.html b/src/7.1/classes/ActionDispatch/SystemTestCase.html
index 036cacfc2b..354b850883 100644
--- a/src/7.1/classes/ActionDispatch/SystemTestCase.html
+++ b/src/7.1/classes/ActionDispatch/SystemTestCase.html
@@ -61,7 +61,7 @@ System Testin
end
-By default, ActionDispatch::SystemTestCase is driven by the Selenium driver, with the Chrome browser, and a browser size of 1400x1400.
+By default, ActionDispatch::SystemTestCase is driven by the Selenium driver, with the Chrome browser, and a browser size of 1400x1400.
Changing the driver configuration options is easy. Let’s say you want to use the Firefox browser instead of Chrome. In your application_system_test_case.rb file add the following:
@@ -72,7 +72,7 @@ System Testin
end
-
driven_by has a required argument for the driver name. The keyword arguments are :using for the browser and :screen_size to change the size of the browser screen. These two options are not applicable for headless drivers and will be silently ignored if passed.
+driven_by has a required argument for the driver name. The keyword arguments are :using for the browser and :screen_size to change the size of the browser screen. These two options are not applicable for headless drivers and will be silently ignored if passed.
Headless browsers such as headless Chrome and headless Firefox are also supported. You can use these browsers by setting the :using argument to :headless_chrome or :headless_firefox.
@@ -101,7 +101,7 @@ System Testin
end
-
Because ActionDispatch::SystemTestCase is a shim between Capybara and Rails, any driver that is supported by Capybara is supported by system tests as long as you include the required gems and files.
+Because ActionDispatch::SystemTestCase is a shim between Capybara and Rails, any driver that is supported by Capybara is supported by system tests as long as you include the required gems and files.
diff --git a/src/7.1/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html b/src/7.1/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html
index b416aa8624..236425c047 100644
--- a/src/7.1/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html
+++ b/src/7.1/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html
@@ -78,7 +78,7 @@
Takes a screenshot of the current page in the browser if the test failed.
-take_failed_screenshot is called during system test teardown.
+take_failed_screenshot is called during system test teardown.
@@ -118,22 +118,22 @@
Takes a screenshot of the current page in the browser.
-take_screenshot can be used at any point in your system tests to take a screenshot of the current state. This can be useful for debugging or automating visual testing. You can take multiple screenshots per test to investigate changes at different points during your test. These will be named with a sequential prefix (or ‘failed’ for failing tests)
+take_screenshot can be used at any point in your system tests to take a screenshot of the current state. This can be useful for debugging or automating visual testing. You can take multiple screenshots per test to investigate changes at different points during your test. These will be named with a sequential prefix (or ‘failed’ for failing tests)
The default screenshots directory is tmp/screenshots but you can set a different one with Capybara.save_path
You can use the html argument or set the RAILS_SYSTEM_TESTING_SCREENSHOT_HTML environment variable to save the HTML from the page that is being screenshotted so you can investigate the elements on the page at the time of the screenshot
You can use the screenshot argument or set the RAILS_SYSTEM_TESTING_SCREENSHOT environment variable to control the output. Possible values are:
-simple (default)
+simple (default)
-
Only displays the screenshot path. This is the default value.
-inline
+
inline
-
Display the screenshot in the terminal using the iTerm image protocol (iterm2.com/documentation-images.html).
-artifact
+
artifact
-
Display the screenshot in the terminal, using the terminal artifact format (buildkite.github.io/terminal-to-html/inline-images/).
diff --git a/src/7.1/classes/ActionMailbox.html b/src/7.1/classes/ActionMailbox.html
index f09db47c35..7168435916 100644
--- a/src/7.1/classes/ActionMailbox.html
+++ b/src/7.1/classes/ActionMailbox.html
@@ -81,7 +81,7 @@ Action Mailbox
Action Mailbox routes incoming emails to controller-like mailboxes for processing in Rails. It ships with ingresses for Mailgun, Mandrill, Postmark, and SendGrid. You can also handle inbound mails directly via the built-in Exim, Postfix, and Qmail ingresses.
-The inbound emails are turned into InboundEmail records using Active Record and feature lifecycle tracking, storage of the original email on cloud storage via Active Storage, and responsible data handling with on-by-default incineration.
+The inbound emails are turned into InboundEmail records using Active Record and feature lifecycle tracking, storage of the original email on cloud storage via Active Storage, and responsible data handling with on-by-default incineration.
These inbound emails are routed asynchronously using Active Job to one or several dedicated mailboxes, which are capable of interacting directly with the rest of your domain model.
diff --git a/src/7.1/classes/ActionMailbox/Base.html b/src/7.1/classes/ActionMailbox/Base.html
index 9469fdaa38..8569010471 100644
--- a/src/7.1/classes/ActionMailbox/Base.html
+++ b/src/7.1/classes/ActionMailbox/Base.html
@@ -53,7 +53,7 @@ Action Mailbox Base
Application mailboxes need to override the process method, which is invoked by the framework after callbacks have been run. The callbacks available are: before_processing, after_processing, and around_processing. The primary use case is to ensure that certain preconditions to processing are fulfilled using before_processing callbacks.
-If a precondition fails to be met, you can halt the processing using the #bounced! method, which will silently prevent any further processing, but not actually send out any bounce notice. You can also pair this behavior with the invocation of an Action Mailer class responsible for sending out an actual bounce email. This is done using the bounce_with method, which takes the mail object returned by an Action Mailer method, like so:
+If a precondition fails to be met, you can halt the processing using the bounced! method, which will silently prevent any further processing, but not actually send out any bounce notice. You can also pair this behavior with the invocation of an Action Mailer class responsible for sending out an actual bounce email. This is done using the bounce_with method, which takes the mail object returned by an Action Mailer method, like so:
class ForwardsMailbox < ApplicationMailbox
before_processing :ensure_sender_is_a_user
diff --git a/src/7.1/classes/ActionMailbox/InboundEmail.html b/src/7.1/classes/ActionMailbox/InboundEmail.html
index 683ff4a975..55cc0c2794 100644
--- a/src/7.1/classes/ActionMailbox/InboundEmail.html
+++ b/src/7.1/classes/ActionMailbox/InboundEmail.html
@@ -37,7 +37,7 @@
-The InboundEmail is an Active Record that keeps a reference to the raw email stored in Active Storage and tracks the status of processing. By default, incoming emails will go through the following lifecycle:
+The InboundEmail is an Active Record that keeps a reference to the raw email stored in Active Storage and tracks the status of processing. By default, incoming emails will go through the following lifecycle:
-
Pending: Just received by one of the ingress controllers and scheduled for routing.
-
@@ -45,14 +45,14 @@
-
Delivered: Successfully processed by the specific mailbox.
-
-
Failed: An exception was raised during the specific mailbox’s execution of the #process method.
+Failed: An exception was raised during the specific mailbox’s execution of the process method.
-
Bounced: Rejected processing by the specific mailbox and bounced to sender.
-Once the InboundEmail has reached the status of being either delivered, failed, or bounced, it’ll count as having been #processed?. Once processed, the InboundEmail will be scheduled for automatic incineration at a later point.
+Once the InboundEmail has reached the status of being either delivered, failed, or bounced, it’ll count as having been processed?. Once processed, the InboundEmail will be scheduled for automatic incineration at a later point.
-When working with an InboundEmail, you’ll usually interact with the parsed version of the source, which is available as a Mail object from #mail. But you can also access the raw source directly using the #source method.
+When working with an InboundEmail, you’ll usually interact with the parsed version of the source, which is available as a Mail object from mail. But you can also access the raw source directly using the source method.
Examples:
diff --git a/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable.html b/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable.html
index 50b9e0a651..5bc14c0dd0 100644
--- a/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable.html
+++ b/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable.html
@@ -25,7 +25,7 @@
-Ensure that the InboundEmail is automatically scheduled for later incineration if the status has been changed to processed. The later incineration will be invoked at the time specified by the ActionMailbox.incinerate_after time using the IncinerationJob.
+Ensure that the InboundEmail is automatically scheduled for later incineration if the status has been changed to processed. The later incineration will be invoked at the time specified by the ActionMailbox.incinerate_after time using the IncinerationJob.
diff --git a/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html b/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html
index 8bd4e0f48b..196892f5a9 100644
--- a/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html
+++ b/src/7.1/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html
@@ -29,7 +29,7 @@
-Command class for carrying out the actual incineration of the InboundMail that’s been scheduled for removal. Before the incineration – which really is just a call to #destroy! – is run, we verify that it’s both eligible (by virtue of having already been processed) and time to do so (that is, the InboundEmail was processed after the incinerate_after time).
+Command class for carrying out the actual incineration of the InboundMail that’s been scheduled for removal. Before the incineration – which really is just a call to destroy! – is run, we verify that it’s both eligible (by virtue of having already been processed) and time to do so (that is, the InboundEmail was processed after the incinerate_after time).
diff --git a/src/7.1/classes/ActionMailbox/InboundEmail/MessageId.html b/src/7.1/classes/ActionMailbox/InboundEmail/MessageId.html
index 7357f7f7c4..cce33b6656 100644
--- a/src/7.1/classes/ActionMailbox/InboundEmail/MessageId.html
+++ b/src/7.1/classes/ActionMailbox/InboundEmail/MessageId.html
@@ -86,7 +86,7 @@
- Create a new InboundEmail from the raw source of the email, which is uploaded as an Active Storage attachment called raw_email. Before the upload, extract the Message-ID from the source and set it as an attribute on the new InboundEmail.
+ Create a new InboundEmail from the raw source of the email, which is uploaded as an Active Storage attachment called raw_email. Before the upload, extract the Message-ID from the source and set it as an attribute on the new InboundEmail.
diff --git a/src/7.1/classes/ActionMailbox/InboundEmail/Routable.html b/src/7.1/classes/ActionMailbox/InboundEmail/Routable.html
index 78d35dbca8..00a274b5dc 100644
--- a/src/7.1/classes/ActionMailbox/InboundEmail/Routable.html
+++ b/src/7.1/classes/ActionMailbox/InboundEmail/Routable.html
@@ -23,9 +23,9 @@
-A newly received InboundEmail will not be routed synchronously as part of ingress controller’s receival. Instead, the routing will be done asynchronously, using a RoutingJob, to ensure maximum parallel capacity.
+A newly received InboundEmail will not be routed synchronously as part of ingress controller’s receival. Instead, the routing will be done asynchronously, using a RoutingJob, to ensure maximum parallel capacity.
-By default, all newly created InboundEmail records that have the status of pending, which is the default, will be scheduled for automatic, deferred routing.
+By default, all newly created InboundEmail records that have the status of pending, which is the default, will be scheduled for automatic, deferred routing.
@@ -78,7 +78,7 @@
- Route this InboundEmail using the routing rules declared on the ApplicationMailbox.
+ Route this InboundEmail using the routing rules declared on the ApplicationMailbox.
@@ -113,7 +113,7 @@
- Enqueue a RoutingJob for this InboundEmail.
+ Enqueue a RoutingJob for this InboundEmail.
diff --git a/src/7.1/classes/ActionMailbox/IncinerationJob.html b/src/7.1/classes/ActionMailbox/IncinerationJob.html
index 8133cfc223..a1376dcf57 100644
--- a/src/7.1/classes/ActionMailbox/IncinerationJob.html
+++ b/src/7.1/classes/ActionMailbox/IncinerationJob.html
@@ -29,9 +29,9 @@
-You can configure when this IncinerationJob will be run as a time-after-processing using the config.action_mailbox.incinerate_after or ActionMailbox.incinerate_after setting.
+You can configure when this IncinerationJob will be run as a time-after-processing using the config.action_mailbox.incinerate_after or ActionMailbox.incinerate_after setting.
-Since this incineration is set for the future, it’ll automatically ignore any InboundEmails that have already been deleted and discard itself if so.
+Since this incineration is set for the future, it’ll automatically ignore any InboundEmails that have already been deleted and discard itself if so.
You can disable incinerating processed emails by setting config.action_mailbox.incinerate or ActionMailbox.incinerate to false.
diff --git a/src/7.1/classes/ActionMailer/Base.html b/src/7.1/classes/ActionMailer/Base.html
index 81f7452fbc..d0821ef875 100644
--- a/src/7.1/classes/ActionMailer/Base.html
+++ b/src/7.1/classes/ActionMailer/Base.html
@@ -40,7 +40,7 @@ Mailer Models
$ bin/rails generate mailer Notifier
-The generated model inherits from ApplicationMailer which in turn inherits from ActionMailer::Base. A mailer model defines methods used to generate an email message. In these methods, you can set up variables to be used in the mailer views, options on the mail itself such as the :from address, and attachments.
+The generated model inherits from ApplicationMailer which in turn inherits from ActionMailer::Base. A mailer model defines methods used to generate an email message. In these methods, you can set up variables to be used in the mailer views, options on the mail itself such as the :from address, and attachments.
class ApplicationMailer < ActionMailer::Base
default from: 'from@example.com'
@@ -72,7 +72,7 @@ Mailer Models
mail - Allows you to specify email to be sent.
-The hash passed to the mail method allows you to specify any header that a Mail::Message will accept (any valid email header including optional fields).
+The hash passed to the mail method allows you to specify any header that a Mail::Message will accept (any valid email header including optional fields).
The mail method, if not passed a block, will inspect your views and send all the views with the same name as the method, so the above action would send the welcome.text.erb view file as well as the welcome.html.erb view file in a multipart/alternative email.
@@ -160,7 +160,7 @@ Sending mail
mail.deliver_now # generates and sends the email now
-The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call your method to generate the mail. If you want direct access to the delegator, or Mail::Message, you can call the message method on the ActionMailer::MessageDelivery object.
+The ActionMailer::MessageDelivery class is a wrapper around a delegate that will call your method to generate the mail. If you want direct access to the delegator, or Mail::Message, you can call the message method on the ActionMailer::MessageDelivery object.
NotifierMailer.welcome(User.first).message # => a Mail::Message object
@@ -262,7 +262,7 @@ Observi
An observer class must implement the :delivered_email(message) method which will be called once for every email sent after the email has been sent.
-An interceptor class must implement the :delivering_email(message) method which will be called before the email is sent, allowing you to make modifications to the email before it hits the delivery agents. Your class should make any needed modifications directly to the passed in Mail::Message instance.
+An interceptor class must implement the :delivering_email(message) method which will be called before the email is sent, allowing you to make modifications to the email before it hits the delivery agents. Your class should make any needed modifications directly to the passed in Mail::Message instance.
Default Hash
@@ -273,7 +273,7 @@ Default Hash
end
-You can pass in any header value that a Mail::Message accepts. Out of the box, ActionMailer::Base sets the following:
+You can pass in any header value that a Mail::Message accepts. Out of the box, ActionMailer::Base sets the following:
-
mime_version: "1.0"
-
@@ -284,7 +284,7 @@
Default Hash
parts_order: [ "text/plain", "text/enriched", "text/html" ]
-parts_order and charset are not actually valid Mail::Message header fields, but Action Mailer translates them appropriately and sets the correct values.
+parts_order and charset are not actually valid Mail::Message header fields, but Action Mailer translates them appropriately and sets the correct values.
As you can pass in any header, you need to either quote the header as a string, or pass it in as an underscored symbol, so the following will work:
@@ -308,7 +308,7 @@ Default Hash
Note that the proc/lambda is evaluated right at the start of the mail message generation, so if you set something in the default hash using a proc, and then set the same thing inside of your mailer method, it will get overwritten by the mailer method.
-It is also possible to set these default options that will be used in all mailers through the default_options= configuration in config/application.rb:
+It is also possible to set these default options that will be used in all mailers through the default_options= configuration in config/application.rb:
config.action_mailer.default_options = { from: "no-reply@example.org" }
@@ -372,7 +372,7 @@ Previewing emails
end
-Methods must return a Mail::Message object which can be generated by calling the mailer method without the additional deliver_now / deliver_later. The location of the mailer preview directories can be configured using the preview_paths option which has a default of test/mailers/previews:
+Methods must return a Mail::Message object which can be generated by calling the mailer method without the additional deliver_now / deliver_later. The location of the mailer preview directories can be configured using the preview_paths option which has a default of test/mailers/previews:
config.action_mailer.preview_paths << "#{Rails.root}/lib/mailer_previews"
@@ -390,7 +390,7 @@ Previewing emails
config.action_mailer.preview_interceptors :css_inline_styler
-Note that interceptors need to be registered both with register_interceptor and register_preview_interceptor if they should operate on both sending and previewing emails.
+Note that interceptors need to be registered both with register_interceptor and register_preview_interceptor if they should operate on both sending and previewing emails.
Configuration options
@@ -1369,18 +1369,18 @@
- Allows you to pass random and unusual headers to the new Mail::Message object which will add them to itself.
+ Allows you to pass random and unusual headers to the new Mail::Message object which will add them to itself.
headers['X-Special-Domain-Specific-Header'] = "SecretValue"
-You can also pass a hash into headers of header field names and values, which will then be set on the Mail::Message object:
+You can also pass a hash into headers of header field names and values, which will then be set on the Mail::Message object:
headers 'X-Special-Domain-Specific-Header' => "SecretValue",
'In-Reply-To' => incoming.message_id
-The resulting Mail::Message will have the following in its header:
+The resulting Mail::Message will have the following in its header:
X-Special-Domain-Specific-Header: SecretValue
@@ -1481,7 +1481,7 @@
When a :return_path is specified as header, that value will be used as the ‘envelope from’ address for the Mail message. Setting this is useful when you want delivery notifications sent to a different address than the one in :from. Mail will actually use the :return_path in preference to the :sender in preference to the :from field for the ‘envelope from’ value.
-If you do not pass a block to the mail method, it will find all templates in the view paths using by default the mailer name and the method name that it is being called from, it will then create parts for each of these templates intelligently, making educated guesses on correct content type and sequence, and return a fully prepared Mail::Message ready to call :deliver on to send.
+If you do not pass a block to the mail method, it will find all templates in the view paths using by default the mailer name and the method name that it is being called from, it will then create parts for each of these templates intelligently, making educated guesses on correct content type and sequence, and return a fully prepared Mail::Message ready to call :deliver on to send.
For example:
diff --git a/src/7.1/classes/ActionMailer/FormBuilder.html b/src/7.1/classes/ActionMailer/FormBuilder.html
index 8c28b543f3..13b749667a 100644
--- a/src/7.1/classes/ActionMailer/FormBuilder.html
+++ b/src/7.1/classes/ActionMailer/FormBuilder.html
@@ -29,7 +29,7 @@ Actio
While emails typically will not include forms, this can be used by views that are shared between controllers and mailers.
-For more information, see ActionController::FormBuilder.
+For more information, see ActionController::FormBuilder.
diff --git a/src/7.1/classes/ActionMailer/MessageDelivery.html b/src/7.1/classes/ActionMailer/MessageDelivery.html
index e52196ab49..30b7f87c53 100644
--- a/src/7.1/classes/ActionMailer/MessageDelivery.html
+++ b/src/7.1/classes/ActionMailer/MessageDelivery.html
@@ -31,7 +31,7 @@
Action Mailer MessageDelivery
-
The ActionMailer::MessageDelivery class is used by ActionMailer::Base when creating a new mailer. MessageDelivery is a wrapper (Delegator subclass) around a lazy created Mail::Message. You can get direct access to the Mail::Message, deliver the email or schedule the email to be sent through Active Job.
+The ActionMailer::MessageDelivery class is used by ActionMailer::Base when creating a new mailer. MessageDelivery is a wrapper (Delegator subclass) around a lazy created Mail::Message. You can get direct access to the Mail::Message, deliver the email or schedule the email to be sent through Active Job.
Notifier.welcome(User.first) # an ActionMailer::MessageDelivery object
Notifier.welcome(User.first).deliver_now # sends the email
@@ -106,7 +106,7 @@
- Enqueues the email to be delivered through Active Job. When the job runs it will send the email using deliver_now.
+ Enqueues the email to be delivered through Active Job. When the job runs it will send the email using deliver_now.
Notifier.welcome(User.first).deliver_later
Notifier.welcome(User.first).deliver_later(wait: 1.hour)
@@ -165,7 +165,7 @@
- Enqueues the email to be delivered through Active Job. When the job runs it will send the email using deliver_now!. That means that the message will be sent bypassing checking perform_deliveries and raise_delivery_errors, so use with caution.
+ Enqueues the email to be delivered through Active Job. When the job runs it will send the email using deliver_now!. That means that the message will be sent bypassing checking perform_deliveries and raise_delivery_errors, so use with caution.
Notifier.welcome(User.first).deliver_later!
Notifier.welcome(User.first).deliver_later!(wait: 1.hour)
diff --git a/src/7.1/classes/ActionText/Attachable.html b/src/7.1/classes/ActionText/Attachable.html
index 896ce8af12..561bba3976 100644
--- a/src/7.1/classes/ActionText/Attachable.html
+++ b/src/7.1/classes/ActionText/Attachable.html
@@ -185,7 +185,7 @@
- Extracts the ActionText::Attachable from the attachment HTML node:
+ Extracts the ActionText::Attachable from the attachment HTML node:
person = Person.create! name: "Javan"
html = %Q(<action-text-attachment sgid="#{person.attachable_sgid}"></action-text-attachment>)
diff --git a/src/7.1/classes/ActionText/Attribute.html b/src/7.1/classes/ActionText/Attribute.html
index 771265fae6..a33a5efb4b 100644
--- a/src/7.1/classes/ActionText/Attribute.html
+++ b/src/7.1/classes/ActionText/Attribute.html
@@ -97,7 +97,7 @@
Options
-
-
:encrypted - Pass true to encrypt the rich text attribute. The encryption will be non-deterministic. See ActiveRecord::Encryption::EncryptableRecord.encrypts. Default: false.
+:encrypted - Pass true to encrypt the rich text attribute. The encryption will be non-deterministic. See ActiveRecord::Encryption::EncryptableRecord.encrypts. Default: false.
-
:strict_loading - Pass true to force strict loading. When omitted, strict_loading: will be set to the value of the strict_loading_by_default class attribute (false by default).
diff --git a/src/7.1/classes/ActionText/Content.html b/src/7.1/classes/ActionText/Content.html
index f6162a4883..d1d2b22047 100644
--- a/src/7.1/classes/ActionText/Content.html
+++ b/src/7.1/classes/ActionText/Content.html
@@ -31,9 +31,9 @@
Action Text Content
-
The ActionText::Content class wraps an HTML fragment to add support for parsing, rendering and serialization. It can be used to extract links and attachments, convert the fragment to plain text, or serialize the fragment to the database.
+The ActionText::Content class wraps an HTML fragment to add support for parsing, rendering and serialization. It can be used to extract links and attachments, convert the fragment to plain text, or serialize the fragment to the database.
-The ActionText::RichText record serializes the ‘body` attribute as ActionText::Content.
+The ActionText::RichText record serializes the ‘body` attribute as ActionText::Content.
class Message < ActiveRecord::Base
has_rich_text :content
diff --git a/src/7.1/classes/ActionText/FixtureSet.html b/src/7.1/classes/ActionText/FixtureSet.html
index 817b5d255b..5ef9f6f292 100644
--- a/src/7.1/classes/ActionText/FixtureSet.html
+++ b/src/7.1/classes/ActionText/FixtureSet.html
@@ -118,7 +118,7 @@ Examples
title: Another Article
-You can attach a mention of articles(:first) to second‘s content by embedding a call to ActionText::FixtureSet.attachment in the body: value in test/fixtures/action_text/rich_texts.yml:
+You can attach a mention of articles(:first) to second‘s content by embedding a call to ActionText::FixtureSet.attachment in the body: value in test/fixtures/action_text/rich_texts.yml:
second:
record: second (Article)
diff --git a/src/7.1/classes/ActionView/Helpers/AssetTagHelper.html b/src/7.1/classes/ActionView/Helpers/AssetTagHelper.html
index 88d2b52137..98ce39050e 100644
--- a/src/7.1/classes/ActionView/Helpers/AssetTagHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/AssetTagHelper.html
@@ -554,7 +554,7 @@ Options
When the last parameter is a hash you can add HTML attributes using that parameter. Apart from all the HTML supported options, the following are supported:
-
-
:image - Hash of options that are passed directly to the image_tag helper.
+:image - Hash of options that are passed directly to the image_tag helper.
Examples
@@ -848,7 +848,7 @@ Options
When the last parameter is a hash you can add HTML attributes using that parameter. The following options are supported:
-
-
:poster - Set an image (like a screenshot) to be shown before the video loads. The path is calculated like the src of image_tag.
+:poster - Set an image (like a screenshot) to be shown before the video loads. The path is calculated like the src of image_tag.
-
:size - Supplied as "#{width}x#{height}" or "#{number}", so "30x45" becomes width="30" height="45", and "50" becomes width="50" height="50". :size will be ignored if the value is not in the correct format.
-
diff --git a/src/7.1/classes/ActionView/Helpers/AssetUrlHelper.html b/src/7.1/classes/ActionView/Helpers/AssetUrlHelper.html
index 7c0d2e1f48..64d53203d7 100644
--- a/src/7.1/classes/ActionView/Helpers/AssetUrlHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/AssetUrlHelper.html
@@ -328,7 +328,7 @@
With the asset pipeline
-
All options passed to asset_path will be passed to compute_asset_path which is implemented by asset pipeline gems.
+All options passed to asset_path will be passed to compute_asset_path which is implemented by asset pipeline gems.
asset_path("application.js") # => "/assets/application-60aa4fdc5cea14baf5400fba1abf4f2a46a5166bad4772b1effe341570f07de9.js"
asset_path('application.js', host: 'example.com') # => "//example.com/assets/application.js"
@@ -337,7 +337,7 @@ With the asset pipeli
Without the asset pipeline (skip_pipeline: true)
-
Accepts a type option that can specify the asset’s extension. No error checking is done to verify the source passed into asset_path is valid and that the file exists on disk.
+Accepts a type option that can specify the asset’s extension. No error checking is done to verify the source passed into asset_path is valid and that the file exists on disk.
asset_path("application.js", skip_pipeline: true) # => "application.js"
asset_path("filedoesnotexist.png", skip_pipeline: true) # => "filedoesnotexist.png"
@@ -347,7 +347,7 @@ Options applying to all assets
-Below lists scenarios that apply to asset_path whether or not you’re using the asset pipeline.
+Below lists scenarios that apply to asset_path whether or not you’re using the asset pipeline.
-
All fully qualified URLs are returned immediately. This bypasses the asset pipeline and all other behavior described.
@@ -449,9 +449,9 @@
- Computes the full URL to an asset in the public directory. This will use asset_path internally, so most of their behaviors will be the same. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to an asset in the public directory. This will use asset_path internally, so most of their behaviors will be the same. If :host options is set, it overwrites global config.action_controller.asset_host setting.
-All other options provided are forwarded to asset_path call.
+All other options provided are forwarded to asset_path call.
asset_url "application.js" # => http://example.com/assets/application.js
asset_url "application.js", host: "http://cdn.example.com" # => http://cdn.example.com/assets/application.js
@@ -540,7 +540,7 @@
- Computes the full URL to an audio asset in the public audios directory. This will use audio_path internally, so most of their behaviors will be the same. Since audio_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to an audio asset in the public audios directory. This will use audio_path internally, so most of their behaviors will be the same. Since audio_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
audio_url "horse.wav", host: "http://stage.example.com" # => http://stage.example.com/audios/horse.wav
@@ -774,7 +774,7 @@
- Computes the full URL to a font asset. This will use font_path internally, so most of their behaviors will be the same. Since font_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to a font asset. This will use font_path internally, so most of their behaviors will be the same. Since font_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
font_url "font.ttf", host: "http://stage.example.com" # => http://stage.example.com/fonts/font.ttf
@@ -825,7 +825,7 @@
image_path("http://www.example.com/img/edit.png") # => "http://www.example.com/img/edit.png"
-
If you have images as application resources this method may conflict with their named routes. The alias path_to_image is provided to avoid that. Rails uses the alias internally, and plugin authors are encouraged to do so.
+If you have images as application resources this method may conflict with their named routes. The alias path_to_image is provided to avoid that. Rails uses the alias internally, and plugin authors are encouraged to do so.
@@ -864,7 +864,7 @@
- Computes the full URL to an image asset. This will use image_path internally, so most of their behaviors will be the same. Since image_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to an image asset. This will use image_path internally, so most of their behaviors will be the same. Since image_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
image_url "edit.png", host: "http://stage.example.com" # => http://stage.example.com/assets/edit.png
@@ -952,7 +952,7 @@
- Computes the full URL to a JavaScript asset in the public javascripts directory. This will use javascript_path internally, so most of their behaviors will be the same. Since javascript_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to a JavaScript asset in the public javascripts directory. This will use javascript_path internally, so most of their behaviors will be the same. Since javascript_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
javascript_url "js/xmlhr.js", host: "http://stage.example.com" # => http://stage.example.com/assets/js/xmlhr.js
@@ -1240,7 +1240,7 @@
- Computes the full URL to a stylesheet asset in the public stylesheets directory. This will use stylesheet_path internally, so most of their behaviors will be the same. Since stylesheet_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to a stylesheet asset in the public stylesheets directory. This will use stylesheet_path internally, so most of their behaviors will be the same. Since stylesheet_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
stylesheet_url "css/style.css", host: "http://stage.example.com" # => http://stage.example.com/assets/css/style.css
@@ -1503,7 +1503,7 @@
- Computes the full URL to a video asset in the public videos directory. This will use video_path internally, so most of their behaviors will be the same. Since video_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
+ Computes the full URL to a video asset in the public videos directory. This will use video_path internally, so most of their behaviors will be the same. Since video_url is based on asset_url method you can set :host options. If :host options is set, it overwrites global config.action_controller.asset_host setting.
video_url "hd.avi", host: "http://stage.example.com" # => http://stage.example.com/videos/hd.avi
diff --git a/src/7.1/classes/ActionView/Helpers/AtomFeedHelper.html b/src/7.1/classes/ActionView/Helpers/AtomFeedHelper.html
index 8336b269f4..a83e462706 100644
--- a/src/7.1/classes/ActionView/Helpers/AtomFeedHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/AtomFeedHelper.html
@@ -161,7 +161,7 @@
end
-
atom_feed yields an AtomFeedBuilder instance. Nested elements yield an AtomBuilder instance.
+atom_feed yields an AtomFeedBuilder instance. Nested elements yield an AtomBuilder instance.
diff --git a/src/7.1/classes/ActionView/Helpers/CacheHelper.html b/src/7.1/classes/ActionView/Helpers/CacheHelper.html
index 95936159e4..996f90fe74 100644
--- a/src/7.1/classes/ActionView/Helpers/CacheHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/CacheHelper.html
@@ -453,7 +453,7 @@
- Raises UncacheableFragmentError when called from within a cache block.
+ Raises UncacheableFragmentError when called from within a cache block.
Useful to denote helper methods that can’t participate in fragment caching:
diff --git a/src/7.1/classes/ActionView/Helpers/CaptureHelper.html b/src/7.1/classes/ActionView/Helpers/CaptureHelper.html
index 54931ebc3f..a3b3111581 100644
--- a/src/7.1/classes/ActionView/Helpers/CaptureHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/CaptureHelper.html
@@ -172,9 +172,9 @@
- Calling content_for stores a block of markup in an identifier for later use. In order to access this stored content in other templates, helper modules or the layout, you would pass the identifier as an argument to content_for.
+ Calling content_for stores a block of markup in an identifier for later use. In order to access this stored content in other templates, helper modules or the layout, you would pass the identifier as an argument to content_for.
-Note: yield can still be used to retrieve the stored content, but calling yield doesn’t work in helper modules, while content_for does.
+Note: yield can still be used to retrieve the stored content, but calling yield doesn’t work in helper modules, while content_for does.
<% content_for :not_authorized do %>
alert('You are not authorized to do that!')
@@ -191,7 +191,7 @@
<%= yield :not_authorized if current_user.nil? %>
-
content_for, however, can also be used in helper modules.
+content_for, however, can also be used in helper modules.
module StorageHelper
def stored_content
@@ -219,7 +219,7 @@
</html>
-And now, we’ll create a view that has a content_for call that creates the script identifier.
+And now, we’ll create a view that has a content_for call that creates the script identifier.
<%# This is our view %>
Please login!
@@ -240,7 +240,7 @@
That will place script tags for your default set of JavaScript files on the page; this technique is useful if you’ll only be using these scripts in a few views.
-Note that content_for concatenates (default) the blocks it is given for a particular identifier in order. For example:
+Note that content_for concatenates (default) the blocks it is given for a particular identifier in order. For example:
<% content_for :navigation do %>
<li><%= link_to 'Home', action: 'index' %></li>
@@ -259,7 +259,7 @@
<ul><%= content_for :navigation %></ul>
-
If the flush parameter is true content_for replaces the blocks it is given. For example:
+If the flush parameter is true content_for replaces the blocks it is given. For example:
<% content_for :navigation do %>
<li><%= link_to 'Home', action: 'index' %></li>
@@ -282,7 +282,7 @@
<% content_for :script, javascript_include_tag(:defaults) %>
-
WARNING: content_for is ignored in caches. So you shouldn’t use it for elements that will be fragment cached.
+WARNING: content_for is ignored in caches. So you shouldn’t use it for elements that will be fragment cached.
@@ -328,7 +328,7 @@
- content_for? checks whether any content has been captured yet using content_for.
+ content_for? checks whether any content has been captured yet using content_for.
Useful to render parts of your layout differently based on what is in your views.
@@ -378,7 +378,7 @@
- The same as content_for but when used with streaming flushes straight back to the layout. In other words, if you want to concatenate several times to the same buffer when rendering a given template, you should use content_for, if not, use provide to tell the layout to stop looking for more contents.
+ The same as content_for but when used with streaming flushes straight back to the layout. In other words, if you want to concatenate several times to the same buffer when rendering a given template, you should use content_for, if not, use provide to tell the layout to stop looking for more contents.
See ActionController::Streaming for more information.
diff --git a/src/7.1/classes/ActionView/Helpers/DateHelper.html b/src/7.1/classes/ActionView/Helpers/DateHelper.html
index 232eb6ba7f..e1f517322b 100644
--- a/src/7.1/classes/ActionView/Helpers/DateHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/DateHelper.html
@@ -27,11 +27,11 @@ A
The Date Helper primarily creates select/option tags for different kinds of dates and times or date and time elements. All of the select-type methods share a number of common options that are as follows:
-
-
:prefix - overwrites the default prefix of “date” used for the select names. So specifying “birthday” would give birthday[month] instead of date[month] if passed to the select_month method.
+:prefix - overwrites the default prefix of “date” used for the select names. So specifying “birthday” would give birthday[month] instead of date[month] if passed to the select_month method.
-
:include_blank - set to true if it should be possible to set an empty date.
-
-
:discard_type - set to true if you want to discard the type part of the select name. If set to true, the select_month method would use simply “date” (which can be overwritten using :prefix) instead of date[month].
+:discard_type - set to true if you want to discard the type part of the select name. If set to true, the select_month method would use simply “date” (which can be overwritten using :prefix) instead of date[month].
@@ -757,7 +757,7 @@
- Returns a select tag with options for each of the hours 0 through 23 with the current hour selected. The datetime can be either a Time or DateTime object or an integer. Override the field name using the :field_name option, ‘hour’ by default.
+ Returns a select tag with options for each of the hours 0 through 23 with the current hour selected. The datetime can be either a Time or DateTime object or an integer. Override the field name using the :field_name option, ‘hour’ by default.
my_time = Time.now + 6.hours
@@ -815,7 +815,7 @@
- Returns a select tag with options for each of the minutes 0 through 59 with the current minute selected. Also can return a select tag with options by minute_step from 0 through 59 with the 00 minute selected. The datetime can be either a Time or DateTime object or an integer. Override the field name using the :field_name option, ‘minute’ by default.
+ Returns a select tag with options for each of the minutes 0 through 59 with the current minute selected. Also can return a select tag with options by minute_step from 0 through 59 with the 00 minute selected. The datetime can be either a Time or DateTime object or an integer. Override the field name using the :field_name option, ‘minute’ by default.
my_time = Time.now + 10.minutes
@@ -935,7 +935,7 @@
- Returns a select tag with options for each of the seconds 0 through 59 with the current second selected. The datetime can be either a Time or DateTime object or an integer. Override the field name using the :field_name option, ‘second’ by default.
+ Returns a select tag with options for each of the seconds 0 through 59 with the current second selected. The datetime can be either a Time or DateTime object or an integer. Override the field name using the :field_name option, ‘second’ by default.
my_time = Time.now + 16.seconds
@@ -1112,7 +1112,7 @@
- Like distance_of_time_in_words, but where to_time is fixed to Time.now.
+ Like distance_of_time_in_words, but where to_time is fixed to Time.now.
time_ago_in_words(3.minutes.from_now) # => 3 minutes
time_ago_in_words(3.minutes.ago) # => 3 minutes
@@ -1127,7 +1127,7 @@
time_ago_in_words(from_time) # => 3 days
-Note that you cannot pass a Numeric value to time_ago_in_words.
+Note that you cannot pass a Numeric value to time_ago_in_words.
@@ -1168,7 +1168,7 @@
Returns a set of select tags (one for hour, minute, and optionally second) pre-selected for accessing a specified time-based attribute (identified by method) on an object assigned to the template (identified by object). You can include the seconds with :include_seconds. You can get hours in the AM/PM format with :ampm option.
-This method will also generate 3 input hidden tags, for the actual year, month, and day unless the option :ignore_date is set to true. If you set the :ignore_date to true, you must have a date_select on the same method within the form otherwise an exception will be raised.
+This method will also generate 3 input hidden tags, for the actual year, month, and day unless the option :ignore_date is set to true. If you set the :ignore_date to true, you must have a date_select on the same method within the form otherwise an exception will be raised.
If anything is passed in the html_options hash it will be applied to every select tag in the set.
diff --git a/src/7.1/classes/ActionView/Helpers/FormBuilder.html b/src/7.1/classes/ActionView/Helpers/FormBuilder.html
index 58f7cd4047..5d1c6fbf4b 100644
--- a/src/7.1/classes/ActionView/Helpers/FormBuilder.html
+++ b/src/7.1/classes/ActionView/Helpers/FormBuilder.html
@@ -37,7 +37,7 @@
Action View Form Builder
-
A FormBuilder object is associated with a particular model object and allows you to generate fields associated with the model object. The FormBuilder object is yielded when using form_for or fields_for. For example:
+A FormBuilder object is associated with a particular model object and allows you to generate fields associated with the model object. The FormBuilder object is yielded when using form_for or fields_for. For example:
<%= form_for @person do |person_form| %>
Name: <%= person_form.text_field :name %>
@@ -45,9 +45,9 @@ A
<% end %>
-In the above block, a FormBuilder object is yielded as the person_form variable. This allows you to generate the text_field and check_box fields by specifying their eponymous methods, which modify the underlying template and associates the @person model object with the form.
+In the above block, a FormBuilder object is yielded as the person_form variable. This allows you to generate the text_field and check_box fields by specifying their eponymous methods, which modify the underlying template and associates the @person model object with the form.
-The FormBuilder object can be thought of as serving as a proxy for the methods in the FormHelper module. This class, however, allows you to call methods with the model object you are building the form for.
+The FormBuilder object can be thought of as serving as a proxy for the methods in the FormHelper module. This class, however, allows you to call methods with the model object you are building the form for.
You can create your own custom FormBuilder templates by subclassing this class. For example:
@@ -1006,7 +1006,7 @@
Generate an HTML id attribute value for the given field
-Return the value generated by the FormBuilder for the given attribute name.
+Return the value generated by the FormBuilder for the given attribute name.
<%= form_for @post do |f| %>
<%= f.label :title %>
@@ -1015,7 +1015,7 @@
<% end %>
-In the example above, the <input type="text"> element built by the call to FormBuilder#text_field declares an aria-describedby attribute referencing the <span> element, sharing a common id root (post_title, in this case).
+In the example above, the <input type="text"> element built by the call to FormBuilder#text_field declares an aria-describedby attribute referencing the <span> element, sharing a common id root (post_title, in this case).
@@ -1052,7 +1052,7 @@
Generate an HTML name attribute value for the given name and field combination
-Return the value generated by the FormBuilder for the given attribute name.
+Return the value generated by the FormBuilder for the given attribute name.
<%= form_for @post do |f| %>
<%= f.text_field :title, name: f.field_name(:title, :subtitle) %>
@@ -1142,7 +1142,7 @@
Creates a scope around a specific model object like form_for, but doesn’t create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form.
-Although the usage and purpose of fields_for is similar to form_for‘s, its method signature is slightly different. Like form_for, it yields a FormBuilder object associated with a particular model object to a block, and within the block allows methods to be called on the builder to generate fields associated with the model object. Fields may reflect a model object in two ways - how they are named (hence how submitted values appear within the params hash in the controller) and what default values are shown when the form the fields appear in is first displayed. In order for both of these features to be specified independently, both an object name (represented by either a symbol or string) and the object itself can be passed to the method separately -
+Although the usage and purpose of fields_for is similar to form_for‘s, its method signature is slightly different. Like form_for, it yields a FormBuilder object associated with a particular model object to a block, and within the block allows methods to be called on the builder to generate fields associated with the model object. Fields may reflect a model object in two ways - how they are named (hence how submitted values appear within the params hash in the controller) and what default values are shown when the form the fields appear in is first displayed. In order for both of these features to be specified independently, both an object name (represented by either a symbol or string) and the object itself can be passed to the method separately -
<%= form_for @person do |person_form| %>
First name: <%= person_form.text_field :first_name %>
@@ -1158,7 +1158,7 @@
In this case, the checkbox field will be represented by an HTML input tag with the name attribute permission[admin], and the submitted value will appear in the controller as params[:permission][:admin]. If @person.permission is an existing record with an attribute admin, the initial state of the checkbox when first displayed will reflect the value of @person.permission.admin.
-Often this can be simplified by passing just the name of the model object to fields_for -
+Often this can be simplified by passing just the name of the model object to fields_for -
<%= fields_for :permission do |permission_fields| %>
Admin?: <%= permission_fields.check_box :admin %>
@@ -1167,18 +1167,18 @@
…in which case, if :permission also happens to be the name of an instance variable @permission, the initial state of the input field will reflect the value of that variable’s attribute @permission.admin.
-Alternatively, you can pass just the model object itself (if the first argument isn’t a string or symbol fields_for will realize that the name has been omitted) -
+Alternatively, you can pass just the model object itself (if the first argument isn’t a string or symbol fields_for will realize that the name has been omitted) -
<%= fields_for @person.permission do |permission_fields| %>
Admin?: <%= permission_fields.check_box :admin %>
<% end %>
-and fields_for will derive the required name of the field from the class of the model object, e.g. if @person.permission, is of class Permission, the field will still be named permission[admin].
+and fields_for will derive the required name of the field from the class of the model object, e.g. if @person.permission, is of class Permission, the field will still be named permission[admin].
Note: This also works for the methods in FormOptionsHelper and DateHelper that are designed to work with an object as base, like FormOptionsHelper#collection_select and DateHelper#datetime_select.
-fields_for tries to be smart about parameters, but it can be confused if both name and value parameters are provided and the provided value has the shape of an option Hash. To remove the ambiguity, explicitly pass an option Hash, even if empty.
+fields_for tries to be smart about parameters, but it can be confused if both name and value parameters are provided and the provided value has the shape of an option Hash. To remove the ambiguity, explicitly pass an option Hash, even if empty.
<%= form_for @person do |person_form| %>
...
diff --git a/src/7.1/classes/ActionView/Helpers/FormHelper.html b/src/7.1/classes/ActionView/Helpers/FormHelper.html
index 21afbac367..b9046ef307 100644
--- a/src/7.1/classes/ActionView/Helpers/FormHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/FormHelper.html
@@ -31,9 +31,9 @@ A
Typically, a form designed to create or update a resource reflects the identity of the resource in several ways: (i) the URL that the form is sent to (the form element’s action attribute) should result in a request being routed to the appropriate controller action (with the appropriate :id parameter in the case of an existing resource), (ii) input fields should be named in such a way that in the controller their values appear in the appropriate places within the params hash, and (iii) for an existing record, when the form is initially displayed, input fields corresponding to attributes of the resource should show the current values of those attributes.
-In Rails, this is usually achieved by creating the form using form_for and a number of related helper methods. form_for generates an appropriate form tag and yields a form builder object that knows the model the form is about. Input fields are created by calling methods defined on the form builder, which means they are able to generate the appropriate names and default values corresponding to the model attributes, as well as convenient IDs, etc. Conventions in the generated field names allow controllers to receive form data nicely structured in params with no effort on your side.
+In Rails, this is usually achieved by creating the form using form_for and a number of related helper methods. form_for generates an appropriate form tag and yields a form builder object that knows the model the form is about. Input fields are created by calling methods defined on the form builder, which means they are able to generate the appropriate names and default values corresponding to the model attributes, as well as convenient IDs, etc. Conventions in the generated field names allow controllers to receive form data nicely structured in params with no effort on your side.
-For example, to create a new person you typically set up a new instance of Person in the PeopleController#new action, @person, and in the view template pass that object to form_for:
+For example, to create a new person you typically set up a new instance of Person in the PeopleController#new action, @person, and in the view template pass that object to form_for:
<%= form_for @person do |f| %>
<%= f.label :first_name %>:
@@ -597,7 +597,7 @@
- Scopes input fields with either an explicit scope or model. Like form_with does with :scope or :model, except it doesn’t output the form tags.
+ Scopes input fields with either an explicit scope or model. Like form_with does with :scope or :model, except it doesn’t output the form tags.
# Using a scope prefixes the input field names:
<%= fields :comment do |fields| %>
@@ -621,11 +621,11 @@
<% end %>
-Much like form_with a FormBuilder instance associated with the scope or model is yielded, so any generated field names are prefixed with either the passed scope or the scope inferred from the :model.
+Much like form_with a FormBuilder instance associated with the scope or model is yielded, so any generated field names are prefixed with either the passed scope or the scope inferred from the :model.
Mixing with other form helpers
-While form_with uses a FormBuilder object it’s possible to mix and match the stand-alone FormHelper methods and methods from FormTagHelper:
+While form_with uses a FormBuilder object it’s possible to mix and match the stand-alone FormHelper methods and methods from FormTagHelper:
<%= fields model: @comment do |fields| %>
<%= fields.text_field :body %>
@@ -680,7 +680,7 @@
Creates a scope around a specific model object like form_for, but doesn’t create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form.
-Although the usage and purpose of fields_for is similar to form_for‘s, its method signature is slightly different. Like form_for, it yields a FormBuilder object associated with a particular model object to a block, and within the block allows methods to be called on the builder to generate fields associated with the model object. Fields may reflect a model object in two ways - how they are named (hence how submitted values appear within the params hash in the controller) and what default values are shown when the form the fields appear in is first displayed. In order for both of these features to be specified independently, both an object name (represented by either a symbol or string) and the object itself can be passed to the method separately -
+Although the usage and purpose of fields_for is similar to form_for‘s, its method signature is slightly different. Like form_for, it yields a FormBuilder object associated with a particular model object to a block, and within the block allows methods to be called on the builder to generate fields associated with the model object. Fields may reflect a model object in two ways - how they are named (hence how submitted values appear within the params hash in the controller) and what default values are shown when the form the fields appear in is first displayed. In order for both of these features to be specified independently, both an object name (represented by either a symbol or string) and the object itself can be passed to the method separately -
<%= form_for @person do |person_form| %>
First name: <%= person_form.text_field :first_name %>
@@ -696,7 +696,7 @@
In this case, the checkbox field will be represented by an HTML input tag with the name attribute permission[admin], and the submitted value will appear in the controller as params[:permission][:admin]. If @person.permission is an existing record with an attribute admin, the initial state of the checkbox when first displayed will reflect the value of @person.permission.admin.
-Often this can be simplified by passing just the name of the model object to fields_for -
+Often this can be simplified by passing just the name of the model object to fields_for -
<%= fields_for :permission do |permission_fields| %>
Admin?: <%= permission_fields.check_box :admin %>
@@ -705,14 +705,14 @@
…in which case, if :permission also happens to be the name of an instance variable @permission, the initial state of the input field will reflect the value of that variable’s attribute @permission.admin.
-Alternatively, you can pass just the model object itself (if the first argument isn’t a string or symbol fields_for will realize that the name has been omitted) -
+Alternatively, you can pass just the model object itself (if the first argument isn’t a string or symbol fields_for will realize that the name has been omitted) -
<%= fields_for @person.permission do |permission_fields| %>
Admin?: <%= permission_fields.check_box :admin %>
<% end %>
-and fields_for will derive the required name of the field from the class of the model object, e.g. if @person.permission, is of class Permission, the field will still be named permission[admin].
+and fields_for will derive the required name of the field from the class of the model object, e.g. if @person.permission, is of class Permission, the field will still be named permission[admin].
Note: This also works for the methods in FormOptionsHelper and DateHelper that are designed to work with an object as base, like FormOptionsHelper#collection_select and DateHelper#datetime_select.
@@ -913,7 +913,7 @@
Returns a file upload input tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). Additional options on the input tag can be passed as a hash with options. These options will be tagged onto the HTML as an HTML element attribute as in the example shown.
-Using this method inside a form_for block will set the enclosing form’s encoding to multipart/form-data.
+Using this method inside a form_for block will set the enclosing form’s encoding to multipart/form-data.
Options
-
@@ -983,7 +983,7 @@
Creates a form that allows the user to create or update the attributes of a specific model object.
-The method can be used in several slightly different ways, depending on how much you wish to rely on Rails to infer automatically from the model how the form should be constructed. For a generic model object, a form can be created by passing form_for a string or symbol representing the object we are concerned with:
+The method can be used in several slightly different ways, depending on how much you wish to rely on Rails to infer automatically from the model how the form should be constructed. For a generic model object, a form can be created by passing form_for a string or symbol representing the object we are concerned with:
<%= form_for :person do |f| %>
First name: <%= f.text_field :first_name %><br />
@@ -994,7 +994,7 @@
<% end %>
-The variable f yielded to the block is a FormBuilder object that incorporates the knowledge about the model object represented by :person passed to form_for. Methods defined on the FormBuilder are used to generate fields bound to this model. Thus, for example,
+The variable f yielded to the block is a FormBuilder object that incorporates the knowledge about the model object represented by :person passed to form_for. Methods defined on the FormBuilder are used to generate fields bound to this model. Thus, for example,
<%= f.text_field :first_name %>
@@ -1008,9 +1008,9 @@
For fields generated in this way using the FormBuilder, if :person also happens to be the name of an instance variable @person, the default value of the field shown when the form is initially displayed (e.g. in the situation where you are editing an existing record) will be the value of the corresponding attribute of @person.
-The rightmost argument to form_for is an optional hash of options -
+The rightmost argument to form_for is an optional hash of options -
-
-
:url - The URL the form is to be submitted to. This may be represented in the same way as values passed to url_for or link_to. So for example you may use a named route directly. When the model is represented by a string or symbol, as in the example above, if the :url option is not specified, by default the form will be sent back to the current URL (We will describe below an alternative resource-oriented usage of form_for in which the URL does not need to be specified explicitly).
+:url - The URL the form is to be submitted to. This may be represented in the same way as values passed to url_for or link_to. So for example you may use a named route directly. When the model is represented by a string or symbol, as in the example above, if the :url option is not specified, by default the form will be sent back to the current URL (We will describe below an alternative resource-oriented usage of form_for in which the URL does not need to be specified explicitly).
-
:namespace - A namespace for your form to ensure uniqueness of id attributes on form elements. The namespace attribute will be prefixed with underscore on the generated HTML id.
-
@@ -1025,7 +1025,7 @@
:html - Optional HTML attributes for the form tag.
-Also note that form_for doesn’t create an exclusive scope. It’s still possible to use both the stand-alone FormHelper methods and methods from FormTagHelper. For example:
+Also note that form_for doesn’t create an exclusive scope. It’s still possible to use both the stand-alone FormHelper methods and methods from FormTagHelper. For example:
<%= form_for :person do |f| %>
First name: <%= f.text_field :first_name %>
@@ -1040,7 +1040,7 @@
form_for with a model object
-
In the examples above, the object to be created or edited was represented by a symbol passed to form_for, and we noted that a string can also be used equivalently. It is also possible, however, to pass a model object itself to form_for. For example, if @post is an existing record you wish to edit, you can create the form using
+In the examples above, the object to be created or edited was represented by a symbol passed to form_for, and we noted that a string can also be used equivalently. It is also possible, however, to pass a model object itself to form_for. For example, if @post is an existing record you wish to edit, you can create the form using
<%= form_for @post do |f| %>
...
@@ -1056,7 +1056,7 @@ form_for, regardless of whether the object is an instance variable. So, for example, if we had a local variable post representing an existing record,
<%= form_for post do |f| %>
...
@@ -1067,7 +1067,7 @@ Resource-oriented style
-In the examples just shown, although not indicated explicitly, we still need to use the :url option in order to specify where the form is going to be sent. However, further simplification is possible if the record passed to form_for is a resource, i.e. it corresponds to a set of RESTful routes, e.g. defined using the resources method in config/routes.rb. In this case Rails will simply infer the appropriate URL from the record itself. For example,
+In the examples just shown, although not indicated explicitly, we still need to use the :url option in order to specify where the form is going to be sent. However, further simplification is possible if the record passed to form_for is a resource, i.e. it corresponds to a set of RESTful routes, e.g. defined using the resources method in config/routes.rb. In this case Rails will simply infer the appropriate URL from the record itself. For example,
<%= form_for @post do |f| %>
...
@@ -1130,7 +1130,7 @@ Resource-oriented style
<% end %>
-Where @document = Document.find(params[:id]) and @comment = Comment.new.
+Where document = Document.find(params[:id]) and comment = Comment.new.
Setting the method
@@ -1372,7 +1372,7 @@
Resource-oriented style
-
In many of the examples just shown, the :model passed to form_with is a resource. It corresponds to a set of RESTful routes, most likely defined via resources in config/routes.rb.
+In many of the examples just shown, the :model passed to form_with is a resource. It corresponds to a set of RESTful routes, most likely defined via resources in config/routes.rb.
So when passing such a model record, Rails infers the URL and method.
@@ -1402,7 +1402,7 @@ Resource-oriented styl
<% end %>
-form_with options
+form_with options
-
:url - The URL the form submits to. Akin to values passed to url_for or link_to. For example, you may use a named route directly. When a :scope is passed without a :url the form just submits to the current URL.
-
@@ -1435,7 +1435,7 @@
form_with optio
Examples
-
When not passing a block, form_with just generates an opening form tag.
+When not passing a block, form_with just generates an opening form tag.
<%= form_with(model: @post, url: super_posts_path) %>
<%= form_with(model: @post, scope: :article) %>
@@ -1457,11 +1457,11 @@ Examples
<% end %>
-Where @document = Document.find(params[:id]).
+Where document = Document.find(params[:id]).
Mixing with other form helpers
-While form_with uses a FormBuilder object it’s possible to mix and match the stand-alone FormHelper methods and methods from FormTagHelper:
+While form_with uses a FormBuilder object it’s possible to mix and match the stand-alone FormHelper methods and methods from FormTagHelper:
<%= form_with scope: :person do |form| %>
<%= form.text_field :first_name %>
@@ -1504,7 +1504,7 @@ Setting HTML options
Removing hidden model id’s
-The form_with method automatically includes the model id as a hidden field in the form. This is used to maintain the correlation between the form data and its associated model. Some ORM systems do not use IDs on nested models so in this case you want to be able to disable the hidden id.
+The form_with method automatically includes the model id as a hidden field in the form. This is used to maintain the correlation between the form data and its associated model. Some ORM systems do not use IDs on nested models so in this case you want to be able to disable the hidden id.
In the following example the Post model has many Comments stored within it in a NoSQL database, thus there is no primary key for comments.
diff --git a/src/7.1/classes/ActionView/Helpers/FormOptionsHelper.html b/src/7.1/classes/ActionView/Helpers/FormOptionsHelper.html
index 27bde409d3..51bfadd4a6 100644
--- a/src/7.1/classes/ActionView/Helpers/FormOptionsHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/FormOptionsHelper.html
@@ -27,7 +27,7 @@ collection_select, select and time_zone_select methods take an options parameter, a hash:
-
:include_blank - set to true or a prompt string if the first option element of the select element is a blank. Useful if there is not a default value required for the select element.
@@ -103,7 +103,7 @@ collection_select helper, :disabled can also be a Proc that identifies those options that should be disabled.
collection_select(:post, :category_id, Category.all, :id, :name, { disabled: -> (category) { category.archived? } })
@@ -591,7 +591,7 @@
- Returns a string of <option> tags, like options_for_select, but wraps them with <optgroup> tags:
+ Returns a string of <option> tags, like options_for_select, but wraps them with <optgroup> tags:
grouped_options = [
['North America',
@@ -623,7 +623,7 @@
Parameters:
-
-
grouped_options - Accepts a nested array or hash of strings. The first value serves as the <optgroup> label while the second value must be an array of options. The second value can be a nested array of text-value pairs. See options_for_select for more info.
+grouped_options - Accepts a nested array or hash of strings. The first value serves as the <optgroup> label while the second value must be an array of options. The second value can be a nested array of text-value pairs. See options_for_select for more info.
Ex. ["North America",[["United States","US"],["Canada","CA"]]]
@@ -720,7 +720,7 @@
- Returns a string of <option> tags, like options_from_collection_for_select, but groups them by <optgroup> tags based on the object relationships of the arguments.
+ Returns a string of <option> tags, like options_from_collection_for_select, but groups them by <optgroup> tags based on the object relationships of the arguments.
Parameters:
-
@@ -988,9 +988,9 @@
There are two possible formats for the choices parameter, corresponding to other helpers’ output:
-
-
A flat collection (see options_for_select).
+A flat collection (see options_for_select).
-
-
A nested collection (see grouped_options_for_select).
+A nested collection (see grouped_options_for_select).
Example with @post.person_id => 2:
@@ -1129,7 +1129,7 @@
Returns select and option tags for the given object and method, using time_zone_options_for_select to generate the list of option tags.
-In addition to the :include_blank option documented above, this method also supports a :model option, which defaults to ActiveSupport::TimeZone. This may be used by users to specify a different time zone model object. (See time_zone_options_for_select for more information.)
+In addition to the :include_blank option documented above, this method also supports a :model option, which defaults to ActiveSupport::TimeZone. This may be used by users to specify a different time zone model object. (See time_zone_options_for_select for more information.)
You can also supply an array of ActiveSupport::TimeZone objects as priority_zones so that they will be listed above the rest of the (long) list. You can use ActiveSupport::TimeZone.us_zones for a list of US time zones, ActiveSupport::TimeZone.country_zones(country_code) for another country’s time zones, or a Regexp to select the zones of your choice.
@@ -1231,7 +1231,7 @@
- Returns select and option tags for the given object and method, using weekday_options_for_select to generate the list of option tags.
+ Returns select and option tags for the given object and method, using weekday_options_for_select to generate the list of option tags.
diff --git a/src/7.1/classes/ActionView/Helpers/FormTagHelper.html b/src/7.1/classes/ActionView/Helpers/FormTagHelper.html
index b8712a615f..1ff6b74a90 100644
--- a/src/7.1/classes/ActionView/Helpers/FormTagHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/FormTagHelper.html
@@ -630,7 +630,7 @@
Generate an HTML id attribute value for the given name and field combination
-Return the value generated by the FormBuilder for the given attribute name.
+Return the value generated by the FormBuilder for the given attribute name.
<%= label_tag :post, :title %>
<%= text_field :post, :title, aria: { describedby: field_id(:post, :title, :error) } %>
@@ -688,7 +688,7 @@
Generate an HTML name attribute value for the given name and field combination
-Return the value generated by the FormBuilder for the given attribute name.
+Return the value generated by the FormBuilder for the given attribute name.
<%= text_field :post, :title, name: field_name(:post, :title, :subtitle) %>
<%# => <input type="text" name="post[title][subtitle]"> %>
diff --git a/src/7.1/classes/ActionView/Helpers/SanitizeHelper.html b/src/7.1/classes/ActionView/Helpers/SanitizeHelper.html
index 4db395a9b7..a05cba5a66 100644
--- a/src/7.1/classes/ActionView/Helpers/SanitizeHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/SanitizeHelper.html
@@ -97,13 +97,13 @@
Please note that sanitizing user-provided text does not guarantee that the resulting markup is valid or even well-formed.
Options
-:tags
+:tags
-
An array of allowed tags.
- :attributes
+:attributes
-
An array of allowed attributes.
- :scrubber
+:scrubber
-
A Rails::HTML scrubber or Loofah::Scrubber object that defines custom sanitization rules. A custom scrubber takes precedence over custom tags and attributes.
diff --git a/src/7.1/classes/ActionView/Helpers/TextHelper.html b/src/7.1/classes/ActionView/Helpers/TextHelper.html
index 2f7c3e4fbc..bf09b21a63 100644
--- a/src/7.1/classes/ActionView/Helpers/TextHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/TextHelper.html
@@ -29,7 +29,7 @@ A
Sanitization
-
Most text helpers that generate HTML output sanitize the given input by default, but do not escape it. This means HTML tags will appear in the page but all malicious code will be removed. Let’s look at some examples using the simple_format method:
+Most text helpers that generate HTML output sanitize the given input by default, but do not escape it. This means HTML tags will appear in the page but all malicious code will be removed. Let’s look at some examples using the simple_format method:
simple_format('<a href="http://example.com/">Example</a>')
# => "<p><a href=\"http://example.com/\">Example</a></p>"
@@ -334,13 +334,13 @@
Extracts the first occurrence of phrase plus surrounding text from text. An omission marker is prepended / appended if the start / end of the result does not coincide with the start / end of text. The result is always stripped in any case. Returns nil if phrase isn’t found.
Options
-:radius
+:radius
-
The number of characters (or tokens — see :separator option) around phrase to include in the result. Defaults to 100.
- :omission
+:omission
-
The marker to prepend / append when the start / end of the excerpt does not coincide with the start / end of text. Defaults to "...".
- :separator
+:separator
-
The separator between tokens to count for :radius. Defaults to "", which treats each character as a token.
@@ -432,10 +432,10 @@
If a block is specified, it will be used instead of the highlighter string. Each occurrence of a phrase will be passed to the block, and its return value will be inserted into the final result.
Options
-:highlighter
+:highlighter
-
The highlighter string. Uses \1 as the placeholder for a phrase, similar to +String#sub+. Defaults to "<mark>\1</mark>". This option is ignored if a block is specified.
- :sanitize
+:sanitize
-
Whether to sanitize text before highlighting. Defaults to true.
@@ -754,16 +754,16 @@
The result will be escaped unless escape: false is specified. In any case, the result will be marked HTML-safe. Care should be taken if text might contain HTML tags or entities, because truncation could produce invalid HTML, such as unbalanced or incomplete tags.
Options
-:length
+:length
-
The maximum number of characters that should be returned, excluding any extra content from the block. Defaults to 30.
- :omission
+:omission
-
The string to append after truncating. Defaults to "...".
- :separator
+:separator
-
A string or regexp used to find a breaking point at which to truncate. By default, truncation can occur at any character in text.
- :escape
+:escape
-
Whether to escape the result. Defaults to true.
diff --git a/src/7.1/classes/ActionView/Helpers/UrlHelper.html b/src/7.1/classes/ActionView/Helpers/UrlHelper.html
index cdeaa091cd..645a433045 100644
--- a/src/7.1/classes/ActionView/Helpers/UrlHelper.html
+++ b/src/7.1/classes/ActionView/Helpers/UrlHelper.html
@@ -216,7 +216,7 @@
The form submits a POST request by default. You can specify a different HTTP verb via the :method option within html_options.
-If the HTML button generated from button_to does not work with your layout, you can consider using the link_to method with the data-turbo-method attribute as described in the link_to documentation.
+If the HTML button generated from button_to does not work with your layout, you can consider using the link_to method with the data-turbo-method attribute as described in the link_to documentation.
Options
@@ -536,7 +536,7 @@ Options
Examples
-Because it relies on url_for, link_to supports both older-style controller/action/id arguments and newer RESTful routes. Current Rails style favors RESTful routes whenever possible, so base your application on resources and use
+Because it relies on url_for, link_to supports both older-style controller/action/id arguments and newer RESTful routes. Current Rails style favors RESTful routes whenever possible, so base your application on resources and use
link_to "Profile", profile_path(@profile)
# => <a href="/profiles/1">Profile</a>
@@ -606,7 +606,7 @@ Examples
# => <a href="/articles/index/news?class=article">WRONG!</a>
-link_to can also produce links with anchors or query strings:
+link_to can also produce links with anchors or query strings:
link_to "Comment wall", profile_path(@profile, anchor: "wall")
# => <a href="/profiles/1#wall">Comment wall</a>
@@ -710,7 +710,7 @@
- Creates a link tag of the given name using a URL created by the set of options if condition is true, otherwise only the name is returned. To specialize the default behavior, you can pass a block that accepts the name or the full argument list for link_to_if.
+ Creates a link tag of the given name using a URL created by the set of options if condition is true, otherwise only the name is returned. To specialize the default behavior, you can pass a block that accepts the name or the full argument list for link_to_if.
Examples
@@ -770,7 +770,7 @@
- Creates a link tag of the given name using a URL created by the set of options unless condition is true, in which case only the name is returned. To specialize the default behavior (i.e., show a login link rather than just the plaintext link text), you can pass a block that accepts the name or the full argument list for link_to_unless.
+ Creates a link tag of the given name using a URL created by the set of options unless condition is true, in which case only the name is returned. To specialize the default behavior (i.e., show a login link rather than just the plaintext link text), you can pass a block that accepts the name or the full argument list for link_to_unless.
Examples
@@ -822,7 +822,7 @@
- Creates a link tag of the given name using a URL created by the set of options unless the current request URI is the same as the links, in which case only the name is returned (or the given block is yielded, if one exists). You can give link_to_unless_current a block which will specialize the default behavior (e.g., show a “Start Here” link rather than the link’s text).
+ Creates a link tag of the given name using a URL created by the set of options unless the current request URI is the same as the links, in which case only the name is returned (or the given block is yielded, if one exists). You can give link_to_unless_current a block which will specialize the default behavior (e.g., show a “Start Here” link rather than the link’s text).
Examples
@@ -850,7 +850,7 @@ Examples
</ul>
-The implicit block given to link_to_unless_current is evaluated if the current action is the action given. So, if we had a comments page and wanted to render a “Go Back” link instead of a link to the comments page, we could do something like this…
+The implicit block given to link_to_unless_current is evaluated if the current action is the action given. So, if we had a comments page and wanted to render a “Go Back” link instead of a link to the comments page, we could do something like this…
<%=
link_to_unless_current("Comment", { controller: "comments", action: "new" }) do
@@ -894,7 +894,7 @@
Creates a mailto link tag to the specified email_address, which is also used as the name of the link unless name is specified. Additional HTML attributes for the link can be passed in html_options.
-mail_to has several methods for customizing the email itself by passing special keys to html_options.
+mail_to has several methods for customizing the email itself by passing special keys to html_options.
Options
-
@@ -911,7 +911,7 @@
Options
Obfuscation
-Prior to Rails 4.0, mail_to provided options for encoding the address in order to hinder email harvesters. To take advantage of these options, install the actionview-encoded_mail_to gem.
+Prior to Rails 4.0, mail_to provided options for encoding the address in order to hinder email harvesters. To take advantage of these options, install the actionview-encoded_mail_to gem.
Examples
diff --git a/src/7.1/classes/ActionView/Layouts/ClassMethods.html b/src/7.1/classes/ActionView/Layouts/ClassMethods.html
index 2b7e1d3c29..950485ef7d 100644
--- a/src/7.1/classes/ActionView/Layouts/ClassMethods.html
+++ b/src/7.1/classes/ActionView/Layouts/ClassMethods.html
@@ -69,27 +69,27 @@
Specify the layout to use for this class.
If the specified layout is a:
-String
+String
-
the String is the template name
- Symbol
+Symbol
-
call the method specified by the symbol
- - Proc
+
- Proc
-
call the passed Proc
- - false
+
- false
-
There is no layout
- - true
+
- true
-
raise an ArgumentError
- - nil
+
- nil
-
Force default layout behavior with inheritance
-Return value of Proc and Symbol arguments should be String, false, true, or nil with the same meaning as described above.
+Return value of Proc and Symbol arguments should be String, false, true, or nil with the same meaning as described above.
Parameters
-
diff --git a/src/7.1/classes/ActionView/Renderer.html b/src/7.1/classes/ActionView/Renderer.html
index 22bb8fa6c1..dc25b2dfbf 100644
--- a/src/7.1/classes/ActionView/Renderer.html
+++ b/src/7.1/classes/ActionView/Renderer.html
@@ -33,7 +33,7 @@
Action View Rende
This is the main entry point for rendering. It basically delegates to other objects like TemplateRenderer and PartialRenderer which actually renders the template.
-The Renderer will parse the options from the render or render_body method and render a partial or a template based on the options. The TemplateRenderer and PartialRenderer objects are wrappers which do all the setup and logic necessary to render a view and a new object is created each time render is called.
+The Renderer will parse the options from the render or render_body method and render a partial or a template based on the options. The TemplateRenderer and PartialRenderer objects are wrappers which do all the setup and logic necessary to render a view and a new object is created each time render is called.
diff --git a/src/7.1/classes/ActionView/RoutingUrlFor.html b/src/7.1/classes/ActionView/RoutingUrlFor.html
index 02b1f772f8..0eb0329cc5 100644
--- a/src/7.1/classes/ActionView/RoutingUrlFor.html
+++ b/src/7.1/classes/ActionView/RoutingUrlFor.html
@@ -66,7 +66,7 @@
- Returns the URL for the set of options provided. This takes the same options as url_for in Action Controller (see the documentation for ActionDispatch::Routing::UrlFor#url_for). Note that by default :only_path is true so you’ll get the relative "/controller/action" instead of the fully qualified URL like "http://example.com/controller/action".
+ Returns the URL for the set of options provided. This takes the same options as url_for in Action Controller (see the documentation for ActionDispatch::Routing::UrlFor#url_for). Note that by default :only_path is true so you’ll get the relative "/controller/action" instead of the fully qualified URL like "http://example.com/controller/action".
Options
-
@@ -87,7 +87,7 @@
Options
Relying on named routes
-Passing a record (like an Active Record) instead of a hash as the options parameter will trigger the named route for that record. The lookup will happen on the name of the class. So passing a Workshop object will attempt to use the workshop_path route. If you have a nested route, such as admin_workshop_path you’ll have to call that explicitly (it’s impossible for url_for to guess that route).
+Passing a record (like an Active Record) instead of a hash as the options parameter will trigger the named route for that record. The lookup will happen on the name of the class. So passing a Workshop object will attempt to use the workshop_path route. If you have a nested route, such as admin_workshop_path you’ll have to call that explicitly (it’s impossible for url_for to guess that route).
Implicit Controller Namespacing
diff --git a/src/7.1/classes/ActionView/Template.html b/src/7.1/classes/ActionView/Template.html
index 636a913f69..c9c264db4f 100644
--- a/src/7.1/classes/ActionView/Template.html
+++ b/src/7.1/classes/ActionView/Template.html
@@ -472,18 +472,18 @@
<%= render "application/header", { headline: "Welcome", person: person } %>
-
You can use local_assigns in the sub templates to access the local variables:
+You can use local_assigns in the sub templates to access the local variables:
local_assigns[:headline] # => "Welcome"
-Each key in local_assigns is available as a partial-local variable:
+Each key in local_assigns is available as a partial-local variable:
local_assigns[:headline] # => "Welcome"
headline # => "Welcome"
-Since local_assigns is a Hash, it’s compatible with Ruby 3.1’s pattern matching assignment operator:
+Since local_assigns is a Hash, it’s compatible with Ruby 3.1’s pattern matching assignment operator:
local_assigns => { headline:, **options }
headline # => "Welcome"
@@ -504,7 +504,7 @@
<% end %>
-Since local_assigns returns a Hash instance, you can conditionally read a variable, then fall back to a default value when the key isn’t part of the locals: { ... } options:
+Since local_assigns returns a Hash instance, you can conditionally read a variable, then fall back to a default value when the key isn’t part of the locals: { ... } options:
<% local_assigns.fetch(:alerts, []).each do |alert| %>
<p><%= alert %></p>
diff --git a/src/7.1/classes/ActionView/TestCase.html b/src/7.1/classes/ActionView/TestCase.html
index 63aa3f888b..016c1d04b2 100644
--- a/src/7.1/classes/ActionView/TestCase.html
+++ b/src/7.1/classes/ActionView/TestCase.html
@@ -31,7 +31,7 @@
Action View Test Case
-
Read more about ActionView::TestCase in Testing Rails Applications in the guides.
+Read more about ActionView::TestCase in Testing Rails Applications in the guides.
diff --git a/src/7.1/classes/ActionView/TestCase/Behavior.html b/src/7.1/classes/ActionView/TestCase/Behavior.html
index 62f7f172ff..31d906258b 100644
--- a/src/7.1/classes/ActionView/TestCase/Behavior.html
+++ b/src/7.1/classes/ActionView/TestCase/Behavior.html
@@ -300,7 +300,7 @@
.json
-Parse the rendered content String into JSON. By default, this means a ActiveSupport::HashWithIndifferentAccess.
+Parse the rendered content String into JSON. By default, this means a ActiveSupport::HashWithIndifferentAccess.
test "renders JSON" do
article = Article.create!(title: "Hello, world")
diff --git a/src/7.1/classes/ActionView/TestCase/Behavior/ClassMethods.html b/src/7.1/classes/ActionView/TestCase/Behavior/ClassMethods.html
index b6b74cd441..5ae18364b3 100644
--- a/src/7.1/classes/ActionView/TestCase/Behavior/ClassMethods.html
+++ b/src/7.1/classes/ActionView/TestCase/Behavior/ClassMethods.html
@@ -253,7 +253,7 @@
Register a callable to parse rendered content for a given template format.
-Each registered parser will also define a #rendered.[FORMAT] helper method, where [FORMAT] corresponds to the value of the format argument.
+Each registered parser will also define a rendered.[FORMAT] helper method, where [FORMAT] corresponds to the value of the format argument.
By default, ActionView::TestCase defines parsers for:
-
@@ -270,10 +270,10 @@
Parameters
-format
+format
-
-
The name (as a Symbol) of the format used to render the content.
- callable
+The name (as a Symbol) of the format used to render the content.
+callable
-
The parser. A callable object that accepts the rendered string as its sole argument. Alternatively, the parser can be specified as a block.
diff --git a/src/7.1/classes/ActiveJob/Enqueuing/ClassMethods.html b/src/7.1/classes/ActiveJob/Enqueuing/ClassMethods.html
index 7b0461f20a..7d6d0e49b7 100644
--- a/src/7.1/classes/ActiveJob/Enqueuing/ClassMethods.html
+++ b/src/7.1/classes/ActiveJob/Enqueuing/ClassMethods.html
@@ -23,7 +23,7 @@
-Includes the perform_later method for job initialization.
+Includes the perform_later method for job initialization.
diff --git a/src/7.1/classes/ActiveJob/Execution.html b/src/7.1/classes/ActiveJob/Execution.html
index 610f111869..7a623f344b 100644
--- a/src/7.1/classes/ActiveJob/Execution.html
+++ b/src/7.1/classes/ActiveJob/Execution.html
@@ -140,7 +140,7 @@
- Performs the job immediately. The job is not sent to the queuing adapter but directly executed by blocking the execution of others until it’s finished. perform_now returns the value of your job’s perform method.
+ Performs the job immediately. The job is not sent to the queuing adapter but directly executed by blocking the execution of others until it’s finished. perform_now returns the value of your job’s perform method.
class MyJob < ActiveJob::Base
def perform
diff --git a/src/7.1/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html b/src/7.1/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html
index 298fdd3b74..8b731a71ab 100644
--- a/src/7.1/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html
+++ b/src/7.1/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html
@@ -89,7 +89,7 @@
Builds a QC::Queue object to schedule jobs on.
-If you have a custom QC::Queue subclass you’ll need to subclass ActiveJob::QueueAdapters::QueueClassicAdapter and override the build_queue method.
+If you have a custom QC::Queue subclass you’ll need to subclass ActiveJob::QueueAdapters::QueueClassicAdapter and override the build_queue method.
diff --git a/src/7.1/classes/ActiveJob/TestHelper.html b/src/7.1/classes/ActiveJob/TestHelper.html
index dc9fbd2737..4fa9b6f803 100644
--- a/src/7.1/classes/ActiveJob/TestHelper.html
+++ b/src/7.1/classes/ActiveJob/TestHelper.html
@@ -537,7 +537,7 @@
- Asserts that the number of performed jobs matches the given number. If no block is passed, perform_enqueued_jobs must be called around or after the job call.
+ Asserts that the number of performed jobs matches the given number. If no block is passed, perform_enqueued_jobs must be called around or after the job call.
def test_jobs
assert_performed_jobs 0
@@ -859,7 +859,7 @@
If the :at option is specified, then only jobs that have been enqueued to run at or before the given time will be performed. This includes jobs that have been enqueued without a time.
-If queue_adapter_for_test is overridden to return a different adapter, perform_enqueued_jobs will merely execute the block.
+If queue_adapter_for_test is overridden to return a different adapter, perform_enqueued_jobs will merely execute the block.
diff --git a/src/7.1/classes/ActiveModel.html b/src/7.1/classes/ActiveModel.html
index 13cebb8062..569a320bd5 100644
--- a/src/7.1/classes/ActiveModel.html
+++ b/src/7.1/classes/ActiveModel.html
@@ -197,7 +197,7 @@ Act
You can read more about Active Model in the Active Model Basics guide.
-Prior to Rails 3.0, if a plugin or gem developer wanted to have an object interact with Action Pack helpers, it was required to either copy chunks of code from Rails, or monkey patch entire helpers to make them handle objects that did not exactly conform to the Active Record interface. This would result in code duplication and fragile applications that broke on upgrades. Active Model solves this by defining an explicit API. You can read more about the API in ActiveModel::Lint::Tests.
+Prior to Rails 3.0, if a plugin or gem developer wanted to have an object interact with Action Pack helpers, it was required to either copy chunks of code from Rails, or monkey patch entire helpers to make them handle objects that did not exactly conform to the Active Record interface. This would result in code duplication and fragile applications that broke on upgrades. Active Model solves this by defining an explicit API. You can read more about the API in ActiveModel::Lint::Tests.
Active Model provides a default module that implements the basic API required to integrate with Action Pack out of the box: ActiveModel::API.
diff --git a/src/7.1/classes/ActiveModel/API.html b/src/7.1/classes/ActiveModel/API.html
index 0f65b4aa82..60557eb6df 100644
--- a/src/7.1/classes/ActiveModel/API.html
+++ b/src/7.1/classes/ActiveModel/API.html
@@ -39,7 +39,7 @@ Active Model API
person.age # => "18"
-Note that, by default, ActiveModel::API implements persisted? to return false, which is the most common case. You may want to override it in your class to simulate a different scenario:
+Note that, by default, ActiveModel::API implements persisted? to return false, which is the most common case. You may want to override it in your class to simulate a different scenario:
class Person
include ActiveModel::API
@@ -70,7 +70,7 @@ Active Model API
person.omg # => true
-For more detailed information on other functionalities available, please refer to the specific modules included in ActiveModel::API (see below).
+For more detailed information on other functionalities available, please refer to the specific modules included in ActiveModel::API (see below).
diff --git a/src/7.1/classes/ActiveModel/AttributeMethods.html b/src/7.1/classes/ActiveModel/AttributeMethods.html
index 8453e75240..671e9f2237 100644
--- a/src/7.1/classes/ActiveModel/AttributeMethods.html
+++ b/src/7.1/classes/ActiveModel/AttributeMethods.html
@@ -33,7 +33,7 @@ ActiveRecord::Base - like class methods such as table_name.
-
The requirements to implement ActiveModel::AttributeMethods are to:
+The requirements to implement ActiveModel::AttributeMethods are to:
-
include ActiveModel::AttributeMethods in your class.
-
@@ -176,7 +176,7 @@
- attribute_missing is like method_missing, but for attributes. When method_missing is called we check to see if there is a matching attribute method. If so, we tell attribute_missing to dispatch the attribute. This method can be overloaded to customize the behavior.
+ attribute_missing is like method_missing, but for attributes. When method_missing is called we check to see if there is a matching attribute method. If so, we tell attribute_missing to dispatch the attribute. This method can be overloaded to customize the behavior.
diff --git a/src/7.1/classes/ActiveModel/AttributeMethods/ClassMethods.html b/src/7.1/classes/ActiveModel/AttributeMethods/ClassMethods.html
index 8a2e6a29ff..2194f82ac5 100644
--- a/src/7.1/classes/ActiveModel/AttributeMethods/ClassMethods.html
+++ b/src/7.1/classes/ActiveModel/AttributeMethods/ClassMethods.html
@@ -426,9 +426,9 @@
- Declares an attribute that should be prefixed and suffixed by ActiveModel::AttributeMethods.
+ Declares an attribute that should be prefixed and suffixed by ActiveModel::AttributeMethods.
-To use, pass an attribute name (as string or symbol). Be sure to declare define_attribute_method after you define any prefix, suffix or affix method, or they will not hook in.
+To use, pass an attribute name (as string or symbol). Be sure to declare define_attribute_method after you define any prefix, suffix or affix method, or they will not hook in.
class Person
include ActiveModel::AttributeMethods
@@ -491,9 +491,9 @@
- Declares the attributes that should be prefixed and suffixed by ActiveModel::AttributeMethods.
+ Declares the attributes that should be prefixed and suffixed by ActiveModel::AttributeMethods.
-To use, pass attribute names (as strings or symbols). Be sure to declare define_attribute_methods after you define any prefix, suffix, or affix methods, or they will not hook in.
+To use, pass attribute names (as strings or symbols). Be sure to declare define_attribute_methods after you define any prefix, suffix, or affix methods, or they will not hook in.
class Person
include ActiveModel::AttributeMethods
diff --git a/src/7.1/classes/ActiveModel/Callbacks.html b/src/7.1/classes/ActiveModel/Callbacks.html
index 310625f92d..38185a242c 100644
--- a/src/7.1/classes/ActiveModel/Callbacks.html
+++ b/src/7.1/classes/ActiveModel/Callbacks.html
@@ -29,7 +29,7 @@ Active Model
Like the Active Record methods, the callback chain is aborted as soon as one of the methods throws :abort.
-First, extend ActiveModel::Callbacks from the class you are creating:
+First, extend ActiveModel::Callbacks from the class you are creating:
class MyModel
extend ActiveModel::Callbacks
@@ -70,7 +70,7 @@ Active Model
end
-You can choose to have only specific callbacks by passing a hash to the define_model_callbacks method.
+You can choose to have only specific callbacks by passing a hash to the define_model_callbacks method.
define_model_callbacks :create, only: [:after, :before]
@@ -140,12 +140,12 @@
- define_model_callbacks accepts the same options define_callbacks does, in case you want to overwrite a default. Besides that, it also accepts an :only option, where you can choose if you want all types (before, around or after) or just some.
+ define_model_callbacks accepts the same options define_callbacks does, in case you want to overwrite a default. Besides that, it also accepts an :only option, where you can choose if you want all types (before, around or after) or just some.
define_model_callbacks :initialize, only: :after
-Note, the only: <type> hash will apply to all callbacks defined on that method call. To get around this you can call the define_model_callbacks method as many times as you need.
+Note, the only: <type> hash will apply to all callbacks defined on that method call. To get around this you can call the define_model_callbacks method as many times as you need.
define_model_callbacks :create, only: :after
define_model_callbacks :update, only: :before
@@ -170,7 +170,7 @@
end
-NOTE: method_name passed to define_model_callbacks must not end with !, ? or =.
+NOTE: method_name passed to define_model_callbacks must not end with !, ? or =.
diff --git a/src/7.1/classes/ActiveModel/Dirty.html b/src/7.1/classes/ActiveModel/Dirty.html
index 4c79156fff..18c652d65d 100644
--- a/src/7.1/classes/ActiveModel/Dirty.html
+++ b/src/7.1/classes/ActiveModel/Dirty.html
@@ -35,11 +35,11 @@ Active Model Dirty
-
Call *_will_change! before each change to the tracked attribute.
-
-
Call changes_applied after the changes are persisted.
+Call changes_applied after the changes are persisted.
-
-
Call clear_changes_information when you want to reset the changes information.
+Call clear_changes_information when you want to reset the changes information.
-
-
Call restore_attributes when you want to restore previous data.
+Call restore_attributes when you want to restore previous data.
A minimal implementation could be:
@@ -808,7 +808,7 @@
- Clears dirty data and moves changes to previous_changes and mutations_from_database to mutations_before_last_save respectively.
+ Clears dirty data and moves changes to previous_changes and mutations_from_database to mutations_before_last_save respectively.
diff --git a/src/7.1/classes/ActiveModel/EachValidator.html b/src/7.1/classes/ActiveModel/EachValidator.html
index 59cf027629..cc5664c49d 100644
--- a/src/7.1/classes/ActiveModel/EachValidator.html
+++ b/src/7.1/classes/ActiveModel/EachValidator.html
@@ -31,7 +31,7 @@
Active Model EachValidator
-
EachValidator is a validator which iterates through the attributes given in the options hash invoking the validate_each method passing in the record, attribute, and value.
+EachValidator is a validator which iterates through the attributes given in the options hash invoking the validate_each method passing in the record, attribute, and value.
All Active Model validations are built on top of this validator.
@@ -183,7 +183,7 @@
- Performs validation on the supplied record. By default this will call validate_each to determine validity therefore subclasses should override validate_each with validation logic.
+ Performs validation on the supplied record. By default this will call validate_each to determine validity therefore subclasses should override validate_each with validation logic.
diff --git a/src/7.1/classes/ActiveModel/Errors.html b/src/7.1/classes/ActiveModel/Errors.html
index 88f3830131..2555d860d1 100644
--- a/src/7.1/classes/ActiveModel/Errors.html
+++ b/src/7.1/classes/ActiveModel/Errors.html
@@ -66,7 +66,7 @@ Active Model Errors
end
-The last three methods are required in your object for Errors to be able to generate error messages correctly and also handle multiple languages. Of course, if you extend your object with ActiveModel::Translation you will not need to implement the last two. Likewise, using ActiveModel::Validations will handle the validation related methods for you.
+The last three methods are required in your object for Errors to be able to generate error messages correctly and also handle multiple languages. Of course, if you extend your object with ActiveModel::Translation you will not need to implement the last two. Likewise, using ActiveModel::Validations will handle the validation related methods for you.
The above allows you to do:
@@ -239,7 +239,7 @@ Attributes
[R]
errors
- The actual array of Error objects This method is aliased to objects.
+ The actual array of Error objects This method is aliased to objects.
@@ -247,7 +247,7 @@ Attributes
[R]
objects
- The actual array of Error objects This method is aliased to objects.
+ The actual array of Error objects This method is aliased to objects.
@@ -366,7 +366,7 @@
If type is a string, it will be used as error message.
-If type is a symbol, it will be translated using the appropriate scope (see generate_message).
+If type is a symbol, it will be translated using the appropriate scope (see generate_message).
person.errors.add(:name, :blank)
person.errors.messages
@@ -1355,7 +1355,7 @@
- Returns a Hash of attributes with their error messages. If full_messages is true, it will contain full messages (see full_message).
+ Returns a Hash of attributes with their error messages. If full_messages is true, it will contain full messages (see full_message).
person.errors.to_hash # => {:name=>["cannot be nil"]}
person.errors.to_hash(true) # => {:name=>["name cannot be nil"]}
diff --git a/src/7.1/classes/ActiveModel/Lint/Tests.html b/src/7.1/classes/ActiveModel/Lint/Tests.html
index 03bb2637cb..5f3fef5826 100644
--- a/src/7.1/classes/ActiveModel/Lint/Tests.html
+++ b/src/7.1/classes/ActiveModel/Lint/Tests.html
@@ -25,7 +25,7 @@
Active Model Lint Tests
-
You can test whether an object is compliant with the Active Model API by including ActiveModel::Lint::Tests in your TestCase. It will include tests that tell you whether your object is fully compliant, or if not, which aspects of the API are not implemented.
+You can test whether an object is compliant with the Active Model API by including ActiveModel::Lint::Tests in your TestCase. It will include tests that tell you whether your object is fully compliant, or if not, which aspects of the API are not implemented.
Note an object is not required to implement all APIs in order to work with Action Pack. This module only intends to provide guidance in case you want all features out of the box.
diff --git a/src/7.1/classes/ActiveModel/Model.html b/src/7.1/classes/ActiveModel/Model.html
index 93d950f662..52a2260085 100644
--- a/src/7.1/classes/ActiveModel/Model.html
+++ b/src/7.1/classes/ActiveModel/Model.html
@@ -55,7 +55,7 @@ Active Model B
person.omg # => true
-For more detailed information on other functionalities available, please refer to the specific modules included in ActiveModel::Model (see below).
+For more detailed information on other functionalities available, please refer to the specific modules included in ActiveModel::Model (see below).
diff --git a/src/7.1/classes/ActiveModel/Name.html b/src/7.1/classes/ActiveModel/Name.html
index 23e4ec512c..609c5a25fd 100644
--- a/src/7.1/classes/ActiveModel/Name.html
+++ b/src/7.1/classes/ActiveModel/Name.html
@@ -376,7 +376,7 @@
- Equivalent to #==.
+ Equivalent to ==.
class BlogPost
extend ActiveModel::Naming
@@ -587,7 +587,7 @@
- Equivalent to to_s.
+ Equivalent to to_s.
diff --git a/src/7.1/classes/ActiveModel/Naming.html b/src/7.1/classes/ActiveModel/Naming.html
index 7ef3819b42..89116bd29e 100644
--- a/src/7.1/classes/ActiveModel/Naming.html
+++ b/src/7.1/classes/ActiveModel/Naming.html
@@ -25,7 +25,7 @@
Active Model Naming
-
Creates a model_name method on your object.
+Creates a model_name method on your object.
To implement, just extend ActiveModel::Naming in your object:
diff --git a/src/7.1/classes/ActiveModel/SecurePassword/ClassMethods.html b/src/7.1/classes/ActiveModel/SecurePassword/ClassMethods.html
index 750d537cbb..46fd1dd1fb 100644
--- a/src/7.1/classes/ActiveModel/SecurePassword/ClassMethods.html
+++ b/src/7.1/classes/ActiveModel/SecurePassword/ClassMethods.html
@@ -97,7 +97,7 @@
All of the above validations can be omitted by passing validations: false as an argument. This allows complete customizability of validation behavior.
-To use has_secure_password, add bcrypt (~> 3.1.7) to your Gemfile:
+To use has_secure_password, add bcrypt (~> 3.1.7) to your Gemfile:
gem 'bcrypt', '~> 3.1.7'
diff --git a/src/7.1/classes/ActiveModel/Serialization.html b/src/7.1/classes/ActiveModel/Serialization.html
index d8640bd52c..46c527187b 100644
--- a/src/7.1/classes/ActiveModel/Serialization.html
+++ b/src/7.1/classes/ActiveModel/Serialization.html
@@ -50,7 +50,7 @@ Acti
An attributes hash must be defined and should contain any attributes you need to be serialized. Attributes must be strings, not symbols. When called, serializable hash will use instance methods that match the name of the attributes hash’s keys. In order to override this behavior, take a look at the private method read_attribute_for_serialization.
-ActiveModel::Serializers::JSON module automatically includes the ActiveModel::Serialization module, so there is no need to explicitly include ActiveModel::Serialization.
+ActiveModel::Serializers::JSON module automatically includes the ActiveModel::Serialization module, so there is no need to explicitly include ActiveModel::Serialization.
A minimal implementation including JSON would be:
diff --git a/src/7.1/classes/ActiveModel/Serializers/JSON.html b/src/7.1/classes/ActiveModel/Serializers/JSON.html
index e5c1da805a..013ee7ef89 100644
--- a/src/7.1/classes/ActiveModel/Serializers/JSON.html
+++ b/src/7.1/classes/ActiveModel/Serializers/JSON.html
@@ -92,7 +92,7 @@
Returns a hash representing the model. Some configuration can be passed through options.
-The option include_root_in_json controls the top-level behavior of as_json. If true, as_json will emit a single root node named after the object’s type. The default value for include_root_in_json option is false.
+The option include_root_in_json controls the top-level behavior of as_json. If true, as_json will emit a single root node named after the object’s type. The default value for include_root_in_json option is false.
user = User.find(1)
user.as_json
diff --git a/src/7.1/classes/ActiveModel/Translation.html b/src/7.1/classes/ActiveModel/Translation.html
index 08867bac7f..d70b23bc2a 100644
--- a/src/7.1/classes/ActiveModel/Translation.html
+++ b/src/7.1/classes/ActiveModel/Translation.html
@@ -37,7 +37,7 @@ Active M
# => "My attribute"
-This also provides the required class methods for hooking into the Rails internationalization API, including being able to define a class-based i18n_scope and lookup_ancestors to find translations in parent classes.
+This also provides the required class methods for hooking into the Rails internationalization API, including being able to define a class-based i18n_scope and lookup_ancestors to find translations in parent classes.
@@ -170,7 +170,7 @@
- Returns the i18n_scope for the class. Override if you want custom lookup.
+ Returns the i18n_scope for the class. Override if you want custom lookup.
diff --git a/src/7.1/classes/ActiveModel/Type/Boolean.html b/src/7.1/classes/ActiveModel/Type/Boolean.html
index ee011a10d4..9b249229c7 100644
--- a/src/7.1/classes/ActiveModel/Type/Boolean.html
+++ b/src/7.1/classes/ActiveModel/Type/Boolean.html
@@ -35,7 +35,7 @@ Activ
A class that behaves like a boolean type, including rules for coercion of user input.
-
-
"false", "f", "0", 0 or any other value in FALSE_VALUES will be coerced to false.
+"false", "f", "0", 0 or any other value in FALSE_VALUES will be coerced to false.
-
Empty strings are coerced to nil.
-
diff --git a/src/7.1/classes/ActiveModel/Type/Value.html b/src/7.1/classes/ActiveModel/Type/Value.html
index 614c90d9bc..b1c551a41c 100644
--- a/src/7.1/classes/ActiveModel/Type/Value.html
+++ b/src/7.1/classes/ActiveModel/Type/Value.html
@@ -581,7 +581,7 @@
- Casts a value from the ruby type to a type that the database knows how to understand. The returned value from this method should be a String, Numeric, Date, Time, Symbol, true, false, or nil.
+ Casts a value from the ruby type to a type that the database knows how to understand. The returned value from this method should be a