diff --git a/src/classes/AbstractController/Base.html b/src/classes/AbstractController/Base.html index 4fad9e6b82..a5147678c4 100644 --- a/src/classes/AbstractController/Base.html +++ b/src/classes/AbstractController/Base.html @@ -149,17 +149,11 @@

Attributes

Class Public methods

-

- - abstract!() - -

+

abstract!()

- -
-

Define a controller as abstract. See internal_methods for more details.

-
- +
+

Define a controller as abstract. See internal_methods for more details.

+
@@ -184,17 +178,11 @@

-

- - action_methods() - -

+

action_methods()

- -
-

A Set of method names that should be considered actions. This includes all public instance methods on a controller, less any internal methods (see internal_methods), adding back in any methods that are internal, but still exist on the class itself.

-
- +
+

A Set of method names that should be considered actions. This includes all public instance methods on a controller, less any internal methods (see internal_methods), adding back in any methods that are internal, but still exist on the class itself.

+
@@ -228,17 +216,11 @@

-

- - clear_action_methods!() - -

+

clear_action_methods!()

- -
-

action_methods are cached and there is sometimes a need to refresh them. ::clear_action_methods! allows you to do that, so next time you run action_methods, they will be recalculated.

-
- +
+

action_methods are cached and there is sometimes a need to refresh them. ::clear_action_methods! allows you to do that, so next time you run action_methods, they will be recalculated.

+
@@ -263,15 +245,10 @@

-

- - controller_path() - -

+

controller_path()

- -
-

Returns the full controller name, underscored, without the ending Controller.

+
+

Returns the full controller name, underscored, without the ending Controller.

class MyApp::MyPostsController < AbstractController::Base
 
@@ -279,8 +256,7 @@ 

MyApp::MyPostsController.controller_path # => "my_app/my_posts"

-
- +
@@ -305,17 +281,11 @@

-

- - internal_methods() - -

+

internal_methods()

- -
-

A list of all internal methods for a controller. This finds the first abstract superclass of a controller, and gets a list of all public instance methods on that abstract class. Public instance methods of a controller would normally be considered action methods, so methods declared on abstract classes are being removed. (ActionController::Metal and ActionController::Base are defined as abstract)

-
- +
+

A list of all internal methods for a controller. This finds the first abstract superclass of a controller, and gets a list of all public instance methods on that abstract class. Public instance methods of a controller would normally be considered action methods, so methods declared on abstract classes are being removed. (ActionController::Metal and ActionController::Base are defined as abstract)

+
@@ -348,17 +318,11 @@

-

- - method_added(name) - -

+

method_added(name)

- -
-

Refresh the cached action_methods when a new action_method is added.

-
- +
+

Refresh the cached action_methods when a new action_method is added.

+
@@ -384,17 +348,11 @@

-

- - supports_path?() - -

+

supports_path?()

- -
-

Returns true if the given controller is capable of rendering a path. A subclass of AbstractController::Base may return false. An Email controller for example does not support paths, only full URLs.

-
- +
+

Returns true if the given controller is capable of rendering a path. A subclass of AbstractController::Base may return false. An Email controller for example does not support paths, only full URLs.

+
@@ -423,17 +381,11 @@

Instance Public methods

-

- - action_methods() - -

+

action_methods()

- -
-

Delegates to the class’s ::action_methods.

-
- +
+

Delegates to the class’s ::action_methods.

+
@@ -458,17 +410,11 @@

-

- - action_name - -

+

action_name

- -
-

Returns the name of the action this controller is processing.

-
- +
+

Returns the name of the action this controller is processing.

+
@@ -492,15 +438,10 @@

-

- - available_action?(action_name) - -

+

available_action?(action_name)

- -
-

Returns true if a method for the action is available and can be dispatched, false otherwise.

+
+

Returns true if a method for the action is available and can be dispatched, false otherwise.

Notice that action_methods.include?("foo") may return false and available_action?("foo") returns true because this method considers actions that are also available through other means, for example, implicit render ones.

@@ -508,8 +449,7 @@

Parameters

-
- +
@@ -534,17 +474,11 @@

Parameters

-

- - controller_path() - -

+

controller_path()

- -
-

Delegates to the class’s ::controller_path.

-
- +
+

Delegates to the class’s ::controller_path.

+
@@ -569,17 +503,11 @@

-

- - formats - -

+

formats

- -
-

Returns the formats that can be processed by the controller.

-
- +
+

Returns the formats that can be processed by the controller.

+
@@ -603,17 +531,11 @@

-

- - performed?() - -

+

performed?()

- -
-

Tests if a response body is set. Used to determine if the process_action callback needs to be terminated in AbstractController::Callbacks.

-
- +
+

Tests if a response body is set. Used to determine if the process_action callback needs to be terminated in AbstractController::Callbacks.

+
@@ -638,19 +560,13 @@

-

- - process(action, ...) - -

+

process(action, ...)

- -
-

Calls the action going through the entire Action Dispatch stack.

+
+

Calls the action going through the entire Action Dispatch stack.

The actual method that is called is determined by calling method_for_action. If no method can handle the action, then an AbstractController::ActionNotFound error is raised.

-
- +
@@ -683,17 +599,11 @@

-

- - response_body - -

+

response_body

- -
-

Returns the body of the HTTP response sent by the controller.

-
- +
+

Returns the body of the HTTP response sent by the controller.

+
diff --git a/src/classes/AbstractController/Caching.html b/src/classes/AbstractController/Caching.html index 5712afd4d1..2a3e5aa07d 100644 --- a/src/classes/AbstractController/Caching.html +++ b/src/classes/AbstractController/Caching.html @@ -103,17 +103,9 @@

Included Modules

Instance Public methods

-

- - view_cache_dependencies() - -

+

view_cache_dependencies()

-
- -
- @@ -141,17 +133,11 @@

Instance Private methods

-

- - cache(key, options = {}, &block) - -

+

cache(key, options = {}, &block)

- -
-

Convenience accessor.

-
- +
+

Convenience accessor.

+
diff --git a/src/classes/AbstractController/Caching/ClassMethods.html b/src/classes/AbstractController/Caching/ClassMethods.html index 769e43a1d0..6ca8cb75b6 100644 --- a/src/classes/AbstractController/Caching/ClassMethods.html +++ b/src/classes/AbstractController/Caching/ClassMethods.html @@ -58,17 +58,9 @@

Methods

Instance Public methods

-

- - view_cache_dependency(&dependency) - -

+

view_cache_dependency(&dependency)

-
- -
- diff --git a/src/classes/AbstractController/Caching/ConfigMethods.html b/src/classes/AbstractController/Caching/ConfigMethods.html index 9b5ab3b1d2..3c4fa58d3b 100644 --- a/src/classes/AbstractController/Caching/ConfigMethods.html +++ b/src/classes/AbstractController/Caching/ConfigMethods.html @@ -62,17 +62,9 @@

Methods

Instance Public methods

-

- - cache_store() - -

+

cache_store()

-
- -
- @@ -97,17 +89,9 @@

-

- - cache_store=(store) - -

+

cache_store=(store)

-
- -
- diff --git a/src/classes/AbstractController/Caching/Fragments.html b/src/classes/AbstractController/Caching/Fragments.html index c3adf29074..d6f716729e 100644 --- a/src/classes/AbstractController/Caching/Fragments.html +++ b/src/classes/AbstractController/Caching/Fragments.html @@ -100,17 +100,11 @@

Methods

Instance Public methods

-

- - combined_fragment_cache_key(key) - -

+

combined_fragment_cache_key(key)

- -
-

Given a key (as described in 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.

-
- +
+

Given a key (as described in 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.

+
@@ -141,15 +135,10 @@

-

- - expire_fragment(key, options = nil) - -

+

expire_fragment(key, options = nil)

- -
-

Removes fragments from the cache.

+
+

Removes fragments from the cache.

key can take one of three forms:

  • @@ -161,8 +150,7 @@

options is passed through to the cache store’s delete method (or delete_matched, for Regexp keys).

-
- +
@@ -196,17 +184,11 @@

-

- - fragment_exist?(key, options = nil) - -

+

fragment_exist?(key, options = nil)

- -
-

Check if a cached fragment from the location signified by key exists (see expire_fragment for acceptable formats).

-
- +
+

Check if a cached fragment from the location signified by key exists (see expire_fragment for acceptable formats).

+
@@ -236,17 +218,11 @@

-

- - read_fragment(key, options = nil) - -

+

read_fragment(key, options = nil)

- -
-

Reads a cached fragment from the location signified by key (see expire_fragment for acceptable formats).

-
- +
+

Reads a cached fragment from the location signified by key (see expire_fragment for acceptable formats).

+
@@ -277,17 +253,11 @@

-

- - write_fragment(key, content, options = nil) - -

+

write_fragment(key, content, options = nil)

- -
-

Writes content to the location signified by key (see expire_fragment for acceptable formats).

-
- +
+

Writes content to the location signified by key (see expire_fragment for acceptable formats).

+
diff --git a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html index 3fd0838698..b921a6328c 100644 --- a/src/classes/AbstractController/Caching/Fragments/ClassMethods.html +++ b/src/classes/AbstractController/Caching/Fragments/ClassMethods.html @@ -58,15 +58,10 @@

Methods

Instance Public methods

-

- - fragment_cache_key(value = nil, &key) - -

+

fragment_cache_key(value = nil, &key)

- -
-

Allows you to specify controller-wide key prefixes for cache fragments. Pass either a constant value, or a block which computes a value each time a cache key is generated.

+
+

Allows you to specify controller-wide key prefixes for cache fragments. Pass either a constant value, or a block which computes a value each time a cache key is generated.

For example, you may want to prefix all fragment cache keys with a global version identifier, so you can easily invalidate all caches.

@@ -83,8 +78,7 @@

end end -

- +
diff --git a/src/classes/AbstractController/Callbacks/ClassMethods.html b/src/classes/AbstractController/Callbacks/ClassMethods.html index 43c33d5431..279f53a789 100644 --- a/src/classes/AbstractController/Callbacks/ClassMethods.html +++ b/src/classes/AbstractController/Callbacks/ClassMethods.html @@ -110,15 +110,10 @@

Methods

Instance Public methods

-

- - _insert_callbacks(callbacks, block = nil) - -

+

_insert_callbacks(callbacks, block = nil)

- -
-

Take callback names and an optional callback proc, normalize them, then call the block with each callback. This allows us to abstract the normalization across several methods that use it.

+
+

Take callback names and an optional callback proc, normalize them, then call the block with each callback. This allows us to abstract the normalization across several methods that use it.

Parameters

  • @@ -133,8 +128,7 @@

    Block Parameters

  • options - A hash of options to be used when adding the callback.

-
- +
@@ -166,15 +160,10 @@

Block Parameters

-

- - _normalize_callback_options(options) - -

+

_normalize_callback_options(options)

- -
-

If :only or :except are used, convert the options into the :if and :unless options of ActiveSupport::Callbacks.

+
+

If :only or :except are used, convert the options into the :if and :unless options of ActiveSupport::Callbacks.

The basic idea is that :only => :index gets converted to :if => proc {|c| c.action_name == "index" }.

@@ -194,8 +183,7 @@

Options

  • except - The callback should be run for all actions except this action.

  • -
    - +
    @@ -221,18 +209,12 @@

    Options

    -

    - - after_action(names, block) +

    after_action(names, block) +

    - - - - -
    -

    Append a callback after actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Append a callback after actions. See _insert_callbacks for parameter details.

    +
    @@ -245,18 +227,12 @@

    -

    - - append_after_action(names, block) - - -

    +

    append_after_action(names, block) +

    - -
    -

    Append a callback after actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Append a callback after actions. See _insert_callbacks for parameter details.

    +
    @@ -269,18 +245,12 @@

    -

    - - append_around_action(names, block) +

    append_around_action(names, block) +

    - - - - -
    -

    Append a callback around actions. See _insert_callbacks for parameter details. set up before_action, prepend_before_action, skip_before_action, etc. for each of before, after, and around.

    -
    - +
    +

    Append a callback around actions. See _insert_callbacks for parameter details. set up before_action, prepend_before_action, skip_before_action, etc. for each of before, after, and around.

    +
    @@ -293,20 +263,14 @@

    -

    - - append_before_action(names, block) - - -

    +

    append_before_action(names, block) +

    - -
    -

    Append a callback before actions. See _insert_callbacks for parameter details.

    +
    +

    Append a callback before actions. See _insert_callbacks for parameter details.

    If the callback renders or redirects, the action will not run. If there are additional callbacks scheduled to run after that callback, they are also cancelled.

    -
    - +
    @@ -319,18 +283,12 @@

    -

    - - around_action(names, block) - - -

    +

    around_action(names, block) +

    - -
    -

    Append a callback around actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Append a callback around actions. See _insert_callbacks for parameter details.

    +
    @@ -343,20 +301,14 @@

    -

    - - before_action(names, block) +

    before_action(names, block) +

    - - - - -
    -

    Append a callback before actions. See _insert_callbacks for parameter details.

    +
    +

    Append a callback before actions. See _insert_callbacks for parameter details.

    If the callback renders or redirects, the action will not run. If there are additional callbacks scheduled to run after that callback, they are also cancelled.

    -
    - +
    @@ -369,18 +321,12 @@

    -

    - - prepend_after_action(names, block) +

    prepend_after_action(names, block) +

    - - - - -
    -

    Prepend a callback after actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Prepend a callback after actions. See _insert_callbacks for parameter details.

    +
    @@ -393,18 +339,12 @@

    -

    - - prepend_around_action(names, block) - - -

    +

    prepend_around_action(names, block) +

    - -
    -

    Prepend a callback around actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Prepend a callback around actions. See _insert_callbacks for parameter details.

    +
    @@ -417,20 +357,14 @@

    -

    - - prepend_before_action(names, block) +

    prepend_before_action(names, block) +

    - - - - -
    -

    Prepend a callback before actions. See _insert_callbacks for parameter details.

    +
    +

    Prepend a callback before actions. See _insert_callbacks for parameter details.

    If the callback renders or redirects, the action will not run. If there are additional callbacks scheduled to run after that callback, they are also cancelled.

    -
    - +
    @@ -443,18 +377,12 @@

    -

    - - skip_after_action(names) - - -

    +

    skip_after_action(names) +

    - -
    -

    Skip a callback after actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Skip a callback after actions. See _insert_callbacks for parameter details.

    +
    @@ -467,18 +395,12 @@

    -

    - - skip_around_action(names) - - -

    +

    skip_around_action(names) +

    - -
    -

    Skip a callback around actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Skip a callback around actions. See _insert_callbacks for parameter details.

    +
    @@ -491,18 +413,12 @@

    -

    - - skip_before_action(names) +

    skip_before_action(names) +

    - - - - -
    -

    Skip a callback before actions. See _insert_callbacks for parameter details.

    -
    - +
    +

    Skip a callback before actions. See _insert_callbacks for parameter details.

    +
    diff --git a/src/classes/AbstractController/Collector.html b/src/classes/AbstractController/Collector.html index 763d356b2e..ef82e1848e 100644 --- a/src/classes/AbstractController/Collector.html +++ b/src/classes/AbstractController/Collector.html @@ -57,17 +57,9 @@

    Methods

    Class Public methods

    -

    - - generate_method_for_mime(mime) - -

    +

    generate_method_for_mime(mime)

    -
    - -
    - diff --git a/src/classes/AbstractController/DoubleRenderError.html b/src/classes/AbstractController/DoubleRenderError.html index 8f48bc9ef3..2af07391ab 100644 --- a/src/classes/AbstractController/DoubleRenderError.html +++ b/src/classes/AbstractController/DoubleRenderError.html @@ -76,17 +76,9 @@

    Constants

    Class Public methods

    -

    - - new(message = nil) - -

    +

    new(message = nil)

    -
    - -
    - diff --git a/src/classes/AbstractController/Helpers.html b/src/classes/AbstractController/Helpers.html index b4d98aa351..a96b7ab681 100644 --- a/src/classes/AbstractController/Helpers.html +++ b/src/classes/AbstractController/Helpers.html @@ -71,17 +71,9 @@

    Methods

    Instance Public methods

    -

    - - _helpers() - -

    +

    _helpers()

    -
    - -
    - diff --git a/src/classes/AbstractController/Helpers/ClassMethods.html b/src/classes/AbstractController/Helpers/ClassMethods.html index 33df6d47c3..be9465245f 100644 --- a/src/classes/AbstractController/Helpers/ClassMethods.html +++ b/src/classes/AbstractController/Helpers/ClassMethods.html @@ -96,22 +96,16 @@

    Attributes

    Instance Public methods

    -

    - - all_helpers_from_path(path) +

    all_helpers_from_path(path) +

    - - - - -
    -

    Returns a list of helper names in a given path.

    +
    +

    Returns a list of helper names in a given path.

    ActionController::Base.all_helpers_from_path 'app/helpers'
     # => ["application", "chart", "rubygems"]
     
    -
    - +
    @@ -124,17 +118,9 @@

    -

    - - _helpers_for_modification() - -

    +

    _helpers_for_modification()

    -
    - -
    - @@ -162,17 +148,11 @@

    -

    - - clear_helpers() - -

    +

    clear_helpers()

    - -
    -

    Clears up all existing helpers in this class, only keeping the helper with the same name as this class.

    -
    - +
    +

    Clears up all existing helpers in this class, only keeping the helper with the same name as this class.

    +
    @@ -202,15 +182,10 @@

    -

    - - helper(*args, &block) - -

    +

    helper(*args, &block)

    - -
    -

    Includes the given modules in the template class.

    +
    +

    Includes the given modules in the template class.

    Modules can be specified in different ways. All of the following calls include FooHelper:

    @@ -259,8 +234,7 @@

    end end -

    - +
    @@ -290,15 +264,10 @@

    -

    - - helper_method(*methods) - -

    +

    helper_method(*methods)

    - -
    -

    Declare a controller method as a helper. For example, the following makes the current_user and logged_in? controller methods available to the view:

    +
    +

    Declare a controller method as a helper. For example, the following makes the current_user and logged_in? controller methods available to the view:

    class ApplicationController < ActionController::Base
       helper_method :current_user, :logged_in?
    @@ -323,8 +292,7 @@ 

    Parameters

    • method[, method] - A name or names of a method on the controller to be made available on the view.

    -
    - +
    @@ -364,17 +332,11 @@

    Parameters

    -

    - - inherited(klass) - -

    +

    inherited(klass)

    - -
    -

    When a class is inherited, wrap its helper module in a new module. This ensures that the parent class’s module can be changed independently of the child class’s.

    -
    - +
    +

    When a class is inherited, wrap its helper module in a new module. This ensures that the parent class’s module can be changed independently of the child class’s.

    +
    @@ -403,22 +365,16 @@

    -

    - - modules_for_helpers(modules_or_helper_prefixes) +

    modules_for_helpers(modules_or_helper_prefixes) +

    - - - - -
    -

    Given an array of values like the ones accepted by helper, this method returns an array with the corresponding modules, in the same order.

    +
    +

    Given an array of values like the ones accepted by helper, this method returns an array with the corresponding modules, in the same order.

    ActionController::Base.modules_for_helpers(["application", "chart", "rubygems"])
     # => [ApplicationHelper, ChartHelper, RubygemsHelper]
     
    -
    - +
    diff --git a/src/classes/AbstractController/Railties/RoutesHelpers.html b/src/classes/AbstractController/Railties/RoutesHelpers.html index b053082e31..f2a9347d3e 100644 --- a/src/classes/AbstractController/Railties/RoutesHelpers.html +++ b/src/classes/AbstractController/Railties/RoutesHelpers.html @@ -57,17 +57,9 @@

    Methods

    Class Public methods

    -

    - - with(routes, include_path_helpers = true) - -

    +

    with(routes, include_path_helpers = true)

    -
    - -
    - diff --git a/src/classes/AbstractController/Rendering.html b/src/classes/AbstractController/Rendering.html index 0fa902a303..964676c7a2 100644 --- a/src/classes/AbstractController/Rendering.html +++ b/src/classes/AbstractController/Rendering.html @@ -113,19 +113,13 @@

    Constants

    Instance Public methods

    -

    - - render(*args, &block) - -

    +

    render(*args, &block)

    - -
    -

    Normalizes arguments and options, and then delegates to render_to_body and sticks the result in self.response_body.

    +
    +

    Normalizes arguments and options, and then delegates to render_to_body and sticks the result in self.response_body.

    Supported options depend on the underlying render_to_body implementation.

    -
    - +
    @@ -158,17 +152,11 @@

    -

    - - render_to_body(options = {}) - -

    +

    render_to_body(options = {})

    - -
    -

    Performs the actual template rendering.

    -
    - +
    +

    Performs the actual template rendering.

    +
    @@ -192,19 +180,13 @@

    -

    - - render_to_string(*args, &block) - -

    +

    render_to_string(*args, &block)

    - -
    -

    Similar to render, but only returns the rendered template as a string, instead of setting self.response_body.

    +
    +

    Similar to render, but only returns the rendered template as a string, instead of setting self.response_body.

    If a component extends the semantics of response_body (as ActionController extends it to be anything that responds to the method each), this method needs to be overridden in order to still return a string.

    -
    - +
    @@ -230,17 +212,11 @@

    -

    - - rendered_format() - -

    +

    rendered_format()

    - -
    -

    Returns Content-Type of rendered content.

    -
    - +
    +

    Returns Content-Type of rendered content.

    +
    @@ -265,17 +241,11 @@

    -

    - - view_assigns() - -

    +

    view_assigns()

    - -
    -

    This method should return a hash with assigns. You can overwrite this configuration per controller.

    -
    - +
    +

    This method should return a hash with assigns. You can overwrite this configuration per controller.

    +
    @@ -307,17 +277,11 @@

    Instance Private methods

    -

    - - _normalize_args(action = nil, options = {}) - -

    +

    _normalize_args(action = nil, options = {})

    - -
    -

    Normalize args by converting render "foo" to render action: "foo" and render "foo/bar" to render file: "foo/bar".

    -
    - +
    +

    Normalize args by converting render "foo" to render action: "foo" and render "foo/bar" to render file: "foo/bar".

    +
    @@ -352,17 +316,11 @@

    -

    - - _normalize_options(options) - -

    +

    _normalize_options(options)

    - -
    -

    Normalize options.

    -
    - +
    +

    Normalize options.

    +
    @@ -387,17 +345,11 @@

    -

    - - _process_options(options) - -

    +

    _process_options(options)

    - -
    -

    Process extra options.

    -
    - +
    +

    Process extra options.

    +
    diff --git a/src/classes/AbstractController/Translation.html b/src/classes/AbstractController/Translation.html index 446e93e2cd..e4605629d9 100644 --- a/src/classes/AbstractController/Translation.html +++ b/src/classes/AbstractController/Translation.html @@ -70,24 +70,17 @@

    Methods

    Instance Public methods

    -

    - - l(object, **options) - -

    +

    l(object, **options)

    -
    - -
    - -
    - Alias for: localize -
    +

    + Alias for: + localize. +

    @@ -95,22 +88,18 @@

    -

    - - localize(object, **options) - -

    +

    localize(object, **options)

    - -
    -

    Delegates to I18n.localize.

    -
    - +
    +

    Delegates to I18n.localize.

    +
    -
    - Also aliased as: l -
    +

    + Also aliased as: + + l. +

    @@ -134,24 +123,17 @@

    -

    - - t(key, **options) - -

    +

    t(key, **options)

    -
    - -
    - -
    - Alias for: translate -
    +

    + Alias for: + translate. +

    @@ -159,24 +141,20 @@

    -

    - - translate(key, **options) - -

    +

    translate(key, **options)

    - -
    -

    Delegates to I18n.translate.

    +
    +

    Delegates to I18n.translate.

    When the given key starts with a period, it will be scoped by the current controller and action. So if you call translate(".foo") from PeopleController#index, it will convert the call to I18n.translate("people.index.foo"). This makes it less repetitive to translate many keys within the same controller / action and gives you a simple framework for scoping them consistently.

    -
    - +
    -
    - Also aliased as: t -
    +

    + Also aliased as: + + t. +

    diff --git a/src/classes/AbstractController/UrlFor.html b/src/classes/AbstractController/UrlFor.html index bd5d0224eb..bab417c152 100644 --- a/src/classes/AbstractController/UrlFor.html +++ b/src/classes/AbstractController/UrlFor.html @@ -95,17 +95,9 @@

    Included Modules

    Instance Public methods

    -

    - - _routes() - -

    +

    _routes()

    -
    - -
    - diff --git a/src/classes/AbstractController/UrlFor/ClassMethods.html b/src/classes/AbstractController/UrlFor/ClassMethods.html index e4471b2d66..1dcd62c92c 100644 --- a/src/classes/AbstractController/UrlFor/ClassMethods.html +++ b/src/classes/AbstractController/UrlFor/ClassMethods.html @@ -62,17 +62,9 @@

    Methods

    Instance Public methods

    -

    - - _routes() - -

    +

    _routes()

    -
    - -
    - @@ -97,17 +89,9 @@

    -

    - - action_methods() - -

    +

    action_methods()

    -
    - -
    - diff --git a/src/classes/ActionCable.html b/src/classes/ActionCable.html index 5e5f891dce..9fd8e01c4d 100644 --- a/src/classes/ActionCable.html +++ b/src/classes/ActionCable.html @@ -243,17 +243,11 @@

    Constants

    Class Public methods

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Action Cable as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Action Cable as a Gem::Version.

    +
    @@ -278,17 +272,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Action Cable as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Action Cable as a Gem::Version.

    +
    @@ -317,17 +305,11 @@

    Instance Public methods

    -

    - - server() - -

    +

    server()

    - -
    -

    Singleton instance of the server

    -
    - +
    +

    Singleton instance of the server

    +
    diff --git a/src/classes/ActionCable/Channel/Base.html b/src/classes/ActionCable/Channel/Base.html index 32e2ff9b70..8e91435213 100644 --- a/src/classes/ActionCable/Channel/Base.html +++ b/src/classes/ActionCable/Channel/Base.html @@ -278,22 +278,16 @@

    Attributes

    Class Public methods

    -

    - - action_methods() - -

    +

    action_methods()

    - -
    -

    A list of method names that should be considered actions. This includes all public instance methods on a channel, less any internal methods (defined on Base), adding back in any methods that are internal, but still exist on the class itself.

    +
    +

    A list of method names that should be considered actions. This includes all public instance methods on a channel, less any internal methods (defined on Base), adding back in any methods that are internal, but still exist on the class itself.

    Returns

    • Set - A set of all methods that should be considered actions.

    -
    - +
    @@ -329,17 +323,9 @@

    Returns

    -

    - - new(connection, identifier, params = {}) - -

    +

    new(connection, identifier, params = {})

    -
    - -
    - @@ -381,17 +367,11 @@

    Class Private methods

    -

    - - clear_action_methods!() - -

    +

    clear_action_methods!()

    - -
    -

    action_methods are cached and there is sometimes need to refresh them. ::clear_action_methods! allows you to do that, so next time you run action_methods, they will be recalculated.

    -
    - +
    +

    action_methods are cached and there is sometimes need to refresh them. ::clear_action_methods! allows you to do that, so next time you run action_methods, they will be recalculated.

    +
    @@ -416,17 +396,11 @@

    -

    - - method_added(name) - -

    +

    method_added(name)

    - -
    -

    Refresh the cached action_methods when a new action_method is added.

    -
    - +
    +

    Refresh the cached action_methods when a new action_method is added.

    +
    @@ -456,17 +430,11 @@

    Instance Public methods

    -

    - - perform_action(data) - -

    +

    perform_action(data)

    - -
    -

    Extract the action name from the passed data and process it via the channel. The process will ensure that the action requested is a public method on the channel declared by the user (so not one of the callbacks like subscribed).

    -
    - +
    +

    Extract the action name from the passed data and process it via the channel. The process will ensure that the action requested is a public method on the channel declared by the user (so not one of the callbacks like subscribed).

    +
    @@ -500,17 +468,11 @@

    -

    - - subscribe_to_channel() - -

    +

    subscribe_to_channel()

    - -
    -

    This method is called after subscription has been added to the connection and confirms or rejects the subscription.

    -
    - +
    +

    This method is called after subscription has been added to the connection and confirms or rejects the subscription.

    +
    @@ -543,17 +505,9 @@

    Instance Private methods

    -

    - - defer_subscription_confirmation!() - -

    +

    defer_subscription_confirmation!()

    -
    - -
    - @@ -578,17 +532,9 @@

    -

    - - defer_subscription_confirmation?() - -

    +

    defer_subscription_confirmation?()

    -
    - -
    - @@ -613,17 +559,9 @@

    -

    - - ensure_confirmation_sent() - -

    +

    ensure_confirmation_sent()

    -
    - -
    - @@ -650,17 +588,9 @@

    -

    - - reject() - -

    +

    reject()

    -
    - -
    - @@ -685,17 +615,11 @@

    -

    - - subscribed() - -

    +

    subscribed()

    - -
    -

    Called once a consumer has become a subscriber of the channel. Usually the place to set up any streams you want this channel to be sending to the subscriber.

    -
    - +
    +

    Called once a consumer has become a subscriber of the channel. Usually the place to set up any streams you want this channel to be sending to the subscriber.

    +
    @@ -720,17 +644,9 @@

    -

    - - subscription_confirmation_sent?() - -

    +

    subscription_confirmation_sent?()

    -
    - -
    - @@ -755,17 +671,9 @@

    -

    - - subscription_rejected?() - -

    +

    subscription_rejected?()

    -
    - -
    - @@ -790,17 +698,11 @@

    -

    - - transmit(data, via: nil) - -

    +

    transmit(data, via: nil)

    - -
    -

    Transmit a hash of data to the subscriber. The hash will automatically be wrapped in a JSON envelope with the proper channel identifier marked as the recipient.

    -
    - +
    +

    Transmit a hash of data to the subscriber. The hash will automatically be wrapped in a JSON envelope with the proper channel identifier marked as the recipient.

    +
    @@ -834,17 +736,11 @@

    -

    - - unsubscribed() - -

    +

    unsubscribed()

    - -
    -

    Called once a consumer has cut its cable connection. Can be used for cleaning up connections or marking users as offline or the like.

    -
    - +
    +

    Called once a consumer has cut its cable connection. Can be used for cleaning up connections or marking users as offline or the like.

    +
    diff --git a/src/classes/ActionCable/Channel/Broadcasting.html b/src/classes/ActionCable/Channel/Broadcasting.html index 7fecc3f6b8..8ab922fcca 100644 --- a/src/classes/ActionCable/Channel/Broadcasting.html +++ b/src/classes/ActionCable/Channel/Broadcasting.html @@ -75,17 +75,9 @@

    Methods

    Instance Public methods

    -

    - - broadcast_to(model, message) - -

    +

    broadcast_to(model, message)

    -
    - -
    - @@ -110,17 +102,9 @@

    -

    - - broadcasting_for(model) - -

    +

    broadcasting_for(model)

    -
    - -
    - diff --git a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html index 432bb5d74f..18c3eec202 100644 --- a/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html +++ b/src/classes/ActionCable/Channel/Broadcasting/ClassMethods.html @@ -62,17 +62,11 @@

    Methods

    Instance Public methods

    -

    - - broadcast_to(broadcastables, message) - -

    +

    broadcast_to(broadcastables, message)

    - -
    -

    Broadcast a hash to a unique broadcasting for this array of broadcastables in this channel.

    -
    - +
    +

    Broadcast a hash to a unique broadcasting for this array of broadcastables in this channel.

    +
    @@ -97,22 +91,16 @@

    -

    - - broadcasting_for(broadcastables) - -

    +

    broadcasting_for(broadcastables)

    - -
    -

    Returns a unique broadcasting identifier for this model in this channel:

    +
    +

    Returns a unique broadcasting identifier for this model in this channel:

    CommentsChannel.broadcasting_for("all") # => "comments:all"
     

    You can pass an array of objects as a target (e.g. Active Record model), and it would be serialized into a string under the hood.

    -
    - +
    diff --git a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html index 7949b5fdf6..b40c50228d 100644 --- a/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html +++ b/src/classes/ActionCable/Channel/Callbacks/ClassMethods.html @@ -78,27 +78,23 @@

    Methods

    Instance Public methods

    -

    - - after_subscribe(*methods, &block) - -

    +

    after_subscribe(*methods, &block)

    - -
    -

    This callback will be triggered after the Base#subscribed method is called, even if the subscription was rejected with the Base#reject method.

    +
    +

    This callback will be triggered after the Base#subscribed method is called, even if the subscription was rejected with the Base#reject method.

    To trigger the callback only on successful subscriptions, use the Base#subscription_rejected? method:

    after_subscribe :my_method, unless: :subscription_rejected?
     
    -
    - +
    -
    - Also aliased as: on_subscribe -
    +

    + Also aliased as: + + on_subscribe. +

    @@ -122,22 +118,16 @@

    -

    - - after_unsubscribe(*methods, &block) - -

    +

    after_unsubscribe(*methods, &block)

    -
    - -
    - -
    - Also aliased as: on_unsubscribe -
    +

    + Also aliased as: + + on_unsubscribe. +

    @@ -161,17 +151,9 @@

    -

    - - before_subscribe(*methods, &block) - -

    +

    before_subscribe(*methods, &block)

    -
    - -
    - @@ -196,17 +178,9 @@

    -

    - - before_unsubscribe(*methods, &block) - -

    +

    before_unsubscribe(*methods, &block)

    -
    - -
    - @@ -231,24 +205,17 @@

    -

    - - on_subscribe(*methods, &block) - -

    +

    on_subscribe(*methods, &block)

    -
    - -
    - -
    - Alias for: after_subscribe -
    +

    + Alias for: + after_subscribe. +

    @@ -256,24 +223,17 @@

    -

    - - on_unsubscribe(*methods, &block) - -

    +

    on_unsubscribe(*methods, &block)

    -
    - -
    - -
    - Alias for: after_unsubscribe -
    +

    + Alias for: + after_unsubscribe. +

    diff --git a/src/classes/ActionCable/Channel/ChannelStub.html b/src/classes/ActionCable/Channel/ChannelStub.html index d004896dc5..587a2b9c20 100644 --- a/src/classes/ActionCable/Channel/ChannelStub.html +++ b/src/classes/ActionCable/Channel/ChannelStub.html @@ -90,17 +90,9 @@

    Methods

    Instance Public methods

    -

    - - confirmed?() - -

    +

    confirmed?()

    -
    - -
    - @@ -125,17 +117,9 @@

    -

    - - rejected?() - -

    +

    rejected?()

    -
    - -
    - @@ -160,22 +144,18 @@

    -

    - - start_periodic_timers() - -

    +

    start_periodic_timers()

    - -
    -

    Make periodic timers no-op

    -
    - +
    +

    Make periodic timers no-op

    +
    -
    - Also aliased as: stop_periodic_timers -
    +

    + Also aliased as: + + stop_periodic_timers. +

    @@ -197,17 +177,9 @@

    -

    - - stop_all_streams() - -

    +

    stop_all_streams()

    -
    - -
    - @@ -232,24 +204,17 @@

    -

    - - stop_periodic_timers() - -

    +

    stop_periodic_timers()

    -
    - -
    - -
    - Alias for: start_periodic_timers -
    +

    + Alias for: + start_periodic_timers. +

    @@ -257,17 +222,9 @@

    -

    - - stream_from(broadcasting, *) - -

    +

    stream_from(broadcasting, *)

    -
    - -
    - @@ -292,17 +249,9 @@

    -

    - - streams() - -

    +

    streams()

    -
    - -
    - diff --git a/src/classes/ActionCable/Channel/ConnectionStub.html b/src/classes/ActionCable/Channel/ConnectionStub.html index 0fdc0d8690..1630cedddf 100644 --- a/src/classes/ActionCable/Channel/ConnectionStub.html +++ b/src/classes/ActionCable/Channel/ConnectionStub.html @@ -117,17 +117,9 @@

    Attributes

    Class Public methods

    -

    - - new(identifiers = {}) - -

    +

    new(identifiers = {})

    -
    - -
    - @@ -165,17 +157,9 @@

    Instance Public methods

    -

    - - connection_identifier() - -

    +

    connection_identifier()

    -
    - -
    - @@ -200,17 +184,9 @@

    -

    - - transmit(cable_message) - -

    +

    transmit(cable_message)

    -
    - -
    - diff --git a/src/classes/ActionCable/Channel/Naming.html b/src/classes/ActionCable/Channel/Naming.html index db2aa18589..4750ab6faa 100644 --- a/src/classes/ActionCable/Channel/Naming.html +++ b/src/classes/ActionCable/Channel/Naming.html @@ -71,17 +71,9 @@

    Methods

    Instance Public methods

    -

    - - channel_name() - -

    +

    channel_name()

    -
    - -
    - diff --git a/src/classes/ActionCable/Channel/Naming/ClassMethods.html b/src/classes/ActionCable/Channel/Naming/ClassMethods.html index e99c0744a7..2054d9e292 100644 --- a/src/classes/ActionCable/Channel/Naming/ClassMethods.html +++ b/src/classes/ActionCable/Channel/Naming/ClassMethods.html @@ -58,22 +58,16 @@

    Methods

    Instance Public methods

    -

    - - channel_name() - -

    +

    channel_name()

    - -
    -

    Returns the name of the channel, underscored, without the Channel ending. If the channel is in a namespace, then the namespaces are represented by single colon separators in the channel name.

    +
    +

    Returns the name of the channel, underscored, without the 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'
     FooChats::BarAppearancesChannel.channel_name # => 'foo_chats:bar_appearances'
     
    -
    - +
    diff --git a/src/classes/ActionCable/Channel/NonInferrableChannelError.html b/src/classes/ActionCable/Channel/NonInferrableChannelError.html index 1eac81cbd2..ece5bbf335 100644 --- a/src/classes/ActionCable/Channel/NonInferrableChannelError.html +++ b/src/classes/ActionCable/Channel/NonInferrableChannelError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(name) - -

    +

    new(name)

    -
    - -
    - diff --git a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html index a694f6de16..1a26cae68a 100644 --- a/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html +++ b/src/classes/ActionCable/Channel/PeriodicTimers/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - periodically(callback_or_method_name = nil, every:, &block) - -

    +

    periodically(callback_or_method_name = nil, every:, &block)

    - -
    -

    Periodically performs a task on the channel, like updating an online user counter, polling a backend for new status messages, sending regular “heartbeat” messages, or doing some internal work and giving progress updates.

    +
    +

    Periodically performs a task on the channel, like updating an online user counter, polling a backend for new status messages, sending regular “heartbeat” messages, or doing some internal work and giving progress updates.

    Pass a method name or lambda argument or provide a block to call. Specify the calling period in seconds using the every: keyword argument.

    @@ -76,8 +71,7 @@

    transmit action: :update_count, count: current_count end -

    - +
    diff --git a/src/classes/ActionCable/Channel/Streams.html b/src/classes/ActionCable/Channel/Streams.html index a2e686a3e9..8d5022d17c 100644 --- a/src/classes/ActionCable/Channel/Streams.html +++ b/src/classes/ActionCable/Channel/Streams.html @@ -143,17 +143,11 @@

    Methods

    Instance Public methods

    -

    - - stop_all_streams() - -

    +

    stop_all_streams()

    - -
    -

    Unsubscribes all streams associated with this channel from the pubsub queue.

    -
    - +
    +

    Unsubscribes all streams associated with this channel from the pubsub queue.

    +
    @@ -181,17 +175,11 @@

    -

    - - stop_stream_for(model) - -

    +

    stop_stream_for(model)

    - -
    -

    Unsubscribes streams for the model.

    -
    - +
    +

    Unsubscribes streams for the model.

    +
    @@ -216,17 +204,11 @@

    -

    - - stop_stream_from(broadcasting) - -

    +

    stop_stream_from(broadcasting)

    - -
    -

    Unsubscribes streams from the named broadcasting.

    -
    - +
    +

    Unsubscribes streams from the named broadcasting.

    +
    @@ -255,19 +237,13 @@

    -

    - - stream_for(broadcastables, callback = nil, coder: nil, &block) - -

    +

    stream_for(broadcastables, callback = nil, coder: nil, &block)

    - -
    -

    Start streaming the pubsub queue for the broadcastables in this channel. Optionally, you can pass a callback that’ll be used instead of the default of just transmitting the updates straight to the subscriber.

    +
    +

    Start streaming the pubsub queue for the broadcastables in this channel. Optionally, you can pass a callback that’ll be used instead of the default of just transmitting the updates straight to the subscriber.

    Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. Defaults to coder: nil which does no decoding, passes raw messages.

    -
    - +
    @@ -292,17 +268,11 @@

    -

    - - stream_from(broadcasting, callback = nil, coder: nil, &block) - -

    +

    stream_from(broadcasting, callback = nil, coder: nil, &block)

    - -
    -

    Start streaming from the named broadcasting pubsub queue. Optionally, you can pass a callback that’ll be used instead of the default of just transmitting the updates straight to the subscriber. Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. Defaults to coder: nil which does no decoding, passes raw messages.

    -
    - +
    +

    Start streaming from the named broadcasting pubsub queue. Optionally, you can pass a callback that’ll be used instead of the default of just transmitting the updates straight to the subscriber. Pass coder: ActiveSupport::JSON to decode messages as JSON before passing to the callback. Defaults to coder: nil which does no decoding, passes raw messages.

    +
    @@ -344,17 +314,11 @@

    -

    - - stream_or_reject_for(model) - -

    +

    stream_or_reject_for(model)

    - -
    -

    Calls stream_for with the given model if it’s present to start streaming, otherwise rejects the subscription.

    -
    - +
    +

    Calls stream_for with the given model if it’s present to start streaming, otherwise rejects the subscription.

    +
    diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior.html b/src/classes/ActionCable/Channel/TestCase/Behavior.html index 5a8ea0fd78..71da78d098 100644 --- a/src/classes/ActionCable/Channel/TestCase/Behavior.html +++ b/src/classes/ActionCable/Channel/TestCase/Behavior.html @@ -172,17 +172,9 @@

    Attributes

    Instance Public methods

    -

    - - assert_broadcast_on(stream_or_object, *args) - -

    +

    assert_broadcast_on(stream_or_object, *args)

    -
    - -
    - @@ -207,17 +199,11 @@

    -

    - - assert_broadcasts(stream_or_object, *args) - -

    +

    assert_broadcasts(stream_or_object, *args)

    - -
    -

    Enhance TestHelper assertions to handle non-String broadcastings

    -
    - +
    +

    Enhance TestHelper assertions to handle non-String broadcastings

    +
    @@ -242,23 +228,17 @@

    -

    - - assert_has_no_stream(stream) - -

    +

    assert_has_no_stream(stream)

    - -
    -

    Asserts that the specified stream has not been started.

    +
    +

    Asserts that the specified stream has not been started.

    def test_assert_no_started_stream
       subscribe
       assert_has_no_stream 'messages'
     end
     
    -
    - +
    @@ -283,23 +263,17 @@

    -

    - - assert_has_no_stream_for(object) - -

    +

    assert_has_no_stream_for(object)

    - -
    -

    Asserts that the specified stream for a model has not started.

    +
    +

    Asserts that the specified stream for a model has not started.

    def test_assert_no_started_stream_for
       subscribe id: 41
       assert_has_no_stream_for User.find(42)
     end
     
    -
    - +
    @@ -324,23 +298,17 @@

    -

    - - assert_has_stream(stream) - -

    +

    assert_has_stream(stream)

    - -
    -

    Asserts that the specified stream has been started.

    +
    +

    Asserts that the specified stream has been started.

    def test_assert_started_stream
       subscribe
       assert_has_stream 'messages'
     end
     
    -
    - +
    @@ -365,23 +333,17 @@

    -

    - - assert_has_stream_for(object) - -

    +

    assert_has_stream_for(object)

    - -
    -

    Asserts that the specified stream for a model has started.

    +
    +

    Asserts that the specified stream for a model has started.

    def test_assert_started_stream_for
       subscribe id: 42
       assert_has_stream_for User.find(42)
     end
     
    -
    - +
    @@ -406,23 +368,17 @@

    -

    - - assert_no_streams() - -

    +

    assert_no_streams()

    - -
    -

    Asserts that no streams have been started.

    +
    +

    Asserts that no streams have been started.

    def test_assert_no_started_stream
       subscribe
       assert_no_streams
     end
     
    -
    - +
    @@ -447,19 +403,13 @@

    -

    - - perform(action, data = {}) - -

    +

    perform(action, data = {})

    - -
    -

    Perform action on a channel.

    +
    +

    Perform action on a channel.

    NOTE: Must be subscribed.

    -
    - +
    @@ -485,15 +435,10 @@

    -

    - - stub_connection(identifiers = {}) - -

    +

    stub_connection(identifiers = {})

    - -
    -

    Set up test connection with the specified identifiers:

    +
    +

    Set up test connection with the specified identifiers:

    class ApplicationCable < ActionCable::Connection::Base
       identified_by :user, :token
    @@ -501,8 +446,7 @@ 

    stub_connection(user: users[:john], token: 'my-secret-token')

    -
    - +
    @@ -527,17 +471,11 @@

    -

    - - subscribe(params = {}) - -

    +

    subscribe(params = {})

    - -
    -

    Subscribe to the channel under test. Optionally pass subscription parameters as a Hash.

    -
    - +
    +

    Subscribe to the channel under test. Optionally pass subscription parameters as a Hash.

    +
    @@ -566,17 +504,11 @@

    -

    - - transmissions() - -

    +

    transmissions()

    - -
    -

    Returns messages transmitted into channel

    -
    - +
    +

    Returns messages transmitted into channel

    +
    @@ -602,17 +534,11 @@

    -

    - - unsubscribe() - -

    +

    unsubscribe()

    - -
    -

    Unsubscribe the subscription under test.

    -
    - +
    +

    Unsubscribe the subscription under test.

    +
    diff --git a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html index 57efb4cdac..858a0ac552 100644 --- a/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionCable/Channel/TestCase/Behavior/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - channel_class() - -

    +

    channel_class()

    -
    - -
    - @@ -105,17 +97,9 @@

    -

    - - determine_default_channel(name) - -

    +

    determine_default_channel(name)

    -
    - -
    - @@ -144,17 +128,9 @@

    -

    - - tests(channel) - -

    +

    tests(channel)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/Assertions.html b/src/classes/ActionCable/Connection/Assertions.html index 6b10ec5528..6fc9d0723c 100644 --- a/src/classes/ActionCable/Connection/Assertions.html +++ b/src/classes/ActionCable/Connection/Assertions.html @@ -58,21 +58,15 @@

    Methods

    Instance Public methods

    -

    - - assert_reject_connection(&block) - -

    +

    assert_reject_connection(&block)

    - -
    -

    Asserts that the connection is rejected (via reject_unauthorized_connection).

    +
    +

    Asserts that the connection is rejected (via reject_unauthorized_connection).

    # Asserts that connection without user_id fails
     assert_reject_connection { connect params: { user_id: '' } }
     
    -
    - +
    diff --git a/src/classes/ActionCable/Connection/Authorization.html b/src/classes/ActionCable/Connection/Authorization.html index baf85a37b3..8e0d7a1439 100644 --- a/src/classes/ActionCable/Connection/Authorization.html +++ b/src/classes/ActionCable/Connection/Authorization.html @@ -73,17 +73,11 @@

    Methods

    Instance Public methods

    -

    - - reject_unauthorized_connection() - -

    +

    reject_unauthorized_connection()

    - -
    -

    Closes the WebSocket connection if it is open and returns an “unauthorized” reason.

    -
    - +
    +

    Closes the WebSocket connection if it is open and returns an “unauthorized” reason.

    +
    diff --git a/src/classes/ActionCable/Connection/Base.html b/src/classes/ActionCable/Connection/Base.html index ea0d62911f..c7f009aa10 100644 --- a/src/classes/ActionCable/Connection/Base.html +++ b/src/classes/ActionCable/Connection/Base.html @@ -231,17 +231,9 @@

    Attributes

    Class Public methods

    -

    - - new(server, env, coder: ActiveSupport::JSON) - -

    +

    new(server, env, coder: ActiveSupport::JSON)

    -
    - -
    - @@ -280,17 +272,9 @@

    Instance Public methods

    -

    - - beat() - -

    +

    beat()

    -
    - -
    - @@ -315,17 +299,11 @@

    -

    - - close(reason: nil, reconnect: true) - -

    +

    close(reason: nil, reconnect: true)

    - -
    -

    Close the WebSocket connection.

    -
    - +
    +

    Close the WebSocket connection.

    +
    @@ -355,17 +333,9 @@

    -

    - - handle_channel_command(payload) - -

    +

    handle_channel_command(payload)

    -
    - -
    - @@ -392,17 +362,11 @@

    -

    - - send_async(method, *arguments) - -

    +

    send_async(method, *arguments)

    - -
    -

    Invoke a method on the connection asynchronously through the pool of thread workers.

    -
    - +
    +

    Invoke a method on the connection asynchronously through the pool of thread workers.

    +
    @@ -427,17 +391,11 @@

    -

    - - statistics() - -

    +

    statistics()

    - -
    -

    Return a basic hash of statistics for the connection keyed with identifier, started_at, subscriptions, and request_id. This can be returned by a health check against the connection.

    -
    - +
    +

    Return a basic hash of statistics for the connection keyed with identifier, started_at, subscriptions, and request_id. This can be returned by a health check against the connection.

    +
    @@ -470,17 +428,11 @@

    Instance Private methods

    -

    - - cookies() - -

    +

    cookies()

    - -
    -

    The cookies of the request that initiated the WebSocket connection. Useful for performing authorization checks.

    -
    - +
    +

    The cookies of the request that initiated the WebSocket connection. Useful for performing authorization checks.

    +
    @@ -505,17 +457,11 @@

    -

    - - request() - -

    +

    request()

    - -
    -

    The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc.

    -
    - +
    +

    The request that initiated the WebSocket connection is available here. This gives access to the environment, cookies, etc.

    +
    diff --git a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html index 6376d7195b..d11f1b1454 100644 --- a/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html +++ b/src/classes/ActionCable/Connection/Callbacks/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - after_command(*methods, &block) - -

    +

    after_command(*methods, &block)

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - around_command(*methods, &block) - -

    +

    around_command(*methods, &block)

    -
    - -
    - @@ -136,17 +120,9 @@

    -

    - - before_command(*methods, &block) - -

    +

    before_command(*methods, &block)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/Identification.html b/src/classes/ActionCable/Connection/Identification.html index 063ca88999..cb1b371d7a 100644 --- a/src/classes/ActionCable/Connection/Identification.html +++ b/src/classes/ActionCable/Connection/Identification.html @@ -71,17 +71,11 @@

    Methods

    Instance Public methods

    -

    - - connection_identifier() - -

    +

    connection_identifier()

    - -
    -

    Return a single connection identifier that combines the value of all the registered identifiers into a single gid.

    -
    - +
    +

    Return a single connection identifier that combines the value of all the registered identifiers into a single gid.

    +
    diff --git a/src/classes/ActionCable/Connection/Identification/ClassMethods.html b/src/classes/ActionCable/Connection/Identification/ClassMethods.html index a3395ef8a3..42be2d7255 100644 --- a/src/classes/ActionCable/Connection/Identification/ClassMethods.html +++ b/src/classes/ActionCable/Connection/Identification/ClassMethods.html @@ -58,19 +58,13 @@

    Methods

    Instance Public methods

    -

    - - identified_by(*identifiers) - -

    +

    identified_by(*identifiers)

    - -
    -

    Mark a key as being a connection identifier index that can then be used to find the specific connection again later. Common identifiers are current_user and current_account, but could be anything, really.

    +
    +

    Mark a key as being a connection identifier index that can then be used to find the specific connection again later. Common identifiers are current_user and current_account, but could be anything, really.

    Note that anything marked as an identifier will automatically create a delegate by the same name on any channel instances created off the connection.

    -
    - +
    diff --git a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html index bf0c696d62..26bba36295 100644 --- a/src/classes/ActionCable/Connection/NonInferrableConnectionError.html +++ b/src/classes/ActionCable/Connection/NonInferrableConnectionError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(name) - -

    +

    new(name)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/StreamEventLoop.html b/src/classes/ActionCable/Connection/StreamEventLoop.html index f7c49354ef..4a58b367e2 100644 --- a/src/classes/ActionCable/Connection/StreamEventLoop.html +++ b/src/classes/ActionCable/Connection/StreamEventLoop.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -131,17 +123,9 @@

    Instance Public methods

    -

    - - attach(io, stream) - -

    +

    attach(io, stream)

    -
    - -
    - @@ -170,17 +154,9 @@

    -

    - - detach(io, stream) - -

    +

    detach(io, stream)

    -
    - -
    - @@ -210,17 +186,9 @@

    -

    - - post(task = nil, &block) - -

    +

    post(task = nil, &block)

    -
    - -
    - @@ -248,17 +216,9 @@

    -

    - - stop() - -

    +

    stop()

    -
    - -
    - @@ -284,17 +244,9 @@

    -

    - - timer(interval, &block) - -

    +

    timer(interval, &block)

    -
    - -
    - @@ -319,17 +271,9 @@

    -

    - - writes_pending(io) - -

    +

    writes_pending(io)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/TaggedLoggerProxy.html b/src/classes/ActionCable/Connection/TaggedLoggerProxy.html index 99731855fb..7524c24591 100644 --- a/src/classes/ActionCable/Connection/TaggedLoggerProxy.html +++ b/src/classes/ActionCable/Connection/TaggedLoggerProxy.html @@ -97,17 +97,9 @@

    Attributes

    Class Public methods

    -

    - - new(logger, tags:) - -

    +

    new(logger, tags:)

    -
    - -
    - @@ -137,17 +129,9 @@

    Instance Public methods

    -

    - - add_tags(*tags) - -

    +

    add_tags(*tags)

    -
    - -
    - @@ -173,17 +157,9 @@

    -

    - - tag(logger, &block) - -

    +

    tag(logger, &block)

    -
    - -
    - @@ -216,17 +192,9 @@

    Instance Private methods

    -

    - - log(type, message, &block) - -

    +

    log(type, message, &block)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/TestCase/Behavior.html b/src/classes/ActionCable/Connection/TestCase/Behavior.html index 4ee0debbea..1bf7292841 100644 --- a/src/classes/ActionCable/Connection/TestCase/Behavior.html +++ b/src/classes/ActionCable/Connection/TestCase/Behavior.html @@ -128,15 +128,10 @@

    Attributes

    Instance Public methods

    -

    - - connect(path = ActionCable.server.config.mount_path, **request_params) - -

    +

    connect(path = ActionCable.server.config.mount_path, **request_params)

    - -
    -

    Performs connection attempt to exert connect on the connection under test.

    +
    +

    Performs connection attempt to exert connect on the connection under test.

    Accepts request path as the first argument and the following request options:

    • @@ -148,8 +143,7 @@

    • env – additional Rack env configuration (Hash)

    -
    - +
    @@ -182,17 +176,9 @@

    -

    - - cookies() - -

    +

    cookies()

    -
    - -
    - @@ -217,17 +203,11 @@

    -

    - - disconnect() - -

    +

    disconnect()

    - -
    -

    Exert disconnect on the connection under test.

    -
    - +
    +

    Exert disconnect on the connection under test.

    +
    diff --git a/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html b/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html index 99fc0e3f6f..4dc624226e 100644 --- a/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionCable/Connection/TestCase/Behavior/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - connection_class() - -

    +

    connection_class()

    -
    - -
    - @@ -105,17 +97,9 @@

    -

    - - determine_default_connection(name) - -

    +

    determine_default_connection(name)

    -
    - -
    - @@ -144,17 +128,9 @@

    -

    - - tests(connection) - -

    +

    tests(connection)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/TestConnection.html b/src/classes/ActionCable/Connection/TestConnection.html index 5f9d1bd5a3..1f8a17e8b9 100644 --- a/src/classes/ActionCable/Connection/TestConnection.html +++ b/src/classes/ActionCable/Connection/TestConnection.html @@ -79,17 +79,9 @@

    Attributes

    Class Public methods

    -

    - - new(request) - -

    +

    new(request)

    -
    - -
    - diff --git a/src/classes/ActionCable/Connection/TestCookieJar.html b/src/classes/ActionCable/Connection/TestCookieJar.html index fcb7ed8134..a26eaee17a 100644 --- a/src/classes/ActionCable/Connection/TestCookieJar.html +++ b/src/classes/ActionCable/Connection/TestCookieJar.html @@ -74,17 +74,9 @@

    Methods

    Instance Public methods

    -

    - - encrypted() - -

    +

    encrypted()

    -
    - -
    - @@ -109,17 +101,9 @@

    -

    - - signed() - -

    +

    signed()

    -
    - -
    - diff --git a/src/classes/ActionCable/Helpers/ActionCableHelper.html b/src/classes/ActionCable/Helpers/ActionCableHelper.html index fe2897db18..fd40a1bc1c 100644 --- a/src/classes/ActionCable/Helpers/ActionCableHelper.html +++ b/src/classes/ActionCable/Helpers/ActionCableHelper.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - action_cable_meta_tag() - -

    +

    action_cable_meta_tag()

    - -
    -

    Returns an “action-cable-url” meta tag with the value of the URL specified in your configuration. Ensure this is above your JavaScript tag:

    +
    +

    Returns an “action-cable-url” meta tag with the value of the URL specified in your configuration. Ensure this is above your JavaScript tag:

    <head>
       <%= action_cable_meta_tag %>
    @@ -92,8 +87,7 @@ 

    <%= action_cable_meta_tag %> would render: => <meta name="action-cable-url" content="ws://actioncable.com" />

    -
    - +
    diff --git a/src/classes/ActionCable/RemoteConnections.html b/src/classes/ActionCable/RemoteConnections.html index 981e5c318d..88e9a6f9f6 100644 --- a/src/classes/ActionCable/RemoteConnections.html +++ b/src/classes/ActionCable/RemoteConnections.html @@ -119,17 +119,9 @@

    Attributes

    Class Public methods

    -

    - - new(server) - -

    +

    new(server)

    -
    - -
    - @@ -158,17 +150,9 @@

    Instance Public methods

    -

    - - where(identifier) - -

    +

    where(identifier)

    -
    - -
    - diff --git a/src/classes/ActionCable/RemoteConnections/RemoteConnection.html b/src/classes/ActionCable/RemoteConnections/RemoteConnection.html index de09eadf56..fc889f94c2 100644 --- a/src/classes/ActionCable/RemoteConnections/RemoteConnection.html +++ b/src/classes/ActionCable/RemoteConnections/RemoteConnection.html @@ -102,17 +102,9 @@

    Attributes

    Class Public methods

    -

    - - new(server, ids) - -

    +

    new(server, ids)

    -
    - -
    - @@ -142,17 +134,11 @@

    Instance Public methods

    -

    - - disconnect(reconnect: true) - -

    +

    disconnect(reconnect: true)

    - -
    -

    Uses the internal channel to disconnect the connection.

    -
    - +
    +

    Uses the internal channel to disconnect the connection.

    +
    diff --git a/src/classes/ActionCable/Server/Base.html b/src/classes/ActionCable/Server/Base.html index e1fd11336e..cf38c598e1 100644 --- a/src/classes/ActionCable/Server/Base.html +++ b/src/classes/ActionCable/Server/Base.html @@ -145,17 +145,9 @@

    Attributes

    Class Public methods

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -178,17 +170,9 @@

    -

    - - new(config: self.class.config) - -

    +

    new(config: self.class.config)

    -
    - -
    - @@ -219,17 +203,11 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    - -
    -

    Called by Rack to set up the server.

    -
    - +
    +

    Called by Rack to set up the server.

    +
    @@ -256,17 +234,11 @@

    -

    - - connection_identifiers() - -

    +

    connection_identifiers()

    - -
    -

    All of the identifiers applied to the connection class associated with this server.

    -
    - +
    +

    All of the identifiers applied to the connection class associated with this server.

    +
    @@ -291,17 +263,11 @@

    -

    - - disconnect(identifiers) - -

    +

    disconnect(identifiers)

    - -
    -

    Disconnect all the connections identified by identifiers on this server or any others via RemoteConnections.

    -
    - +
    +

    Disconnect all the connections identified by identifiers on this server or any others via RemoteConnections.

    +
    @@ -326,17 +292,9 @@

    -

    - - event_loop() - -

    +

    event_loop()

    -
    - -
    - @@ -361,17 +319,11 @@

    -

    - - pubsub() - -

    +

    pubsub()

    - -
    -

    Adapter used for all streams/broadcasting.

    -
    - +
    +

    Adapter used for all streams/broadcasting.

    +
    @@ -396,17 +348,11 @@

    -

    - - remote_connections() - -

    +

    remote_connections()

    - -
    -

    Gateway to RemoteConnections. See that class for details.

    -
    - +
    +

    Gateway to RemoteConnections. See that class for details.

    +
    @@ -431,17 +377,9 @@

    -

    - - restart() - -

    +

    restart()

    -
    - -
    - @@ -478,21 +416,15 @@

    -

    - - worker_pool() - -

    +

    worker_pool()

    - -
    -

    The worker pool is where we run connection callbacks and channel actions. We do as little as possible on the server’s main thread. The worker pool is an executor service that’s backed by a pool of threads working from a task queue. The thread pool size maxes out at 4 worker threads by default. Tune the size yourself with config.action_cable.worker_pool_size.

    +
    +

    The worker pool is where we run connection callbacks and channel actions. We do as little as possible on the server’s main thread. The worker pool is an executor service that’s backed by a pool of threads working from a task queue. The thread pool size maxes out at 4 worker threads by default. Tune the size yourself with config.action_cable.worker_pool_size.

    Using Active Record, Redis, etc within your channel actions means you’ll get a separate connection from each thread in the worker pool. Plan your deployment accordingly: 5 servers each running 5 Puma workers each running an 8-thread worker pool means at least 200 database connections.

    Also, ensure that your database connection pool size is as least as large as your worker pool size. Otherwise, workers may oversubscribe the database connection pool and block while they wait for other workers to release their connections. Use a smaller worker pool or a larger database connection pool instead.

    -
    - +
    diff --git a/src/classes/ActionCable/Server/Broadcasting.html b/src/classes/ActionCable/Server/Broadcasting.html index 3d0b5387db..856e570d72 100644 --- a/src/classes/ActionCable/Server/Broadcasting.html +++ b/src/classes/ActionCable/Server/Broadcasting.html @@ -101,17 +101,11 @@

    Methods

    Instance Public methods

    -

    - - broadcast(broadcasting, message, coder: ActiveSupport::JSON) - -

    +

    broadcast(broadcasting, message, coder: ActiveSupport::JSON)

    - -
    -

    Broadcast a hash directly to a named broadcasting. This will later be JSON encoded.

    -
    - +
    +

    Broadcast a hash directly to a named broadcasting. This will later be JSON encoded.

    +
    @@ -136,17 +130,11 @@

    -

    - - broadcaster_for(broadcasting, coder: ActiveSupport::JSON) - -

    +

    broadcaster_for(broadcasting, coder: ActiveSupport::JSON)

    - -
    -

    Returns a broadcaster for a named broadcasting that can be reused. Useful when you have an object that may need multiple spots to transmit to a specific broadcasting over and over.

    -
    - +
    +

    Returns a broadcaster for a named broadcasting that can be reused. Useful when you have an object that may need multiple spots to transmit to a specific broadcasting over and over.

    +
    diff --git a/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html b/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html index 4d4a97cb40..2f9dd504e9 100644 --- a/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html +++ b/src/classes/ActionCable/Server/Broadcasting/Broadcaster.html @@ -97,17 +97,9 @@

    Attributes

    Class Public methods

    -

    - - new(server, broadcasting, coder:) - -

    +

    new(server, broadcasting, coder:)

    -
    - -
    - @@ -136,17 +128,9 @@

    Instance Public methods

    -

    - - broadcast(message) - -

    +

    broadcast(message)

    -
    - -
    - diff --git a/src/classes/ActionCable/Server/Configuration.html b/src/classes/ActionCable/Server/Configuration.html index 819f86d78d..e1fcef515d 100644 --- a/src/classes/ActionCable/Server/Configuration.html +++ b/src/classes/ActionCable/Server/Configuration.html @@ -193,17 +193,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -243,17 +235,11 @@

    Instance Public methods

    -

    - - pubsub_adapter() - -

    +

    pubsub_adapter()

    - -
    -

    Returns constant of subscription adapter specified in config/cable.yml. If the adapter cannot be found, this will default to the Redis adapter. Also makes sure proper dependencies are required.

    -
    - +
    +

    Returns constant of subscription adapter specified in config/cable.yml. If the adapter cannot be found, this will default to the Redis adapter. Also makes sure proper dependencies are required.

    +
    diff --git a/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html b/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html index 4f761feb49..ffdd138d9a 100644 --- a/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html +++ b/src/classes/ActionCable/Server/Worker/ActiveRecordConnectionManagement.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - with_database_connections(&block) - -

    +

    with_database_connections(&block)

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html b/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html index 4396fc5fcd..a0d6650a4a 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Async/AsyncSubscriberMap.html @@ -71,17 +71,9 @@

    Methods

    Class Public methods

    -

    - - new(event_loop) - -

    +

    new(event_loop)

    -
    - -
    - @@ -111,17 +103,9 @@

    Instance Public methods

    -

    - - add_subscriber(*) - -

    +

    add_subscriber(*)

    -
    - -
    - @@ -146,17 +130,9 @@

    -

    - - invoke_callback(*) - -

    +

    invoke_callback(*)

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/Base.html b/src/classes/ActionCable/SubscriptionAdapter/Base.html index 8416a4ad59..ed016ba5eb 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Base.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Base.html @@ -105,17 +105,9 @@

    Attributes

    Class Public methods

    -

    - - new(server) - -

    +

    new(server)

    -
    - -
    - @@ -145,17 +137,9 @@

    Instance Public methods

    -

    - - broadcast(channel, payload) - -

    +

    broadcast(channel, payload)

    -
    - -
    - @@ -180,17 +164,9 @@

    -

    - - identifier() - -

    +

    identifier()

    -
    - -
    - @@ -216,17 +192,9 @@

    -

    - - shutdown() - -

    +

    shutdown()

    -
    - -
    - @@ -251,17 +219,9 @@

    -

    - - subscribe(channel, message_callback, success_callback = nil) - -

    +

    subscribe(channel, message_callback, success_callback = nil)

    -
    - -
    - @@ -286,17 +246,9 @@

    -

    - - unsubscribe(channel, message_callback) - -

    +

    unsubscribe(channel, message_callback)

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html b/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html index e4f0682139..57dcc733b5 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html +++ b/src/classes/ActionCable/SubscriptionAdapter/PostgreSQL/Listener.html @@ -83,17 +83,9 @@

    Methods

    Class Public methods

    -

    - - new(adapter, event_loop) - -

    +

    new(adapter, event_loop)

    -
    - -
    - @@ -131,17 +123,9 @@

    Instance Public methods

    -

    - - add_channel(channel, on_success) - -

    +

    add_channel(channel, on_success)

    -
    - -
    - @@ -166,17 +150,9 @@

    -

    - - invoke_callback(*) - -

    +

    invoke_callback(*)

    -
    - -
    - @@ -201,17 +177,9 @@

    -

    - - listen() - -

    +

    listen()

    -
    - -
    - @@ -258,17 +226,9 @@

    -

    - - remove_channel(channel) - -

    +

    remove_channel(channel)

    -
    - -
    - @@ -293,17 +253,9 @@

    -

    - - shutdown() - -

    +

    shutdown()

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html index 02806c481a..830129e6d8 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener.html @@ -109,17 +109,9 @@

    Constants

    Class Public methods

    -

    - - new(adapter, config_options, event_loop) - -

    +

    new(adapter, config_options, event_loop)

    -
    - -
    - @@ -165,17 +157,9 @@

    Instance Public methods

    -

    - - add_channel(channel, on_success) - -

    +

    add_channel(channel, on_success)

    -
    - -
    - @@ -204,17 +188,9 @@

    -

    - - invoke_callback(*) - -

    +

    invoke_callback(*)

    -
    - -
    - @@ -239,17 +215,9 @@

    -

    - - listen(conn) - -

    +

    listen(conn)

    -
    - -
    - @@ -309,17 +277,9 @@

    -

    - - remove_channel(channel) - -

    +

    remove_channel(channel)

    -
    - -
    - @@ -346,17 +306,9 @@

    -

    - - shutdown() - -

    +

    shutdown()

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html index 01b6a88732..e4fc19b998 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Redis/Listener/SubscribedClient.html @@ -71,17 +71,9 @@

    Methods

    Class Public methods

    -

    - - new(raw_client) - -

    +

    new(raw_client)

    -
    - -
    - @@ -110,17 +102,9 @@

    Instance Public methods

    -

    - - subscribe(*channel) - -

    +

    subscribe(*channel)

    -
    - -
    - @@ -145,17 +129,9 @@

    -

    - - unsubscribe(*channel) - -

    +

    unsubscribe(*channel)

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html b/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html index badffb8c27..6d7788b478 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html +++ b/src/classes/ActionCable/SubscriptionAdapter/SubscriberMap.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -127,17 +119,9 @@

    Instance Public methods

    -

    - - add_channel(channel, on_success) - -

    +

    add_channel(channel, on_success)

    -
    - -
    - @@ -162,17 +146,9 @@

    -

    - - add_subscriber(channel, subscriber, on_success) - -

    +

    add_subscriber(channel, subscriber, on_success)

    -
    - -
    - @@ -207,17 +183,9 @@

    -

    - - broadcast(channel, message) - -

    +

    broadcast(channel, message)

    -
    - -
    - @@ -249,17 +217,9 @@

    -

    - - invoke_callback(callback, message) - -

    +

    invoke_callback(callback, message)

    -
    - -
    - @@ -284,17 +244,9 @@

    -

    - - remove_channel(channel) - -

    +

    remove_channel(channel)

    -
    - -
    - @@ -318,17 +270,9 @@

    -

    - - remove_subscriber(channel, subscriber) - -

    +

    remove_subscriber(channel, subscriber)

    -
    - -
    - diff --git a/src/classes/ActionCable/SubscriptionAdapter/Test.html b/src/classes/ActionCable/SubscriptionAdapter/Test.html index a4c436d8ad..de8b051b4e 100644 --- a/src/classes/ActionCable/SubscriptionAdapter/Test.html +++ b/src/classes/ActionCable/SubscriptionAdapter/Test.html @@ -88,17 +88,9 @@

    Methods

    Instance Public methods

    -

    - - broadcast(channel, payload) - -

    +

    broadcast(channel, payload)

    -
    - -
    - @@ -124,17 +116,9 @@

    -

    - - broadcasts(channel) - -

    +

    broadcasts(channel)

    -
    - -
    - @@ -159,17 +143,9 @@

    -

    - - clear() - -

    +

    clear()

    -
    - -
    - @@ -194,17 +170,9 @@

    -

    - - clear_messages(channel) - -

    +

    clear_messages(channel)

    -
    - -
    - diff --git a/src/classes/ActionCable/TestHelper.html b/src/classes/ActionCable/TestHelper.html index ca7958c561..b926528df7 100644 --- a/src/classes/ActionCable/TestHelper.html +++ b/src/classes/ActionCable/TestHelper.html @@ -76,15 +76,10 @@

    Methods

    Instance Public methods

    -

    - - assert_broadcast_on(stream, data, &block) - -

    +

    assert_broadcast_on(stream, data, &block)

    - -
    -

    Asserts that the specified message has been sent to the stream.

    +
    +

    Asserts that the specified message has been sent to the stream.

    def test_assert_transmitted_message
       ActionCable.server.broadcast 'messages', text: 'hello'
    @@ -100,8 +95,7 @@ 

    end end

    -
    - +
    @@ -148,15 +142,10 @@

    -

    - - assert_broadcasts(stream, number, &block) - -

    +

    assert_broadcasts(stream, number, &block)

    - -
    -

    Asserts that the number of broadcasted messages to the stream matches the given number.

    +
    +

    Asserts that the number of broadcasted messages to the stream matches the given number.

    def test_broadcasts
       assert_broadcasts 'messages', 0
    @@ -180,8 +169,7 @@ 

    end end

    -
    - +
    @@ -214,15 +202,10 @@

    -

    - - assert_no_broadcasts(stream, &block) - -

    +

    assert_no_broadcasts(stream, &block)

    - -
    -

    Asserts that no messages have been sent to the stream.

    +
    +

    Asserts that no messages have been sent to the stream.

    def test_no_broadcasts
       assert_no_broadcasts 'messages'
    @@ -244,8 +227,7 @@ 

    assert_broadcasts 'messages', 0, &block
     
    -

    - +
    @@ -270,15 +252,10 @@

    -

    - - capture_broadcasts(stream, &block) - -

    +

    capture_broadcasts(stream, &block)

    - -
    -

    Returns the messages that are broadcasted in the block.

    +
    +

    Returns the messages that are broadcasted in the block.

    def test_broadcasts
       messages = capture_broadcasts('messages') do
    @@ -290,8 +267,7 @@ 

    assert_equal({ text: 'how are you?' }, messages.last) end

    -
    - +
    diff --git a/src/classes/ActionController.html b/src/classes/ActionController.html index 1bf6d1b732..ce61581352 100644 --- a/src/classes/ActionController.html +++ b/src/classes/ActionController.html @@ -305,17 +305,11 @@

    Methods

    Class Public methods

    -

    - - add_renderer(key, &block) - -

    +

    add_renderer(key, &block)

    - -
    -

    See Renderers.add

    -
    - + @@ -340,17 +334,11 @@

    -

    - - remove_renderer(key) - -

    +

    remove_renderer(key)

    - - - + diff --git a/src/classes/ActionController/API.html b/src/classes/ActionController/API.html index b2d014c10c..81a5f2ad46 100644 --- a/src/classes/ActionController/API.html +++ b/src/classes/ActionController/API.html @@ -173,15 +173,10 @@

    Constants

    Class Public methods

    -

    - - without_modules(*modules) - -

    +

    without_modules(*modules)

    - -
    -

    Shortcut helper that returns all the ActionController::API modules except the ones passed as arguments:

    +
    +

    Shortcut helper that returns all the ActionController::API modules except the ones passed as arguments:

    class MyAPIBaseController < ActionController::Metal
       ActionController::API.without_modules(:UrlFor).each do |left|
    @@ -191,8 +186,7 @@ 

    This gives better control over what you want to exclude and makes it easier to create an API controller class, instead of listing the modules required manually.

    -
    - +
    diff --git a/src/classes/ActionController/AllowBrowser/ClassMethods.html b/src/classes/ActionController/AllowBrowser/ClassMethods.html index 8c6c32c831..8eb1f77ca4 100644 --- a/src/classes/ActionController/AllowBrowser/ClassMethods.html +++ b/src/classes/ActionController/AllowBrowser/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - allow_browser(versions:, block: -> { render file: Rails.root.join("public/406-unsupported-browser.html"), layout: false, status: :not_acceptable } - -

    +

    allow_browser(versions:, block: -> { render file: Rails.root.join("public/406-unsupported-browser.html"), layout: false, status: :not_acceptable }

    - -
    -

    Specify the browser versions that will be allowed to access all actions (or some, as limited by only: or except:). Only browsers matched in the hash or named set passed to versions: will be blocked if they’re below the versions specified. This means that all other browsers, as well as agents that aren’t reporting a user-agent header, will be allowed access.

    +
    +

    Specify the browser versions that will be allowed to access all actions (or some, as limited by only: or except:). Only browsers matched in the hash or named set passed to versions: will be blocked if they’re below the versions specified. This means that all other browsers, as well as agents that aren’t reporting a user-agent header, will be allowed access.

    A browser that’s blocked will by default be served the file in public/406-unsupported-browser.html with an HTTP status code of “406 Not Acceptable”.

    @@ -103,8 +98,7 @@

    allow_browser versions: { opera: 104, chrome: 119 }, only: :show end -

    - +
    diff --git a/src/classes/ActionController/ApiRendering.html b/src/classes/ActionController/ApiRendering.html index 016288831c..2e55cb1dd6 100644 --- a/src/classes/ActionController/ApiRendering.html +++ b/src/classes/ActionController/ApiRendering.html @@ -72,17 +72,9 @@

    Included Modules

    Instance Public methods

    -

    - - render_to_body(options = {}) - -

    +

    render_to_body(options = {})

    -
    - -
    - diff --git a/src/classes/ActionController/Base.html b/src/classes/ActionController/Base.html index 0019fcd0c9..66a761c36d 100644 --- a/src/classes/ActionController/Base.html +++ b/src/classes/ActionController/Base.html @@ -279,15 +279,10 @@

    Constants

    Class Public methods

    -

    - - without_modules(*modules) - -

    +

    without_modules(*modules)

    - -
    -

    Shortcut helper that returns all the modules included in ActionController::Base except the ones passed as arguments:

    +
    +

    Shortcut helper that returns all the modules included in ActionController::Base except the ones passed as arguments:

    class MyBaseController < ActionController::Metal
       ActionController::Base.without_modules(:ParamsWrapper, :Streaming).each do |left|
    @@ -297,8 +292,7 @@ 

    This gives better control over what you want to exclude and makes it easier to create a bare controller class, instead of listing the modules required manually.

    -
    - +
    diff --git a/src/classes/ActionController/ConditionalGet.html b/src/classes/ActionController/ConditionalGet.html index 480cb3604b..715434adf9 100644 --- a/src/classes/ActionController/ConditionalGet.html +++ b/src/classes/ActionController/ConditionalGet.html @@ -109,15 +109,10 @@

    Included Modules

    Instance Public methods

    -

    - - expires_in(seconds, options = {}) - -

    +

    expires_in(seconds, options = {})

    - -
    -

    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.

    @@ -161,8 +156,7 @@

    Examples

    expires_in 1.hour, public: true, "s-maxage": 3.hours, "no-transform": true # => Cache-Control: max-age=3600, public, s-maxage=10800, no-transform=true -
    - +
    @@ -199,17 +193,11 @@

    Examples

    -

    - - expires_now() - -

    +

    expires_now()

    - -
    -

    Sets an HTTP 1.1 Cache-Control header of no-cache. This means the resource will be marked as stale, so clients must always revalidate. Intermediate/browser caches may still store the asset.

    -
    - +
    +

    Sets an HTTP 1.1 Cache-Control header of no-cache. This means the resource will be marked as stale, so clients must always revalidate. Intermediate/browser caches may still store the asset.

    +
    @@ -234,15 +222,10 @@

    -

    - - fresh_when(object = nil, etag: nil, weak_etag: nil, strong_etag: nil, last_modified: nil, public: false, cache_control: {}, template: nil) - -

    +

    fresh_when(object = nil, etag: nil, weak_etag: nil, strong_etag: nil, last_modified: nil, public: false, cache_control: {}, template: nil)

    - -
    -

    Sets the etag, last_modified, or both on the response, and renders a 304 Not Modified response if the request is already fresh.

    +
    +

    Sets the etag, last_modified, or both on the response, and renders a 304 Not Modified response if the request is already fresh.

    Options

    :etag
    @@ -316,8 +299,7 @@

    Examples

    before_action { fresh_when @article, template: "widgets/show" }
     
    -
    - +
    @@ -358,22 +340,16 @@

    Examples

    -

    - - http_cache_forever(public: false) - -

    +

    http_cache_forever(public: false)

    - -
    -

    Cache or yield the block. The cache is supposed to never expire.

    +
    +

    Cache or yield the block. The cache is supposed to never expire.

    You can use this method when you have an HTTP response that never changes, and the browser and proxies should cache it indefinitely.

    • public: By default, HTTP responses are private, cached only on the user’s web browser. To allow proxies to cache the response, set true to indicate that they can serve the cached response to all users.

    -
    - +
    @@ -402,15 +378,10 @@

    -

    - - must_understand() - -

    +

    must_understand()

    - -
    -

    Adds the must-understand directive to the Cache-Control header, which indicates that a cache MUST understand the semantics of the response status code that has been received, or discard the response.

    +
    +

    Adds the must-understand directive to the Cache-Control header, which indicates that a cache MUST understand the semantics of the response status code that has been received, or discard the response.

    This is particularly useful when returning responses with new or uncommon status codes that might not be properly interpreted by older caches.

    @@ -427,8 +398,7 @@

    Example

    end end -
    - +
    @@ -454,17 +424,11 @@

    Example

    -

    - - no_store() - -

    +

    no_store()

    - -
    -

    Sets an HTTP 1.1 Cache-Control header of no-store. This means the resource may not be stored in any cache.

    -
    - +
    +

    Sets an HTTP 1.1 Cache-Control header of no-store. This means the resource may not be stored in any cache.

    +
    @@ -489,15 +453,10 @@

    -

    - - stale?(object = nil, **freshness_kwargs) - -

    +

    stale?(object = nil, **freshness_kwargs)

    - -
    -

    Sets the etag and/or last_modified on the response and checks them against the request. If the request doesn’t match the provided options, it is considered stale, and the response should be rendered from scratch. Otherwise, it is fresh, and a 304 Not Modified is sent.

    +
    +

    Sets the etag and/or last_modified on the response and checks them against the request. If the request doesn’t match the provided options, it is considered stale, and the response should be rendered from scratch. Otherwise, it is fresh, and a 304 Not Modified is sent.

    Options

    @@ -571,8 +530,7 @@

    Examples

    super if stale?(@article, template: "widgets/show") end -
    - +
    diff --git a/src/classes/ActionController/ConditionalGet/ClassMethods.html b/src/classes/ActionController/ConditionalGet/ClassMethods.html index 41335f7c4d..9c643cc49d 100644 --- a/src/classes/ActionController/ConditionalGet/ClassMethods.html +++ b/src/classes/ActionController/ConditionalGet/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - etag(&etagger) - -

    +

    etag(&etagger)

    - -
    -

    Allows you to consider additional controller-wide information when generating an ETag. For example, if you serve pages tailored depending on who’s logged in at the moment, you may want to add the current user id to be part of the ETag to prevent unauthorized displaying of cached pages.

    +
    +

    Allows you to consider additional controller-wide information when generating an ETag. For example, if you serve pages tailored depending on who’s logged in at the moment, you may want to add the current user id to be part of the ETag to prevent unauthorized displaying of cached pages.

    class InvoicesController < ApplicationController
       etag { current_user&.id }
    @@ -78,8 +73,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html b/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html index 47fe4a0c7d..4675aff508 100644 --- a/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html +++ b/src/classes/ActionController/ContentSecurityPolicy/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - content_security_policy(enabled = true, **options, &block) - -

    +

    content_security_policy(enabled = true, **options, &block)

    - -
    -

    Overrides parts of the globally configured Content-Security-Policy header:

    +
    +

    Overrides parts of the globally configured Content-Security-Policy header:

    class PostsController < ApplicationController
       content_security_policy do |policy|
    @@ -94,8 +89,7 @@ 

    content_security_policy false, only: :index end

    -
    - +
    @@ -130,15 +124,10 @@

    -

    - - content_security_policy_report_only(report_only = true, **options) - -

    +

    content_security_policy_report_only(report_only = true, **options)

    - -
    -

    Overrides the globally configured Content-Security-Policy-Report-Only header:

    +
    +

    Overrides the globally configured Content-Security-Policy-Report-Only header:

    class PostsController < ApplicationController
       content_security_policy_report_only only: :index
    @@ -151,8 +140,7 @@ 

    content_security_policy_report_only false, only: :index end

    -
    - +
    diff --git a/src/classes/ActionController/Cookies.html b/src/classes/ActionController/Cookies.html index 216b770bb2..dda4acdc5e 100644 --- a/src/classes/ActionController/Cookies.html +++ b/src/classes/ActionController/Cookies.html @@ -58,17 +58,11 @@

    Methods

    Instance Private methods

    -

    - - cookies() - -

    +

    cookies()

    - -
    -

    The cookies for the current request. See ActionDispatch::Cookies for more information.

    -
    - +
    +

    The cookies for the current request. See ActionDispatch::Cookies for more information.

    +
    diff --git a/src/classes/ActionController/DataStreaming.html b/src/classes/ActionController/DataStreaming.html index 538afde474..9140c7807b 100644 --- a/src/classes/ActionController/DataStreaming.html +++ b/src/classes/ActionController/DataStreaming.html @@ -84,15 +84,10 @@

    Included Modules

    Instance Private methods

    -

    - - send_data(data, options = {}) - -

    +

    send_data(data, options = {})

    - -
    -

    Sends the given binary data to the browser. This method is similar to render plain: data, but also allows you to specify whether the browser should display the response as a file attachment (i.e. in a download dialog) or as inline data. You may also set the content type, the file name, and other things.

    +
    +

    Sends the given binary data to the browser. This method is similar to render plain: data, but also allows you to specify whether the browser should display the response as a file attachment (i.e. in a download dialog) or as inline data. You may also set the content type, the file name, and other things.

    Options:

    • @@ -121,8 +116,7 @@

      Options:

      See send_file for more information on HTTP Content-* headers and caching.

      -
    - +
    @@ -148,15 +142,10 @@

    Options:

    -

    - - send_file(path, options = {}) - -

    +

    send_file(path, options = {})

    - -
    -

    Sends the file. This uses a server-appropriate method (such as X-Sendfile) via the Rack::Sendfile middleware. The header to use is set via config.action_dispatch.x_sendfile_header. Your server can also configure this for you by setting the X-Sendfile-Type header.

    +
    +

    Sends the file. This uses a server-appropriate method (such as X-Sendfile) via the Rack::Sendfile middleware. The header to use is set via config.action_dispatch.x_sendfile_header. Your server can also configure this for you by setting the X-Sendfile-Type header.

    Be careful to sanitize the path parameter if it is coming from a web page. send_file(params[:path]) allows a malicious user to download any file on your server.

    @@ -193,8 +182,7 @@

    Options:

    You can use other Content-* HTTP headers to provide additional information to the client. See MDN for a list of HTTP headers.

    Also be aware that the document may be cached by proxies and browsers. The Pragma and Cache-Control headers declare how the file may be cached by intermediaries. They default to require clients to validate with the server before releasing cached responses. See www.mnot.net/cache_docs/ for an overview of web caching and RFC 9111 for the Cache-Control header spec.

    -
    - +
    diff --git a/src/classes/ActionController/DefaultHeaders/ClassMethods.html b/src/classes/ActionController/DefaultHeaders/ClassMethods.html index 0fd0de050b..0e5296a892 100644 --- a/src/classes/ActionController/DefaultHeaders/ClassMethods.html +++ b/src/classes/ActionController/DefaultHeaders/ClassMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - make_response!(request) - -

    +

    make_response!(request)

    -
    - -
    - diff --git a/src/classes/ActionController/Flash.html b/src/classes/ActionController/Flash.html index 94970447c1..e1423a4abd 100644 --- a/src/classes/ActionController/Flash.html +++ b/src/classes/ActionController/Flash.html @@ -71,17 +71,9 @@

    Methods

    Instance Private methods

    -

    - - redirect_to(options = {}, response_options_and_flash = {}) - -

    +

    redirect_to(options = {}, response_options_and_flash = {})

    -
    - -
    - diff --git a/src/classes/ActionController/Flash/ClassMethods.html b/src/classes/ActionController/Flash/ClassMethods.html index d7fb99c18b..76b42ff600 100644 --- a/src/classes/ActionController/Flash/ClassMethods.html +++ b/src/classes/ActionController/Flash/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - add_flash_types(*types) - -

    +

    add_flash_types(*types)

    - -
    -

    Creates new flash types. You can pass as many types as you want to create flash types other than the default alert and notice in your controllers and views. For instance:

    +
    +

    Creates new flash types. You can pass as many types as you want to create flash types other than the default alert and notice in your controllers and views. For instance:

    # in application_controller.rb
     class ApplicationController < ActionController::Base
    @@ -81,8 +76,7 @@ 

    This method will automatically define a new method for each of the given names, and it will be available in your views.

    -
    - +
    diff --git a/src/classes/ActionController/FormBuilder.html b/src/classes/ActionController/FormBuilder.html index 2aa998f152..cac3cdea1e 100644 --- a/src/classes/ActionController/FormBuilder.html +++ b/src/classes/ActionController/FormBuilder.html @@ -101,17 +101,11 @@

    Methods

    Instance Public methods

    -

    - - default_form_builder() - -

    +

    default_form_builder()

    - -
    -

    Default form builder for the controller

    -
    - +
    +

    Default form builder for the controller

    +
    diff --git a/src/classes/ActionController/FormBuilder/ClassMethods.html b/src/classes/ActionController/FormBuilder/ClassMethods.html index d000ef9efc..4c8bbaff7a 100644 --- a/src/classes/ActionController/FormBuilder/ClassMethods.html +++ b/src/classes/ActionController/FormBuilder/ClassMethods.html @@ -58,22 +58,16 @@

    Methods

    Instance Public methods

    -

    - - default_form_builder(builder) - -

    +

    default_form_builder(builder)

    - -
    -

    Set the form builder to be used as the default for all forms in the views rendered by this controller and its subclasses.

    +
    +

    Set the form builder to be used as the default for all forms in the views rendered by this controller and its subclasses.

    Parameters

    -
    - +
    diff --git a/src/classes/ActionController/Head.html b/src/classes/ActionController/Head.html index 8a0154447c..957e378812 100644 --- a/src/classes/ActionController/Head.html +++ b/src/classes/ActionController/Head.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - head(status, options = nil) - -

    +

    head(status, options = nil)

    - -
    -

    Returns a response that has no content (merely headers). The options argument is interpreted to be a hash of header names and values. This allows you to easily return a response that consists only of significant headers:

    +
    +

    Returns a response that has no content (merely headers). The options argument is interpreted to be a hash of header names and values. This allows you to easily return a response that consists only of significant headers:

    head :created, location: person_path(@person)
     
    @@ -81,8 +76,7 @@ 

    See Rack::Utils::SYMBOL_TO_STATUS_CODE for a full list of valid status symbols.

    -
    - +
    diff --git a/src/classes/ActionController/Helpers.html b/src/classes/ActionController/Helpers.html index 93eba569b7..7b97c0d2f8 100644 --- a/src/classes/ActionController/Helpers.html +++ b/src/classes/ActionController/Helpers.html @@ -153,17 +153,11 @@

    Attributes

    Instance Public methods

    -

    - - helpers() - -

    +

    helpers()

    - -
    -

    Provides a proxy to access helper methods from outside the view.

    -
    - +
    +

    Provides a proxy to access helper methods from outside the view.

    +
    diff --git a/src/classes/ActionController/Helpers/ClassMethods.html b/src/classes/ActionController/Helpers/ClassMethods.html index 24e7792eed..07a5650358 100644 --- a/src/classes/ActionController/Helpers/ClassMethods.html +++ b/src/classes/ActionController/Helpers/ClassMethods.html @@ -66,22 +66,16 @@

    Methods

    Instance Public methods

    -

    - - helper_attr(*attrs) - -

    +

    helper_attr(*attrs)

    - -
    -

    Declares helper accessors for controller attributes. For example, the following adds new name and name= instance methods to a controller and makes them available to the view: attr_accessor :name helper_attr :name

    +
    +

    Declares helper accessors for controller attributes. For example, the following adds new name and name= instance methods to a controller and makes them available to the view: attr_accessor :name helper_attr :name

    Parameters

    • attrs - Names of attributes to be converted into helpers.

    -
    - +
    @@ -106,19 +100,13 @@

    -

    - - modules_for_helpers(args) - -

    +

    modules_for_helpers(args)

    - -
    -

    Override modules_for_helpers to accept :all as argument, which loads all helpers in helpers_path.

    +
    +

    Override modules_for_helpers to accept :all as argument, which loads all helpers in helpers_path.

    Parameters

    • @@ -166,8 +149,7 @@

      Returns

      • array - A normalized list of modules for the list of helpers provided.

      -
    - +
    diff --git a/src/classes/ActionController/HttpAuthentication/Basic.html b/src/classes/ActionController/HttpAuthentication/Basic.html index 4c3897a17e..de793351c2 100644 --- a/src/classes/ActionController/HttpAuthentication/Basic.html +++ b/src/classes/ActionController/HttpAuthentication/Basic.html @@ -162,17 +162,9 @@

    Methods

    Instance Public methods

    -

    - - auth_param(request) - -

    +

    auth_param(request)

    -
    - -
    - @@ -197,17 +189,9 @@

    -

    - - auth_scheme(request) - -

    +

    auth_scheme(request)

    -
    - -
    - @@ -232,17 +216,9 @@

    -

    - - authenticate(request, &login_procedure) - -

    +

    authenticate(request, &login_procedure)

    -
    - -
    - @@ -269,17 +245,9 @@

    -

    - - authentication_request(controller, realm, message) - -

    +

    authentication_request(controller, realm, message)

    -
    - -
    - @@ -307,17 +275,9 @@

    -

    - - decode_credentials(request) - -

    +

    decode_credentials(request)

    -
    - -
    - @@ -342,17 +302,9 @@

    -

    - - encode_credentials(user_name, password) - -

    +

    encode_credentials(user_name, password)

    -
    - -
    - @@ -377,17 +329,9 @@

    -

    - - has_basic_credentials?(request) - -

    +

    has_basic_credentials?(request)

    -
    - -
    - @@ -412,17 +356,9 @@

    -

    - - user_name_and_password(request) - -

    +

    user_name_and_password(request)

    -
    - -
    - diff --git a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html index 71b0b81d16..c0c096ea01 100644 --- a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods.html @@ -83,17 +83,9 @@

    Methods

    Instance Public methods

    -

    - - authenticate_or_request_with_http_basic(realm = nil, message = nil, &login_procedure) - -

    +

    authenticate_or_request_with_http_basic(realm = nil, message = nil, &login_procedure)

    -
    - -
    - @@ -118,17 +110,9 @@

    -

    - - authenticate_with_http_basic(&login_procedure) - -

    +

    authenticate_with_http_basic(&login_procedure)

    -
    - -
    - @@ -153,17 +137,9 @@

    -

    - - http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil) - -

    +

    http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil)

    -
    - -
    - @@ -193,17 +169,9 @@

    -

    - - request_http_basic_authentication(realm = "Application", message = nil) - -

    +

    request_http_basic_authentication(realm = "Application", message = nil)

    -
    - -
    - diff --git a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html index 8efb917681..d13164be0b 100644 --- a/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Basic/ControllerMethods/ClassMethods.html @@ -58,19 +58,13 @@

    Methods

    Instance Public methods

    -

    - - http_basic_authenticate_with(name:, password:, realm: nil, **options) - -

    +

    http_basic_authenticate_with(name:, password:, realm: nil, **options)

    - -
    -

    Enables HTTP Basic authentication.

    +
    +

    Enables HTTP Basic authentication.

    See ActionController::HttpAuthentication::Basic for example usage.

    -
    - +
    diff --git a/src/classes/ActionController/HttpAuthentication/Digest.html b/src/classes/ActionController/HttpAuthentication/Digest.html index 27270c5044..023a4edfd8 100644 --- a/src/classes/ActionController/HttpAuthentication/Digest.html +++ b/src/classes/ActionController/HttpAuthentication/Digest.html @@ -160,17 +160,11 @@

    Methods

    Instance Public methods

    -

    - - authenticate(request, realm, &password_procedure) - -

    +

    authenticate(request, realm, &password_procedure)

    - -
    -

    Returns true on a valid response, false otherwise.

    -
    - +
    +

    Returns true on a valid response, false otherwise.

    +
    @@ -195,17 +189,9 @@

    -

    - - authentication_header(controller, realm) - -

    +

    authentication_header(controller, realm)

    -
    - -
    - @@ -233,17 +219,9 @@

    -

    - - authentication_request(controller, realm, message = nil) - -

    +

    authentication_request(controller, realm, message = nil)

    -
    - -
    - @@ -271,17 +249,9 @@

    -

    - - decode_credentials(header) - -

    +

    decode_credentials(header)

    -
    - -
    - @@ -309,17 +279,9 @@

    -

    - - decode_credentials_header(request) - -

    +

    decode_credentials_header(request)

    -
    - -
    - @@ -344,17 +306,9 @@

    -

    - - encode_credentials(http_method, credentials, password, password_is_ha1) - -

    +

    encode_credentials(http_method, credentials, password, password_is_ha1)

    -
    - -
    - @@ -380,17 +334,11 @@

    -

    - - expected_response(http_method, uri, credentials, password, password_is_ha1 = true) - -

    +

    expected_response(http_method, uri, credentials, password, password_is_ha1 = true)

    - -
    -

    Returns the expected response for a request of http_method to uri with the decoded credentials and the expected password Optional parameter password_is_ha1 is set to true by default, since best practice is to store ha1 digest instead of a plain-text password.

    -
    - +
    +

    Returns the expected response for a request of http_method to uri with the decoded credentials and the expected password Optional parameter password_is_ha1 is set to true by default, since best practice is to store ha1 digest instead of a plain-text password.

    +
    @@ -417,17 +365,9 @@

    -

    - - ha1(credentials, password) - -

    +

    ha1(credentials, password)

    -
    - -
    - @@ -452,15 +392,10 @@

    -

    - - nonce(secret_key, time = Time.now) - -

    +

    nonce(secret_key, time = Time.now)

    - -
    -

    Uses an MD5 digest based on time to generate a value to be used only once.

    +
    +

    Uses an MD5 digest based on time to generate a value to be used only once.

    A server-specified data string which should be uniquely generated each time a 401 response is made. It is recommended that this string be base64 or hexadecimal data. Specifically, since the string is passed in the header lines as a quoted string, the double-quote character is not allowed.

    @@ -474,8 +409,7 @@

    An implementation might choose not to accept a previously used nonce or a previously used digest, in order to protect against a replay attack. Or, an implementation might choose to use one-time nonces or digests for POST, PUT, or PATCH requests, and a time-stamp for GET requests. For more details on the issues involved see Section 4 of this document.

    The nonce is opaque to the client. Composed of Time, and hash of Time with secret key from the Rails session secret generated upon creation of project. Ensures the time cannot be modified by client.

    -

    - +
    @@ -503,17 +437,11 @@

    -

    - - opaque(secret_key) - -

    +

    opaque(secret_key)

    - -
    -

    Opaque based on digest of secret key

    -
    - +
    +

    Opaque based on digest of secret key

    +
    @@ -538,17 +466,9 @@

    -

    - - secret_token(request) - -

    +

    secret_token(request)

    -
    - -
    - @@ -575,17 +495,11 @@

    -

    - - validate_digest_response(request, realm, &password_procedure) - -

    +

    validate_digest_response(request, realm, &password_procedure)

    - -
    -

    Returns false unless the request credentials response value matches the expected value. First try the password as a ha1 digest password. If this fails, then try it as a plain text password.

    -
    - +
    +

    Returns false unless the request credentials response value matches the expected value. First try the password as a ha1 digest password. If this fails, then try it as a plain text password.

    +
    @@ -628,17 +542,11 @@

    -

    - - validate_nonce(secret_key, request, value, seconds_to_timeout = 5 * 60) - -

    +

    validate_nonce(secret_key, request, value, seconds_to_timeout = 5 * 60)

    - -
    -

    Might want a shorter timeout depending on whether the request is a PATCH, PUT, or POST, and if the client is a browser or web service. Can be much shorter if the Stale directive is implemented. This would allow a user to use new nonce without prompting the user again for their username and password.

    -
    - +
    +

    Might want a shorter timeout depending on whether the request is a PATCH, PUT, or POST, and if the client is a browser or web service. Can be much shorter if the Stale directive is implemented. This would allow a user to use new nonce without prompting the user again for their username and password.

    +
    diff --git a/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html b/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html index c1978c250f..83a5335e73 100644 --- a/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Digest/ControllerMethods.html @@ -66,19 +66,13 @@

    Methods

    Instance Public methods

    -

    - - authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure) - -

    +

    authenticate_or_request_with_http_digest(realm = "Application", message = nil, &password_procedure)

    - -
    -

    Authenticate using an HTTP Digest, or otherwise render an HTTP header requesting the client to send a Digest.

    +
    +

    Authenticate using an HTTP Digest, or otherwise render an HTTP header requesting the client to send a Digest.

    See ActionController::HttpAuthentication::Digest for example usage.

    -
    - +
    @@ -103,17 +97,11 @@

    -

    - - authenticate_with_http_digest(realm = "Application", &password_procedure) - -

    +

    authenticate_with_http_digest(realm = "Application", &password_procedure)

    - -
    -

    Authenticate using an HTTP Digest. Returns true if authentication is successful, false otherwise.

    -
    - +
    +

    Authenticate using an HTTP Digest. Returns true if authentication is successful, false otherwise.

    +
    @@ -138,17 +126,11 @@

    -

    - - request_http_digest_authentication(realm = "Application", message = nil) - -

    +

    request_http_digest_authentication(realm = "Application", message = nil)

    - -
    -

    Render an HTTP header requesting the client to send a Digest for authentication.

    -
    - +
    +

    Render an HTTP header requesting the client to send a Digest for authentication.

    +
    diff --git a/src/classes/ActionController/HttpAuthentication/Token.html b/src/classes/ActionController/HttpAuthentication/Token.html index 22fbf5ce10..a943f29340 100644 --- a/src/classes/ActionController/HttpAuthentication/Token.html +++ b/src/classes/ActionController/HttpAuthentication/Token.html @@ -203,15 +203,10 @@

    Constants

    Instance Public methods

    -

    - - authenticate(controller, &login_procedure) - -

    +

    authenticate(controller, &login_procedure)

    - -
    -

    If token Authorization header is present, call the login procedure with the present token and options.

    +
    +

    If token Authorization header is present, call the login procedure with the present token and options.

    Returns the return value of login_procedure if a token is found. Returns nil if no token is found.

    @@ -224,8 +219,7 @@

    authenticate(controller) { |token, options| ... } -

    - +
    @@ -253,15 +247,10 @@

    -

    - - raw_params(auth) - -

    +

    raw_params(auth)

    - -
    -

    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.

    +
    @@ -423,17 +393,11 @@

    -

    - - rewrite_param_values(array_params) - -

    +

    rewrite_param_values(array_params)

    - -
    -

    This removes the " characters wrapping the value.

    -
    - +
    +

    This removes the " characters wrapping the value.

    +
    @@ -458,15 +422,10 @@

    -

    - - token_and_options(request) - -

    +

    token_and_options(request)

    - -
    -

    Parses the token and options out of the token Authorization header. The value for the Authorization header is expected to have the prefix "Token" or "Bearer". If the header looks like this:

    +
    +

    Parses the token and options out of the token Authorization header. The value for the Authorization header is expected to have the prefix "Token" or "Bearer". If the header looks like this:

    Authorization: Token token="abc", nonce="def"
     
    @@ -479,8 +438,7 @@

    ActionDispatch::Request instance with the current headers.

    -

    - +
    @@ -509,17 +467,9 @@

    -

    - - token_params_from(auth) - -

    +

    token_params_from(auth)

    -
    - -
    - diff --git a/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html b/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html index 6e35015427..f27c24b09b 100644 --- a/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html +++ b/src/classes/ActionController/HttpAuthentication/Token/ControllerMethods.html @@ -66,19 +66,13 @@

    Methods

    Instance Public methods

    -

    - - authenticate_with_http_token(&login_procedure) - -

    +

    authenticate_with_http_token(&login_procedure)

    - -
    -

    Authenticate using an HTTP Bearer token. Returns the return value of login_procedure if a token is found. Returns nil if no token is found.

    +
    +

    Authenticate using an HTTP Bearer token. Returns the return value of login_procedure if a token is found. Returns nil if no token is found.

    See ActionController::HttpAuthentication::Token for example usage.

    -
    - +
    @@ -140,17 +128,11 @@

    -

    - - request_http_token_authentication(realm = "Application", message = nil) - -

    +

    request_http_token_authentication(realm = "Application", message = nil)

    - -
    -

    Render an HTTP header requesting the client to send a Bearer token for authentication.

    -
    - +
    +

    Render an HTTP header requesting the client to send a Bearer token for authentication.

    +
    diff --git a/src/classes/ActionController/Instrumentation.html b/src/classes/ActionController/Instrumentation.html index 4d903e0c08..236319942a 100644 --- a/src/classes/ActionController/Instrumentation.html +++ b/src/classes/ActionController/Instrumentation.html @@ -101,17 +101,9 @@

    Methods

    Instance Public methods

    -

    - - redirect_to(*) - -

    +

    redirect_to(*)

    -
    - -
    - @@ -141,17 +133,9 @@

    -

    - - render(*) - -

    +

    render(*)

    -
    - -
    - @@ -180,17 +164,9 @@

    -

    - - send_data(data, options = {}) - -

    +

    send_data(data, options = {})

    -
    - -
    - @@ -217,17 +193,9 @@

    -

    - - send_file(path, options = {}) - -

    +

    send_file(path, options = {})

    -
    - -
    - @@ -258,17 +226,11 @@

    Instance Private methods

    -

    - - append_info_to_payload(payload) - -

    +

    append_info_to_payload(payload)

    - -
    -

    Every time after an action is processed, this method is invoked with the payload, so you can add more information.

    -
    - +
    +

    Every time after an action is processed, this method is invoked with the payload, so you can add more information.

    +
    @@ -293,22 +255,16 @@

    -

    - - cleanup_view_runtime() - -

    +

    cleanup_view_runtime()

    - -
    -

    A hook which allows you to clean up any time, wrongly taken into account in views, like database querying time.

    +
    +

    A hook which allows you to clean up any time, wrongly taken into account in views, like database querying time.

    def cleanup_view_runtime
       super - time_taken_in_something_expensive
     end
     
    -
    - +
    diff --git a/src/classes/ActionController/Live.html b/src/classes/ActionController/Live.html index ed21093c45..590dafb557 100644 --- a/src/classes/ActionController/Live.html +++ b/src/classes/ActionController/Live.html @@ -133,17 +133,9 @@

    Methods

    Class Public methods

    -

    - - live_thread_pool_executor() - -

    +

    live_thread_pool_executor()

    -
    - -
    - @@ -172,17 +164,9 @@

    Instance Public methods

    -

    - - process(name) - -

    +

    process(name)

    -
    - -
    - @@ -247,17 +231,9 @@

    -

    - - response_body=(body) - -

    +

    response_body=(body)

    -
    - -
    - @@ -283,15 +259,10 @@

    -

    - - send_stream(filename:, disposition: "attachment", type: nil) - -

    +

    send_stream(filename:, disposition: "attachment", type: nil)

    - -
    -

    Sends a stream to the browser, which is helpful when you’re generating exports or other running data where you don’t want the entire file buffered in memory first. Similar to send_data, but where the data is generated live.

    +
    +

    Sends a stream to the browser, which is helpful when you’re generating exports or other running data where you don’t want the entire file buffered in memory first. Similar to send_data, but where the data is generated live.

    Options:

    • @@ -312,8 +283,7 @@

      Options:

      end end -
    - +
    diff --git a/src/classes/ActionController/Live/ClassMethods.html b/src/classes/ActionController/Live/ClassMethods.html index 27043f6a65..6f1b13d53b 100644 --- a/src/classes/ActionController/Live/ClassMethods.html +++ b/src/classes/ActionController/Live/ClassMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - make_response!(request) - -

    +

    make_response!(request)

    -
    - -
    - diff --git a/src/classes/ActionController/Live/SSE.html b/src/classes/ActionController/Live/SSE.html index 75769250ba..cfe31fe50b 100644 --- a/src/classes/ActionController/Live/SSE.html +++ b/src/classes/ActionController/Live/SSE.html @@ -126,17 +126,9 @@

    Constants

    Class Public methods

    -

    - - new(stream, options = {}) - -

    +

    new(stream, options = {})

    -
    - -
    - @@ -166,17 +158,9 @@

    Instance Public methods

    -

    - - close() - -

    +

    close()

    -
    - -
    - @@ -201,17 +185,9 @@

    -

    - - write(object, options = {}) - -

    +

    write(object, options = {})

    -
    - -
    - diff --git a/src/classes/ActionController/Logging/ClassMethods.html b/src/classes/ActionController/Logging/ClassMethods.html index 2e2ab44eea..d58e070bc7 100644 --- a/src/classes/ActionController/Logging/ClassMethods.html +++ b/src/classes/ActionController/Logging/ClassMethods.html @@ -58,23 +58,17 @@

    Methods

    Instance Public methods

    -

    - - log_at(level, **options) - -

    +

    log_at(level, **options)

    - -
    -

    Set a different log level per request.

    +
    +

    Set a different log level per request.

    # Use the debug log level if a particular cookie is set.
     class ApplicationController < ActionController::Base
       log_at :debug, if: -> { cookies[:debug] }
     end
     
    -
    - +
    diff --git a/src/classes/ActionController/Metal.html b/src/classes/ActionController/Metal.html index 71184e782d..a6edec72b0 100644 --- a/src/classes/ActionController/Metal.html +++ b/src/classes/ActionController/Metal.html @@ -236,17 +236,11 @@

    Attributes

    Class Public methods

    -

    - - action(name) - -

    +

    action(name)

    - -
    -

    Returns a Rack endpoint for the given action name.

    -
    - +
    +

    Returns a Rack endpoint for the given action name.

    +
    @@ -281,22 +275,16 @@

    -

    - - controller_name() - -

    +

    controller_name()

    - -
    -

    Returns the last part of the controller’s name, underscored, without the ending Controller. For instance, PostsController returns posts. Namespaces are left out, so Admin::PostsController returns posts as well.

    +
    +

    Returns the last part of the controller’s name, underscored, without the ending Controller. For instance, PostsController returns posts. Namespaces are left out, so Admin::PostsController returns posts as well.

    Returns

    • string

    -
    - +
    @@ -321,17 +309,11 @@

    Returns

    -

    - - dispatch(name, req, res) - -

    +

    dispatch(name, req, res)

    - -
    -

    Direct dispatch to the controller. Instantiates the controller, then executes the action named name.

    -
    - +
    +

    Direct dispatch to the controller. Instantiates the controller, then executes the action named name.

    +
    @@ -360,17 +342,9 @@

    -

    - - make_response!(request) - -

    +

    make_response!(request)

    -
    - -
    - @@ -397,15 +371,10 @@

    -

    - - middleware() - -

    +

    middleware()

    - -
    -

    The middleware stack used by this controller.

    +
    +

    The middleware stack used by this controller.

    By default uses a variation of ActionDispatch::MiddlewareStack which allows for the following syntax:

    @@ -415,8 +384,7 @@

    Read more about [Rails middleware stack] (guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack) in the guides.

    -

    - +
    @@ -441,17 +409,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -481,17 +441,11 @@

    -

    - - use(...) - -

    +

    use(...)

    - -
    -

    Pushes the given Rack middleware and its arguments to the bottom of the middleware stack.

    -
    - +
    +

    Pushes the given Rack middleware and its arguments to the bottom of the middleware stack.

    +
    @@ -520,17 +474,11 @@

    Instance Public methods

    -

    - - content_type - -

    +

    content_type

    - - - + @@ -554,17 +502,11 @@

    -

    - - content_type= - -

    +

    content_type=

    - - - + @@ -588,17 +530,11 @@

    -

    - - controller_name() - -

    +

    controller_name()

    - -
    -

    Delegates to the class’s ::controller_name.

    -
    - +
    +

    Delegates to the class’s ::controller_name.

    +
    @@ -623,17 +559,11 @@

    -

    - - headers - -

    +

    headers

    - - - + @@ -657,17 +587,11 @@

    -

    - - location - -

    +

    location

    - - - + @@ -691,17 +615,11 @@

    -

    - - location= - -

    +

    location=

    - - - + @@ -725,17 +643,11 @@

    -

    - - media_type - -

    +

    media_type

    - - - + @@ -759,17 +671,9 @@

    -

    - - params() - -

    +

    params()

    -
    - -
    - @@ -794,17 +698,9 @@

    -

    - - params=(val) - -

    +

    params=(val)

    -
    - -
    - @@ -829,17 +725,11 @@

    -

    - - performed?() - -

    +

    performed?()

    - -
    -

    Tests if render or redirect has already happened.

    -
    - +
    +

    Tests if render or redirect has already happened.

    +
    @@ -864,17 +754,9 @@

    -

    - - reset_session() - -

    +

    reset_session()

    -
    - -
    - @@ -899,17 +781,11 @@

    -

    - - response=(response) - -

    +

    response=(response)

    - -
    -

    Assign the response and mark it as committed. No further processing will occur.

    -
    - +
    +

    Assign the response and mark it as committed. No further processing will occur.

    +
    @@ -937,17 +813,9 @@

    -

    - - response_body=(body) - -

    +

    response_body=(body)

    -
    - -
    - @@ -978,17 +846,11 @@

    -

    - - session - -

    +

    session

    - -
    -

    The ActionDispatch::Request::Session instance for the current request. See further details in the Active Controller Session guide.

    -
    - +
    +

    The ActionDispatch::Request::Session instance for the current request. See further details in the Active Controller Session guide.

    +
    @@ -1012,17 +874,11 @@

    -

    - - status - -

    +

    status

    - - - + @@ -1046,17 +902,11 @@

    -

    - - status= - -

    +

    status=

    - - - + @@ -1080,17 +930,11 @@

    -

    - - url_for(string) - -

    +

    url_for(string)

    - -
    -

    Basic url_for that can be overridden for more robust functionality.

    -
    - +
    +

    Basic url_for that can be overridden for more robust functionality.

    +
    diff --git a/src/classes/ActionController/MimeResponds.html b/src/classes/ActionController/MimeResponds.html index 79251d7a6f..c2b5868c70 100644 --- a/src/classes/ActionController/MimeResponds.html +++ b/src/classes/ActionController/MimeResponds.html @@ -71,15 +71,10 @@

    Methods

    Instance Public methods

    -

    - - respond_to(*mimes) - -

    +

    respond_to(*mimes)

    - -
    -

    Without web-service support, an action which collects the data for displaying a list of people might look something like this:

    +
    +

    Without web-service support, an action which collects the data for displaying a list of people might look something like this:

    def index
       @people = Person.all
    @@ -277,8 +272,7 @@ 

    format.html.phone # this gets rendered end

    -
    - +
    diff --git a/src/classes/ActionController/MimeResponds/Collector.html b/src/classes/ActionController/MimeResponds/Collector.html index 83b8ad427c..50a35065b6 100644 --- a/src/classes/ActionController/MimeResponds/Collector.html +++ b/src/classes/ActionController/MimeResponds/Collector.html @@ -133,17 +133,9 @@

    Attributes

    Class Public methods

    -

    - - new(mimes, variant = nil) - -

    +

    new(mimes, variant = nil)

    -
    - -
    - @@ -175,24 +167,17 @@

    Instance Public methods

    -

    - - all(*args, &block) - -

    +

    all(*args, &block)

    -
    - -
    - -
    - Alias for: any -
    +

    + Alias for: + any. +

    @@ -200,22 +185,16 @@

    -

    - - any(*args, &block) - -

    +

    any(*args, &block)

    -
    - -
    - -
    - Also aliased as: all -
    +

    + Also aliased as: + + all. +

    @@ -243,17 +222,9 @@

    -

    - - any_response?() - -

    +

    any_response?()

    -
    - -
    - @@ -278,17 +249,9 @@

    -

    - - custom(mime_type, &block) - -

    +

    custom(mime_type, &block)

    -
    - -
    - @@ -318,17 +281,9 @@

    -

    - - negotiate_format(request) - -

    +

    negotiate_format(request)

    -
    - -
    - @@ -353,17 +308,9 @@

    -

    - - response() - -

    +

    response()

    -
    - -
    - diff --git a/src/classes/ActionController/MissingRenderer.html b/src/classes/ActionController/MissingRenderer.html index a8ef5f17ea..c25f9cd5c5 100644 --- a/src/classes/ActionController/MissingRenderer.html +++ b/src/classes/ActionController/MissingRenderer.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(format) - -

    +

    new(format)

    -
    - -
    - diff --git a/src/classes/ActionController/ParameterEncoding/ClassMethods.html b/src/classes/ActionController/ParameterEncoding/ClassMethods.html index 4874a63c8a..6f3a186c99 100644 --- a/src/classes/ActionController/ParameterEncoding/ClassMethods.html +++ b/src/classes/ActionController/ParameterEncoding/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - param_encoding(action, param, encoding) - -

    +

    param_encoding(action, param, encoding)

    - -
    -

    Specify the encoding for a parameter on an action. If not specified the default is UTF-8.

    +
    +

    Specify the encoding for a parameter on an action. If not specified the default is UTF-8.

    You can specify a binary (ASCII_8BIT) parameter with:

    @@ -92,8 +87,7 @@

    The file_path parameter on the show action would be encoded as ASCII-8BIT, but all other arguments will remain UTF-8 encoded. This is useful in the case where an application must handle data but encoding of the data is unknown, like file system data.

    -

    - +
    @@ -118,15 +112,10 @@

    -

    - - skip_parameter_encoding(action) - -

    +

    skip_parameter_encoding(action)

    - -
    -

    Specify that a given action’s parameters should all be encoded as ASCII-8BIT (it “skips” the encoding default of UTF-8).

    +
    +

    Specify that a given action’s parameters should all be encoded as ASCII-8BIT (it “skips” the encoding default of UTF-8).

    For example, a controller would use it like this:

    @@ -148,8 +137,7 @@

    The show action in the above controller would have all parameter values encoded as ASCII-8BIT. This is useful in the case where an application must handle data but encoding of the data is unknown, like file system data.

    -

    - +
    diff --git a/src/classes/ActionController/Parameters.html b/src/classes/ActionController/Parameters.html index e20d1800c4..2ca01788e1 100644 --- a/src/classes/ActionController/Parameters.html +++ b/src/classes/ActionController/Parameters.html @@ -495,15 +495,10 @@

    Attributes

    Class Public methods

    -

    - - new(parameters = {}, logging_context = {}) - -

    +

    new(parameters = {}, logging_context = {})

    - -
    -

    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
    @@ -518,8 +513,7 @@ 

    params.permitted? # => true Person.new(params) # => #<Person id: nil, name: "Francesco">

    -
    - +
    @@ -556,17 +550,11 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    - -
    -

    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.

    +
    @@ -595,22 +583,16 @@

    -

    - - [](key) - -

    +

    [](key)

    - -
    -

    Returns a parameter for the given key. If not found, returns nil.

    +
    +

    Returns a parameter for the given key. If not found, returns nil.

    params = ActionController::Parameters.new(person: { name: "Francesco" })
     params[:person] # => #<ActionController::Parameters {"name"=>"Francesco"} permitted: false>
     params[:none]   # => nil
     
    -
    - +
    @@ -635,17 +617,11 @@

    -

    - - []=(key, value) - -

    +

    []=(key, value)

    - -
    -

    Assigns a value to a given key. The given key may still get filtered out when permit is called.

    -
    - +
    +

    Assigns a value to a given key. The given key may still get filtered out when permit is called.

    +
    @@ -670,18 +646,12 @@

    -

    - - as_json(options=nil) +

    as_json(options=nil) +

    - -

    - - -
    -

    Returns a hash that can be used as the JSON representation for the parameters.

    -
    - +
    +

    Returns a hash that can be used as the JSON representation for the parameters.

    +
    @@ -694,17 +664,11 @@

    -

    - - compact() - -

    +

    compact()

    - -
    -

    Returns a new ActionController::Parameters instance with nil values removed.

    -
    - +
    +

    Returns a new ActionController::Parameters instance with nil values removed.

    +
    @@ -729,17 +693,11 @@

    -

    - - compact!() - -

    +

    compact!()

    - -
    -

    Removes all nil values in place and returns self, or nil if no changes were made.

    -
    - +
    +

    Removes all nil values in place and returns self, or nil if no changes were made.

    +
    @@ -764,17 +722,11 @@

    -

    - - compact_blank() - -

    +

    compact_blank()

    - -
    -

    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.

    +
    @@ -799,17 +751,11 @@

    -

    - - compact_blank!() - -

    +

    compact_blank!()

    - -
    -

    Removes all blank values in place and returns self. Uses Object#blank? for determining if a value is blank.

    -
    - +
    +

    Removes all blank values in place and returns self. Uses Object#blank? for determining if a value is blank.

    +
    @@ -834,19 +780,13 @@

    -

    - - converted_arrays() - -

    +

    converted_arrays()

    - -
    -

    Attribute that keeps track of converted arrays, if any, to avoid double looping in the common use case permit + mass-assignment. Defined in a method to instantiate it only if needed.

    +
    +

    Attribute that keeps track of converted arrays, if any, to avoid double looping in the common use case permit + mass-assignment. Defined in a method to instantiate it only if needed.

    Testing membership still loops, but it’s going to be faster than our own loop that converts values. Also, we are not going to build a new array object per fetch.

    -
    - +
    @@ -871,17 +811,11 @@

    -

    - - deep_dup() - -

    +

    deep_dup()

    - -
    -

    Returns a duplicate ActionController::Parameters instance with the same permitted parameters.

    -
    - +
    +

    Returns a duplicate ActionController::Parameters instance with the same permitted parameters.

    +
    @@ -908,20 +842,14 @@

    -

    - - deep_merge(other_hash, &block) +

    deep_merge(other_hash, &block) +

    - -

    - - -
    -

    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,18 +862,12 @@

    -

    - - deep_merge!(other_hash, &block) +

    deep_merge!(other_hash, &block) +

    - -

    - - -
    -

    Same as deep_merge, but modifies self.

    -
    - +
    +

    Same as deep_merge, but modifies self.

    +
    @@ -958,17 +880,11 @@

    -

    - - deep_transform_keys(&block) - -

    +

    deep_transform_keys(&block)

    - -
    -

    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.

    +
    @@ -995,17 +911,11 @@

    -

    - - deep_transform_keys!(&block) - -

    +

    deep_transform_keys!(&block)

    - -
    -

    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.

    +
    @@ -1031,17 +941,11 @@

    -

    - - delete(key, &block) - -

    +

    delete(key, &block)

    - -
    -

    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.

    +
    @@ -1066,24 +970,17 @@

    -

    - - delete_if(&block) - -

    +

    delete_if(&block)

    -
    - -
    - -
    - Alias for: reject! -
    +

    + Alias for: + reject!. +

    @@ -1091,15 +988,10 @@

    -

    - - dig(*keys) - -

    +

    dig(*keys)

    - -
    -

    Extracts the nested parameter from the given keys by calling dig at each step. Returns nil if any intermediate step is nil.

    +
    +

    Extracts the nested parameter from the given keys by calling dig at each step. Returns nil if any intermediate step is nil.

    params = ActionController::Parameters.new(foo: { bar: { baz: 1 } })
     params.dig(:foo, :bar, :baz) # => 1
    @@ -1108,8 +1000,7 @@ 

    params2 = ActionController::Parameters.new(foo: [10, 11, 12]) params2.dig(:foo, 1) # => 11

    -
    - +
    @@ -1135,24 +1026,17 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - -
    - Alias for: each_pair -
    +

    + Alias for: + each_pair. +

    @@ -1160,18 +1044,12 @@

    -

    - - each_key(&block) - - -

    +

    each_key(&block) +

    - -
    -

    Calls block once for each key in the parameters, passing the key. If no block is given, an enumerator is returned instead.

    -
    - +
    +

    Calls block once for each key in the parameters, passing the key. If no block is given, an enumerator is returned instead.

    +
    @@ -1184,22 +1062,18 @@

    -

    - - each_pair(&block) - -

    +

    each_pair(&block)

    - -
    -

    Convert all hashes in values into parameters, then yield each pair in the same way as Hash#each_pair.

    -
    - +
    +

    Convert all hashes in values into parameters, then yield each pair in the same way as Hash#each_pair.

    +
    -
    - Also aliased as: each -
    +

    + Also aliased as: + + each. +

    @@ -1228,17 +1102,11 @@

    -

    - - each_value(&block) - -

    +

    each_value(&block)

    - -
    -

    Convert all hashes in values into parameters, then yield each value in the same way as Hash#each_value.

    -
    - +
    +

    Convert all hashes in values into parameters, then yield each value in the same way as Hash#each_value.

    +
    @@ -1268,18 +1136,12 @@

    -

    - - empty?() - - -

    +

    empty?() +

    - -
    -

    Returns true if the parameters have no key/value pairs.

    -
    - +
    +

    Returns true if the parameters have no key/value pairs.

    +
    @@ -1292,17 +1154,9 @@

    -

    - - eql?(other) - -

    +

    eql?(other)

    -
    - -
    - @@ -1329,27 +1183,23 @@

    -

    - - except(*keys) - -

    +

    except(*keys)

    - -
    -

    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>
     params.except(:d)     # => #<ActionController::Parameters {"a"=>1, "b"=>2, "c"=>3} permitted: false>
     
    -
    - +
    -
    - Also aliased as: without -
    +

    + Also aliased as: + + without. +

    @@ -1373,18 +1223,12 @@

    -

    - - exclude?(key) +

    exclude?(key) +

    - - - - -
    -

    Returns true if the given key is not present in the parameters.

    -
    - +
    +

    Returns true if the given key is not present in the parameters.

    +
    @@ -1397,15 +1241,10 @@

    -

    - - expect(*filters) - -

    +

    expect(*filters)

    - -
    -

    expect is the preferred way to require and permit parameters. It is safer than the previous recommendation to call permit and require in sequence, which could allow user triggered 500 errors.

    +
    +

    expect is the preferred way to require and permit parameters. It is safer than the previous recommendation to call permit and require in sequence, which could allow user triggered 500 errors.

    expect is more strict with types to avoid a number of potential pitfalls that may be encountered with the .require.permit pattern.

    @@ -1502,8 +1341,7 @@

    permitted.is_a?(Array) # => true permitted.size # => 2 -

    - +
    @@ -1531,17 +1369,11 @@

    -

    - - expect!(*filters) - -

    +

    expect!(*filters)

    - -
    -

    Same as expect, but raises an ActionController::ExpectedParameterMissing instead of ActionController::ParameterMissing. Unlike expect which will render a 400 response, expect! will raise an exception that is not handled. This is intended for debugging invalid params for an internal API where incorrectly formatted params would indicate a bug in a client library that should be fixed.

    -
    - +
    +

    Same as expect, but raises an ActionController::ExpectedParameterMissing instead of ActionController::ParameterMissing. Unlike expect which will render a 400 response, expect! will raise an exception that is not handled. This is intended for debugging invalid params for an internal API where incorrectly formatted params would indicate a bug in a client library that should be fixed.

    +
    @@ -1568,22 +1400,16 @@

    -

    - - extract!(*keys) - -

    +

    extract!(*keys)

    - -
    -

    Removes and returns the key/value pairs matching the given keys.

    +
    +

    Removes and returns the key/value pairs matching the given keys.

    params = ActionController::Parameters.new(a: 1, b: 2, c: 3)
     params.extract!(:a, :b) # => #<ActionController::Parameters {"a"=>1, "b"=>2} permitted: false>
     params                  # => #<ActionController::Parameters {"c"=>3} permitted: false>
     
    -
    - +
    @@ -1608,15 +1434,10 @@

    -

    - - extract_value(key, delimiter: "_") - -

    +

    extract_value(key, delimiter: "_")

    - -
    -

    Returns parameter value for the given key separated by delimiter.

    +
    +

    Returns parameter value for the given key separated by delimiter.

    params = ActionController::Parameters.new(id: "1_123", tags: "ruby,rails")
     params.extract_value(:id) # => ["1", "123"]
    @@ -1629,8 +1450,7 @@ 

    params = ActionController::Parameters.new(tags: "ruby,rails,,web")
     params.extract_value(:tags, delimiter: ",") # => ["ruby", "rails", "", "web"]
     
    -

    - +
    @@ -1655,15 +1475,10 @@

    -

    - - fetch(key, *args) - -

    +

    fetch(key, *args)

    - -
    -

    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>
    @@ -1672,8 +1487,7 @@ 

    params.fetch(:none, "Francesco") # => "Francesco" params.fetch(:none) { "Francesco" } # => "Francesco"

    -
    - +
    @@ -1706,24 +1520,17 @@

    -

    - - has_key? - -

    +

    has_key?

    -
    - -
    - -
    - Alias for: include? -
    +

    + Alias for: + include?. +

    @@ -1731,22 +1538,18 @@

    -

    - - has_value?(value) - -

    +

    has_value?(value)

    - -
    -

    Returns true if the given value is present for some key in the parameters.

    -
    - +
    +

    Returns true if the given value is present for some key in the parameters.

    +
    -
    - Also aliased as: value? -
    +

    + Also aliased as: + + value?. +

    @@ -1770,17 +1573,9 @@

    -

    - - hash() - -

    +

    hash()

    -
    - -
    - @@ -1805,22 +1600,18 @@

    -

    - - include?(key) - -

    +

    include?(key)

    - -
    -

    Returns true if the given key is present in the parameters.

    -
    - +
    +

    Returns true if the given key is present in the parameters.

    +
    -
    - Also aliased as: has_key?, key?, member? -
    +

    + Also aliased as: + + has_key?, key?, member?. +

    @@ -1832,17 +1623,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -1867,24 +1650,17 @@

    -

    - - keep_if(&block) - -

    +

    keep_if(&block)

    -
    - -
    - -
    - Alias for: select! -
    +

    + Alias for: + select!. +

    @@ -1892,24 +1668,17 @@

    -

    - - key? - -

    +

    key?

    -
    - -
    - -
    - Alias for: include? -
    +

    + Alias for: + include?. +

    @@ -1917,18 +1686,12 @@

    -

    - - keys() - - -

    +

    keys() +

    - -
    -

    Returns a new array of the keys of the parameters.

    -
    - +
    +

    Returns a new array of the keys of the parameters.

    +
    @@ -1941,24 +1704,17 @@

    -

    - - member? - -

    +

    member?

    -
    - -
    - -
    - Alias for: include? -
    +

    + Alias for: + include?. +

    @@ -1966,17 +1722,11 @@

    -

    - - merge(other_hash) - -

    +

    merge(other_hash)

    - -
    -

    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.

    +
    @@ -2003,18 +1753,12 @@

    -

    - - merge!(other_hash) - - -

    +

    merge!(other_hash) +

    - -
    -

    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.

    +
    @@ -2040,15 +1784,10 @@

    -

    - - permit(*filters) - -

    +

    permit(*filters)

    - -
    -

    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(name: "Francesco", age: 22, role: "admin")
     permitted = params.permit(:name, :age)
    @@ -2175,8 +1914,7 @@ 

    params.permit(person: { '0': [:email], '1': [:phone]}).to_h # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}}

    -
    - +
    @@ -2201,15 +1939,10 @@

    -

    - - permit!() - -

    +

    permit!()

    - -
    -

    Sets the permitted attribute to true. This can be used to pass mass assignment. Returns self.

    +
    +

    Sets the permitted attribute to true. This can be used to pass mass assignment. Returns self.

    class Person < ActiveRecord::Base
     end
    @@ -2221,8 +1954,7 @@ 

    params.permitted? # => true Person.new(params) # => #<Person id: nil, name: "Francesco">

    -
    - +
    @@ -2254,23 +1986,17 @@

    -

    - - permitted?() - -

    +

    permitted?()

    - -
    -

    Returns true if the parameter is permitted, false otherwise.

    +
    +

    Returns true if the parameter is permitted, false otherwise.

    params = ActionController::Parameters.new
     params.permitted? # => false
     params.permit!
     params.permitted? # => true
     
    -
    - +
    @@ -2295,17 +2021,11 @@

    -

    - - reject(&block) - -

    +

    reject(&block)

    - -
    -

    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.

    +
    @@ -2330,22 +2050,18 @@

    -

    - - reject!(&block) - -

    +

    reject!(&block)

    - -
    -

    Removes items that the block evaluates to true and returns self.

    -
    - +
    +

    Removes items that the block evaluates to true and returns self.

    +
    -
    - Also aliased as: delete_if -
    +

    + Also aliased as: + + delete_if. +

    @@ -2370,15 +2086,10 @@

    -

    - - require(key) - -

    +

    require(key)

    - -
    -

    This method accepts both a single key and an array of keys.

    +
    +

    This method accepts both a single key and an array of keys.

    When passed a single key, if it exists and its associated value is either present or the singleton false, returns said value:

    @@ -2427,13 +2138,14 @@

    params.expect(person: :name).require(:name) end -

    - +
    -
    - Also aliased as: required -
    +

    + Also aliased as: + + required. +

    @@ -2463,24 +2175,17 @@

    -

    - - required(key) - -

    +

    required(key)

    -
    - -
    - -
    - Alias for: require -
    +

    + Alias for: + require. +

    @@ -2488,22 +2193,18 @@

    -

    - - reverse_merge(other_hash) - -

    +

    reverse_merge(other_hash)

    - -
    -

    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.

    +
    -
    - Also aliased as: with_defaults -
    +

    + Also aliased as: + + with_defaults. +

    @@ -2529,22 +2230,18 @@

    -

    - - reverse_merge!(other_hash) - -

    +

    reverse_merge!(other_hash)

    - -
    -

    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.

    +
    -
    - Also aliased as: with_defaults! -
    +

    + Also aliased as: + + with_defaults!. +

    @@ -2569,17 +2266,11 @@

    -

    - - select(&block) - -

    +

    select(&block)

    - -
    -

    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.

    +
    @@ -2604,22 +2295,18 @@

    -

    - - select!(&block) - -

    +

    select!(&block)

    - -
    -

    Equivalent to Hash#keep_if, but returns nil if no changes were made.

    -
    - +
    +

    Equivalent to Hash#keep_if, but returns nil if no changes were made.

    +
    -
    - Also aliased as: keep_if -
    +

    + Also aliased as: + + keep_if. +

    @@ -2644,22 +2331,16 @@

    -

    - - slice(*keys) - -

    +

    slice(*keys)

    - -
    -

    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>
     params.slice(:d)     # => #<ActionController::Parameters {} permitted: false>
     
    -
    - +
    @@ -2684,17 +2365,11 @@

    -

    - - slice!(*keys) - -

    +

    slice!(*keys)

    - -
    -

    Returns the current ActionController::Parameters instance which contains only the given keys.

    -
    - +
    +

    Returns the current ActionController::Parameters instance which contains only the given keys.

    +
    @@ -2720,15 +2395,10 @@

    -

    - - to_h(&block) - -

    +

    to_h(&block)

    - -
    -

    Returns a safe ActiveSupport::HashWithIndifferentAccess representation of the parameters with all unpermitted keys removed.

    +
    +

    Returns a safe ActiveSupport::HashWithIndifferentAccess representation of the parameters with all unpermitted keys removed.

    params = ActionController::Parameters.new({
       name: "Senjougahara Hitagi",
    @@ -2740,8 +2410,7 @@ 

    safe_params = params.permit(:name) safe_params.to_h # => {"name"=>"Senjougahara Hitagi"}

    -
    - +
    @@ -2770,15 +2439,10 @@

    -

    - - to_hash() - -

    +

    to_hash()

    - -
    -

    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",
    @@ -2790,8 +2454,7 @@ 

    safe_params = params.permit(:name) safe_params.to_hash # => {"name"=>"Senjougahara Hitagi"}

    -
    - +
    @@ -2816,24 +2479,17 @@

    -

    - - to_param(*args) - -

    +

    to_param(*args)

    -
    - -
    - -
    - Alias for: to_query -
    +

    + Alias for: + to_query. +

    @@ -2841,15 +2497,10 @@

    -

    - - to_query(*args) - -

    +

    to_query(*args)

    - -
    -

    Returns a string representation of the receiver suitable for use as a URL query string:

    +
    +

    Returns a string representation of the receiver suitable for use as a URL query string:

    params = ActionController::Parameters.new({
       name: "David",
    @@ -2875,13 +2526,14 @@ 

    The string pairs "key=value" that conform the query string are sorted lexicographically in ascending order.

    -
    - +
    -
    - Also aliased as: to_param -
    +

    + Also aliased as: + + to_param. +

    @@ -2905,18 +2557,12 @@

    -

    - - to_s() - - -

    +

    to_s() +

    - -
    -

    Returns the content of the parameters as a string.

    -
    - +
    +

    Returns the content of the parameters as a string.

    +
    @@ -2941,15 +2587,10 @@

    -

    - - to_unsafe_h() - -

    +

    to_unsafe_h()

    - -
    -

    Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess representation of the parameters.

    +
    +

    Returns an unsafe, unfiltered ActiveSupport::HashWithIndifferentAccess representation of the parameters.

    params = ActionController::Parameters.new({
       name: "Senjougahara Hitagi",
    @@ -2958,13 +2599,14 @@ 

    params.to_unsafe_h # => {"name"=>"Senjougahara Hitagi", "oddity" => "Heavy stone crab"}

    -
    - +
    -
    - Also aliased as: to_unsafe_hash -
    +

    + Also aliased as: + + to_unsafe_hash. +

    @@ -2988,24 +2630,17 @@

    -

    - - to_unsafe_hash() - -

    +

    to_unsafe_hash()

    -
    - -
    - -
    - Alias for: to_unsafe_h -
    +

    + Alias for: + to_unsafe_h. +

    @@ -3013,17 +2648,11 @@

    -

    - - transform_keys(&block) - -

    +

    transform_keys(&block)

    - -
    -

    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.

    +
    @@ -3051,17 +2680,11 @@

    -

    - - transform_keys!(&block) - -

    +

    transform_keys!(&block)

    - -
    -

    Performs keys transformation and returns the altered ActionController::Parameters instance.

    -
    - +
    +

    Performs keys transformation and returns the altered ActionController::Parameters instance.

    +
    @@ -3088,22 +2711,16 @@

    -

    - - transform_values() - -

    +

    transform_values()

    - -
    -

    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 }
     # => #<ActionController::Parameters {"a"=>2, "b"=>4, "c"=>6} permitted: false>
     
    -
    - +
    @@ -3131,17 +2748,11 @@

    -

    - - transform_values!() - -

    +

    transform_values!()

    - -
    -

    Performs values transformation and returns the altered ActionController::Parameters instance.

    -
    - +
    +

    Performs values transformation and returns the altered ActionController::Parameters instance.

    +
    @@ -3168,24 +2779,17 @@

    -

    - - value?(value) - -

    +

    value?(value)

    -
    - -
    - -
    - Alias for: has_value? -
    +

    + Alias for: + has_value?. +

    @@ -3193,17 +2797,11 @@

    -

    - - values() - -

    +

    values()

    - -
    -

    Returns a new array of the values of the parameters.

    -
    - +
    +

    Returns a new array of the values of the parameters.

    +
    @@ -3228,17 +2826,11 @@

    -

    - - values_at(*keys) - -

    +

    values_at(*keys)

    - -
    -

    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.

    +
    @@ -3263,24 +2855,17 @@

    -

    - - with_defaults(other_hash) - -

    +

    with_defaults(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge -
    +

    + Alias for: + reverse_merge. +

    @@ -3288,24 +2873,17 @@

    -

    - - with_defaults!(other_hash) - -

    +

    with_defaults!(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge! -
    +

    + Alias for: + reverse_merge!. +

    @@ -3313,24 +2891,17 @@

    -

    - - without(*keys) - -

    +

    without(*keys)

    -
    - -
    - -
    - Alias for: except -
    +

    + Alias for: + except. +

    @@ -3341,17 +2912,9 @@

    Instance Protected methods

    -

    - - each_nested_attribute() - -

    +

    each_nested_attribute()

    -
    - -
    - @@ -3378,17 +2941,9 @@

    -

    - - nested_attributes?() - -

    +

    nested_attributes?()

    -
    - -
    - @@ -3413,17 +2968,11 @@

    -

    - - permit_filters(filters, on_unpermitted: nil, explicit_arrays: true) - -

    +

    permit_filters(filters, on_unpermitted: nil, explicit_arrays: true)

    - -
    -

    Filters self and optionally checks for unpermitted keys

    -
    - +
    +

    Filters self and optionally checks for unpermitted keys

    +
    diff --git a/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html b/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html index 890fc9cf76..5c5c2d79d3 100644 --- a/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html +++ b/src/classes/ActionController/ParamsWrapper/Options/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - _set_wrapper_options(options) - -

    +

    _set_wrapper_options(options)

    -
    - -
    - @@ -101,17 +93,11 @@

    -

    - - inherited(klass) - -

    +

    inherited(klass)

    - -
    -

    Sets the default wrapper key or model which will be used to determine wrapper key and attribute names. Called automatically when the module is inherited.

    -
    - +
    +

    Sets the default wrapper key or model which will be used to determine wrapper key and attribute names. Called automatically when the module is inherited.

    +
    @@ -141,15 +127,10 @@

    -

    - - wrap_parameters(name_or_model_or_options, options = {}) - -

    +

    wrap_parameters(name_or_model_or_options, options = {})

    - -
    -

    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

    @@ -178,8 +159,7 @@

  • :exclude - The list of attribute names which parameters wrapper will exclude from a nested hash.

  • -

    - +
    diff --git a/src/classes/ActionController/PermissionsPolicy/ClassMethods.html b/src/classes/ActionController/PermissionsPolicy/ClassMethods.html index 24598a86b6..e880bbbad1 100644 --- a/src/classes/ActionController/PermissionsPolicy/ClassMethods.html +++ b/src/classes/ActionController/PermissionsPolicy/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - permissions_policy(**options, &block) - -

    +

    permissions_policy(**options, &block)

    - -
    -

    Overrides parts of the globally configured Feature-Policy header:

    +
    +

    Overrides parts of the globally configured Feature-Policy header:

    class PagesController < ApplicationController
       permissions_policy do |policy|
    @@ -90,8 +85,7 @@ 

    # policy.gyroscope :none end

    -
    - +
    diff --git a/src/classes/ActionController/Railties/Helpers.html b/src/classes/ActionController/Railties/Helpers.html index 2d795a006a..04b31653a8 100644 --- a/src/classes/ActionController/Railties/Helpers.html +++ b/src/classes/ActionController/Railties/Helpers.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - inherited(klass) - -

    +

    inherited(klass)

    -
    - -
    - diff --git a/src/classes/ActionController/RateLimiting/ClassMethods.html b/src/classes/ActionController/RateLimiting/ClassMethods.html index 53a90da195..27f3ae5dc2 100644 --- a/src/classes/ActionController/RateLimiting/ClassMethods.html +++ b/src/classes/ActionController/RateLimiting/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - rate_limit(to:, within:, by: -> { request.remote_ip } - -

    +

    rate_limit(to:, within:, by: -> { request.remote_ip }

    - -
    -

    Applies a rate limit to all actions or those specified by the normal before_action filters with only: and except:.

    +
    +

    Applies a rate limit to all actions or those specified by the normal before_action filters with only: and except:.

    The maximum number of requests allowed is specified to: and constrained to the window of time given by within:.

    @@ -107,8 +102,7 @@

    rate_limit to: 10, within: 5.minutes, name: "long-term" end -

    - +
    diff --git a/src/classes/ActionController/Redirecting.html b/src/classes/ActionController/Redirecting.html index 03d9c68f9c..4c20045fac 100644 --- a/src/classes/ActionController/Redirecting.html +++ b/src/classes/ActionController/Redirecting.html @@ -114,17 +114,11 @@

    Constants

    Instance Public methods

    -

    - - redirect_back(fallback_location:, allow_other_host: _allow_other_host, **args) - -

    +

    redirect_back(fallback_location:, allow_other_host: _allow_other_host, **args)

    - -
    -

    Soft deprecated alias for redirect_back_or_to where the fallback_location location is supplied as a keyword argument instead of the first positional argument.

    -
    - +
    +

    Soft deprecated alias for redirect_back_or_to where the fallback_location location is supplied as a keyword argument instead of the first positional argument.

    +
    @@ -149,15 +143,10 @@

    -

    - - redirect_back_or_to(fallback_location, allow_other_host: _allow_other_host, **options) - -

    +

    redirect_back_or_to(fallback_location, allow_other_host: _allow_other_host, **options)

    - -
    -

    Redirects the browser to the page that issued the request (the referrer) if possible, otherwise redirects to the provided default fallback location.

    +
    +

    Redirects the browser to the page that issued the request (the referrer) if possible, otherwise redirects to the provided default fallback location.

    The referrer information is pulled from the HTTP Referer (sic) header on the request. This is an optional header and its presence on the request is subject to browser security settings and user preferences. If the request is missing this header, the fallback_location will be used.

    @@ -176,8 +165,7 @@

    Options

    All other options that can be passed to redirect_to are accepted as options, and the behavior is identical.

    -
    - +
    @@ -208,15 +196,10 @@

    Options

    -

    - - redirect_to(options = {}, response_options = {}) - -

    +

    redirect_to(options = {}, response_options = {})

    - -
    -

    Redirects the browser to the target specified in options. This parameter can be any one of:

    +
    +

    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.

    • @@ -308,8 +291,7 @@

      Path R

    • :raise - Raises an UnsafeRedirectError

    -
    - +
    @@ -346,15 +328,10 @@

    Path R

    -

    - - url_from(location) - -

    +

    url_from(location)

    - -
    -

    Verifies the passed location is an internal URL that’s safe to redirect to and returns it, or nil if not. Useful to wrap a params provided redirect URL and fall back to an alternate URL to redirect to:

    +
    +

    Verifies the passed location is an internal URL that’s safe to redirect to and returns it, or nil if not. Useful to wrap a params provided redirect URL and fall back to an alternate URL to redirect to:

    redirect_to url_from(params[:redirect_url]) || root_url
     
    @@ -374,8 +351,7 @@

    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/classes/ActionController/Redirecting/OpenRedirectError.html b/src/classes/ActionController/Redirecting/OpenRedirectError.html index c2991230d5..2148ffc5fc 100644 --- a/src/classes/ActionController/Redirecting/OpenRedirectError.html +++ b/src/classes/ActionController/Redirecting/OpenRedirectError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(location) - -

    +

    new(location)

    -
    - -
    - diff --git a/src/classes/ActionController/Redirecting/PathRelativeRedirectError.html b/src/classes/ActionController/Redirecting/PathRelativeRedirectError.html index 617d44e80b..4f66a732b5 100644 --- a/src/classes/ActionController/Redirecting/PathRelativeRedirectError.html +++ b/src/classes/ActionController/Redirecting/PathRelativeRedirectError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(url) - -

    +

    new(url)

    -
    - -
    - diff --git a/src/classes/ActionController/Renderer.html b/src/classes/ActionController/Renderer.html index 66eec5ede2..4e590318f1 100644 --- a/src/classes/ActionController/Renderer.html +++ b/src/classes/ActionController/Renderer.html @@ -152,17 +152,11 @@

    Attributes

    Class Public methods

    -

    - - for(controller, env = nil, defaults = DEFAULTS) - -

    +

    for(controller, env = nil, defaults = DEFAULTS)

    - -
    -

    Creates a new renderer using the given controller class. See ::new.

    -
    - +
    +

    Creates a new renderer using the given controller class. See ::new.

    +
    @@ -187,15 +181,10 @@

    -

    - - new(controller, env, defaults) - -

    +

    new(controller, env, defaults)

    - - @@ -255,17 +243,9 @@

    Parameter

    Instance Public methods

    -

    - - defaults() - -

    +

    defaults()

    -
    - -
    - @@ -291,20 +271,14 @@

    -

    - - new(env = nil) - -

    +

    new(env = nil)

    - -
    -

    Creates a new renderer using the same controller, but with a new Rack env.

    +
    +

    Creates a new renderer using the same controller, but with a new Rack env.

    ApplicationController.renderer.new(method: "post")
     
    -
    - +
    @@ -329,17 +303,11 @@

    -

    - - with_defaults(defaults) - -

    +

    with_defaults(defaults)

    - -
    -

    Creates a new renderer using the same controller, but with the given defaults merged on top of the previous defaults.

    -
    - +
    +

    Creates a new renderer using the same controller, but with the given defaults merged on top of the previous defaults.

    +
    diff --git a/src/classes/ActionController/Renderers.html b/src/classes/ActionController/Renderers.html index 61b14ee2ad..1fc4bb9bd6 100644 --- a/src/classes/ActionController/Renderers.html +++ b/src/classes/ActionController/Renderers.html @@ -98,15 +98,10 @@

    Constants

    Class Public methods

    -

    - - add(key, &block) - -

    +

    add(key, &block)

    - -
    -

    Adds a new renderer to call within controller actions. A renderer is invoked by passing its name as an option to AbstractController::Rendering#render. To create a renderer pass it a name and a block. The block takes two arguments, the first is the value paired with its key and the second is the remaining hash of options passed to render.

    +
    +

    Adds a new renderer to call within controller actions. A renderer is invoked by passing its name as an option to AbstractController::Rendering#render. To create a renderer pass it a name and a block. The block takes two arguments, the first is the value paired with its key and the second is the remaining hash of options passed to render.

    Create a csv renderer:

    @@ -130,8 +125,7 @@

    end end -

    - +
    @@ -157,22 +151,16 @@

    -

    - - remove(key) - -

    +

    remove(key)

    - -
    -

    This method is the opposite of add method.

    +
    +

    This method is the opposite of add method.

    To remove a csv renderer:

    ActionController::Renderers.remove(:csv)
     
    -
    - +
    @@ -203,19 +191,13 @@

    Instance Public methods

    -

    - - render_to_body(options) - -

    +

    render_to_body(options)

    - -
    -

    Called by render in AbstractController::Rendering which sets the return value as the response_body.

    +
    +

    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.

    -
    - +
    diff --git a/src/classes/ActionController/Renderers/ClassMethods.html b/src/classes/ActionController/Renderers/ClassMethods.html index 0815a642f9..f89b1b98b8 100644 --- a/src/classes/ActionController/Renderers/ClassMethods.html +++ b/src/classes/ActionController/Renderers/ClassMethods.html @@ -62,24 +62,17 @@

    Methods

    Instance Public methods

    -

    - - use_renderer(*args) - -

    +

    use_renderer(*args)

    -
    - -
    - -
    - Alias for: use_renderers -
    +

    + Alias for: + use_renderers. +

    @@ -87,15 +80,10 @@

    -

    - - use_renderers(*args) - -

    +

    use_renderers(*args)

    - -
    -

    Adds, by name, a renderer or renderers to the _renderers available to call within controller actions.

    +
    +

    Adds, by name, a renderer or renderers to the _renderers available to call within controller actions.

    It is useful when rendering from an ActionController::Metal controller or otherwise to add an available renderer proc to a specific controller.

    @@ -119,13 +107,14 @@

    You must specify a use_renderer, else the controller.renderer and controller._renderers will be nil, and the action will fail.

    -

    - +
    -
    - Also aliased as: use_renderer -
    +

    + Also aliased as: + + use_renderer. +

    diff --git a/src/classes/ActionController/Rendering.html b/src/classes/ActionController/Rendering.html index e6f1ef21fa..a99f32bb3e 100644 --- a/src/classes/ActionController/Rendering.html +++ b/src/classes/ActionController/Rendering.html @@ -88,15 +88,10 @@

    Constants

    Instance Public methods

    -

    - - render(*args) - -

    +

    render(*args)

    - -
    -

    Renders a template and assigns the result to self.response_body.

    +
    +

    Renders a template and assigns the result to self.response_body.

    If no rendering mode option is specified, the template will be derived from the first argument.

    @@ -249,8 +244,7 @@

    Options

        render "posts/index", variants: [:mobile]
         # => renders app/views/posts/index.html+mobile.erb
     
    -
    - +
    @@ -276,17 +270,11 @@

    Options

    -

    - - render_to_string(*) - -

    +

    render_to_string(*)

    - -
    -

    Similar to render, but only returns the rendered template as a string, instead of setting self.response_body.

    -
    - +
    +

    Similar to render, but only returns the rendered template as a string, instead of setting self.response_body.

    +
    diff --git a/src/classes/ActionController/Rendering/ClassMethods.html b/src/classes/ActionController/Rendering/ClassMethods.html index 35c51b23a4..f595af50b0 100644 --- a/src/classes/ActionController/Rendering/ClassMethods.html +++ b/src/classes/ActionController/Rendering/ClassMethods.html @@ -72,17 +72,9 @@

    Attributes

    Instance Public methods

    -

    - - inherited(klass) - -

    +

    inherited(klass)

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection.html b/src/classes/ActionController/RequestForgeryProtection.html index b0f45ce91b..61c15b31cf 100644 --- a/src/classes/ActionController/RequestForgeryProtection.html +++ b/src/classes/ActionController/RequestForgeryProtection.html @@ -250,17 +250,9 @@

    Constants

    Class Public methods

    -

    - - new(...) - -

    +

    new(...)

    -
    - -
    - @@ -290,17 +282,9 @@

    Instance Public methods

    -

    - - commit_csrf_token(request) - -

    +

    commit_csrf_token(request)

    -
    - -
    - @@ -326,17 +310,9 @@

    -

    - - reset_csrf_token(request) - -

    +

    reset_csrf_token(request)

    -
    - -
    - @@ -365,17 +341,11 @@

    Instance Private methods

    -

    - - any_authenticity_token_valid?() - -

    +

    any_authenticity_token_valid?()

    - -
    -

    Checks if any of the authenticity tokens from the request are valid.

    -
    - +
    +

    Checks if any of the authenticity tokens from the request are valid.

    +
    @@ -402,17 +372,9 @@

    -

    - - compare_with_global_token(token, session = nil) - -

    +

    compare_with_global_token(token, session = nil)

    -
    - -
    - @@ -437,17 +399,9 @@

    -

    - - compare_with_real_token(token, session = nil) - -

    +

    compare_with_real_token(token, session = nil)

    -
    - -
    - @@ -472,17 +426,9 @@

    -

    - - csrf_token_hmac(session, identifier) - -

    +

    csrf_token_hmac(session, identifier)

    -
    - -
    - @@ -511,17 +457,11 @@

    -

    - - form_authenticity_param() - -

    +

    form_authenticity_param()

    - -
    -

    The form’s authenticity parameter. Override to provide your own.

    -
    - +
    +

    The form’s authenticity parameter. Override to provide your own.

    +
    @@ -546,17 +486,11 @@

    -

    - - form_authenticity_token(form_options: {}) - -

    +

    form_authenticity_token(form_options: {})

    - -
    -

    Creates the authenticity token for the current request.

    -
    - +
    +

    Creates the authenticity token for the current request.

    +
    @@ -581,17 +515,9 @@

    -

    - - global_csrf_token(session = nil) - -

    +

    global_csrf_token(session = nil)

    -
    - -
    - @@ -616,17 +542,11 @@

    -

    - - mark_for_same_origin_verification!() - -

    +

    mark_for_same_origin_verification!()

    - -
    -

    GET requests are checked for cross-origin JavaScript after rendering.

    -
    - +
    +

    GET requests are checked for cross-origin JavaScript after rendering.

    +
    @@ -651,17 +571,11 @@

    -

    - - marked_for_same_origin_verification?() - -

    +

    marked_for_same_origin_verification?()

    - -
    -

    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.

    +
    @@ -686,17 +600,9 @@

    -

    - - mask_token(raw_token) - -

    +

    mask_token(raw_token)

    -
    - -
    - @@ -724,17 +630,11 @@

    -

    - - non_xhr_javascript_response?() - -

    +

    non_xhr_javascript_response?()

    - -
    -

    Check for cross-origin JavaScript responses.

    -
    - +
    +

    Check for cross-origin JavaScript responses.

    +
    @@ -759,17 +659,9 @@

    -

    - - per_form_csrf_token(session, action_path, method) - -

    +

    per_form_csrf_token(session, action_path, method)

    -
    - -
    - @@ -794,17 +686,11 @@

    -

    - - protect_against_forgery?() - -

    +

    protect_against_forgery?()

    - -
    -

    Checks if the controller allows forgery protection.

    -
    - +
    +

    Checks if the controller allows forgery protection.

    +
    @@ -829,17 +715,9 @@

    -

    - - real_csrf_token(_session = nil) - -

    +

    real_csrf_token(_session = nil)

    -
    - -
    - @@ -868,17 +746,11 @@

    -

    - - request_authenticity_tokens() - -

    +

    request_authenticity_tokens()

    - -
    -

    Possible authenticity tokens sent in the request.

    -
    - +
    +

    Possible authenticity tokens sent in the request.

    +
    @@ -903,17 +775,9 @@

    -

    - - unmask_token(masked_token) - -

    +

    unmask_token(masked_token)

    -
    - -
    - @@ -941,17 +805,11 @@

    -

    - - valid_authenticity_token?(session, encoded_masked_token) - -

    +

    valid_authenticity_token?(session, encoded_masked_token)

    - -
    -

    Checks the client’s masked token to see if it matches the session token. Essentially the inverse of masked_authenticity_token.

    -
    - +
    +

    Checks the client’s masked token to see if it matches the session token. Essentially the inverse of masked_authenticity_token.

    +
    @@ -1002,17 +860,9 @@

    -

    - - valid_per_form_csrf_token?(token, session = nil) - -

    +

    valid_per_form_csrf_token?(token, session = nil)

    -
    - -
    - @@ -1047,17 +897,11 @@

    -

    - - valid_request_origin?() - -

    +

    valid_request_origin?()

    - -
    -

    Checks if the request originated from the same origin by looking at the Origin header.

    -
    - +
    +

    Checks if the request originated from the same origin by looking at the Origin header.

    +
    @@ -1088,15 +932,10 @@

    -

    - - verified_request?() - -

    +

    verified_request?()

    - -
    -

    Returns true or false if a request is verified. Checks:

    +
    +

    Returns true or false if a request is verified. Checks:

    • Is it a GET or HEAD request? GETs should be safe and idempotent

    • @@ -1104,8 +943,7 @@

    • Does the X-CSRF-Token header match the form_authenticity_token?

    -
    - +
    @@ -1131,19 +969,13 @@

    -

    - - verify_authenticity_token() - -

    +

    verify_authenticity_token()

    - -
    -

    The actual before_action that is used to verify the CSRF token. Don’t override this directly. Provide your own forgery protection strategy instead. If you override, you’ll disable same-origin <script> verification.

    +
    +

    The actual before_action that is used to verify the CSRF token. Don’t override this directly. Provide your own forgery protection strategy instead. If you override, you’ll disable same-origin <script> verification.

    Lean on the protect_from_forgery declaration to mark which actions are due for same-origin request verification. If protect_from_forgery is enabled on an action, this before_action flags its after_action to verify that JavaScript responses are for XHR requests, ensuring they follow the browser’s same-origin policy.

    -
    - +
    @@ -1174,17 +1006,11 @@

    -

    - - verify_same_origin_request() - -

    +

    verify_same_origin_request()

    - -
    -

    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.

    +
    @@ -1214,17 +1040,9 @@

    -

    - - xor_byte_strings(s1, s2) - -

    +

    xor_byte_strings(s1, s2)

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html b/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html index 79f799f60b..220ca70710 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html +++ b/src/classes/ActionController/RequestForgeryProtection/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - protect_from_forgery(options = {}) - -

    +

    protect_from_forgery(options = {})

    - -
    -

    Turn on request forgery protection. Bear in mind that GET and HEAD requests are not checked.

    +
    +

    Turn on request forgery protection. Bear in mind that GET and HEAD requests are not checked.

    class ApplicationController < ActionController::Base
       protect_from_forgery
    @@ -157,8 +152,7 @@ 

    protect_from_forgery store: CustomStore.new end

    -
    - +
    @@ -191,22 +185,16 @@

    -

    - - skip_forgery_protection(options = {}) - -

    +

    skip_forgery_protection(options = {})

    - -
    -

    Turn off request forgery protection. This is a wrapper for:

    +
    +

    Turn off request forgery protection. This is a wrapper for:

    skip_before_action :verify_authenticity_token
     

    See skip_before_action for allowed options.

    -
    - +
    diff --git a/src/classes/ActionController/RequestForgeryProtection/CookieStore.html b/src/classes/ActionController/RequestForgeryProtection/CookieStore.html index 4b0c66f056..0378d9b528 100644 --- a/src/classes/ActionController/RequestForgeryProtection/CookieStore.html +++ b/src/classes/ActionController/RequestForgeryProtection/CookieStore.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(cookie = :csrf_token) - -

    +

    new(cookie = :csrf_token)

    -
    - -
    - @@ -114,17 +106,9 @@

    Instance Public methods

    -

    - - fetch(request) - -

    +

    fetch(request)

    -
    - -
    - @@ -157,17 +141,9 @@

    -

    - - reset(request) - -

    +

    reset(request)

    -
    - -
    - @@ -192,17 +168,9 @@

    -

    - - store(request, csrf_token) - -

    +

    store(request, csrf_token)

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html index e69924c312..99c898fd65 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/Exception.html @@ -81,17 +81,9 @@

    Attributes

    Class Public methods

    -

    - - new(controller) - -

    +

    new(controller)

    -
    - -
    - @@ -120,17 +112,9 @@

    Instance Public methods

    -

    - - handle_unverified_request() - -

    +

    handle_unverified_request()

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html index e750eada13..dd724c2f6b 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession.html @@ -82,17 +82,9 @@

    Methods

    Class Public methods

    -

    - - new(controller) - -

    +

    new(controller)

    -
    - -
    - @@ -121,17 +113,11 @@

    Instance Public methods

    -

    - - handle_unverified_request() - -

    +

    handle_unverified_request()

    - -
    -

    This is the method that defines the application behavior when a request is found to be unverified.

    -
    - +
    +

    This is the method that defines the application behavior when a request is found to be unverified.

    +
    diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullCookieJar.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullCookieJar.html index 5ca9bc67fd..7000ef2289 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullCookieJar.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullCookieJar.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - write(*) - -

    +

    write(*)

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullSessionHash.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullSessionHash.html index 3af8d7e1cf..9096a843e1 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullSessionHash.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/NullSession/NullSessionHash.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(req) - -

    +

    new(req)

    -
    - -
    - @@ -116,17 +108,11 @@

    Instance Public methods

    -

    - - destroy() - -

    +

    destroy()

    - -
    -

    no-op

    -
    - +
    +

    no-op

    +
    @@ -149,17 +135,9 @@

    -

    - - enabled?() - -

    +

    enabled?()

    -
    - -
    - @@ -184,17 +162,9 @@

    -

    - - exists?() - -

    +

    exists?()

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html index 57f1c2d62c..2f8cfe3764 100644 --- a/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html +++ b/src/classes/ActionController/RequestForgeryProtection/ProtectionMethods/ResetSession.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(controller) - -

    +

    new(controller)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - handle_unverified_request() - -

    +

    handle_unverified_request()

    -
    - -
    - diff --git a/src/classes/ActionController/RequestForgeryProtection/SessionStore.html b/src/classes/ActionController/RequestForgeryProtection/SessionStore.html index 5d94db2741..6d0c60e86d 100644 --- a/src/classes/ActionController/RequestForgeryProtection/SessionStore.html +++ b/src/classes/ActionController/RequestForgeryProtection/SessionStore.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - fetch(request) - -

    +

    fetch(request)

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - reset(request) - -

    +

    reset(request)

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - store(request, csrf_token) - -

    +

    store(request, csrf_token)

    -
    - -
    - diff --git a/src/classes/ActionController/Rescue.html b/src/classes/ActionController/Rescue.html index 5a8031f9e0..9fc13a955e 100644 --- a/src/classes/ActionController/Rescue.html +++ b/src/classes/ActionController/Rescue.html @@ -93,17 +93,11 @@

    Included Modules

    Instance Public methods

    -

    - - show_detailed_exceptions?() - -

    +

    show_detailed_exceptions?()

    - -
    -

    Override this method if you want to customize when detailed exceptions must be shown. This method is only called when consider_all_requests_local is false. By default, it returns false, but someone may set it to request.local? so local requests in production still show the detailed exception pages.

    -
    - +
    +

    Override this method if you want to customize when detailed exceptions must be shown. This method is only called when consider_all_requests_local is false. By default, it returns false, but someone may set it to request.local? so local requests in production still show the detailed exception pages.

    +
    diff --git a/src/classes/ActionController/RespondToMismatchError.html b/src/classes/ActionController/RespondToMismatchError.html index 6f7c4c0c27..72a5b92e49 100644 --- a/src/classes/ActionController/RespondToMismatchError.html +++ b/src/classes/ActionController/RespondToMismatchError.html @@ -91,17 +91,9 @@

    Constants

    Class Public methods

    -

    - - new(message = nil) - -

    +

    new(message = nil)

    -
    - -
    - diff --git a/src/classes/ActionController/StrongParameters.html b/src/classes/ActionController/StrongParameters.html index e2dcbadea4..e31d3ec2fd 100644 --- a/src/classes/ActionController/StrongParameters.html +++ b/src/classes/ActionController/StrongParameters.html @@ -129,17 +129,11 @@

    Methods

    Instance Public methods

    -

    - - params() - -

    +

    params()

    - -
    -

    Returns a new ActionController::Parameters object that has been instantiated with the request.parameters.

    -
    - +
    +

    Returns a new ActionController::Parameters object that has been instantiated with the request.parameters.

    +
    @@ -172,17 +166,11 @@

    -

    - - params=(value) - -

    +

    params=(value)

    - -
    -

    Assigns the given value to the params hash. If value is a Hash, this will create an ActionController::Parameters object that has been instantiated with the given value hash.

    -
    - +
    +

    Assigns the given value to the params hash. If value is a Hash, this will create an ActionController::Parameters object that has been instantiated with the given value hash.

    +
    diff --git a/src/classes/ActionController/TestCase/Behavior.html b/src/classes/ActionController/TestCase/Behavior.html index 706651aafb..0397e83b06 100644 --- a/src/classes/ActionController/TestCase/Behavior.html +++ b/src/classes/ActionController/TestCase/Behavior.html @@ -173,17 +173,9 @@

    Attributes

    Instance Public methods

    -

    - - build_response(klass) - -

    +

    build_response(klass)

    -
    - -
    - @@ -208,17 +200,9 @@

    -

    - - controller_class_name() - -

    +

    controller_class_name()

    -
    - -
    - @@ -243,17 +227,11 @@

    -

    - - delete(action, **args) - -

    +

    delete(action, **args)

    - -
    -

    Simulate a DELETE request with the given parameters and set/volley the response. See get for more details.

    -
    - +
    +

    Simulate a DELETE request with the given parameters and set/volley the response. See get for more details.

    +
    @@ -278,17 +256,9 @@

    -

    - - generated_path(generated_extras) - -

    +

    generated_path(generated_extras)

    -
    - -
    - @@ -313,15 +283,10 @@

    -

    - - get(action, **args) - -

    +

    get(action, **args)

    - -
    -

    Simulate a GET request with the given parameters.

    +
    +

    Simulate a GET request with the given parameters.

    • action: The controller action to call.

    • @@ -343,8 +308,7 @@

      Note that the request method is not verified. The different methods are available to make the tests more expressive.

      -

    - +
    @@ -369,17 +333,11 @@

    -

    - - head(action, **args) - -

    +

    head(action, **args)

    - -
    -

    Simulate a HEAD request with the given parameters and set/volley the response. See get for more details.

    -
    - +
    +

    Simulate a HEAD request with the given parameters and set/volley the response. See get for more details.

    +
    @@ -404,17 +362,11 @@

    -

    - - patch(action, **args) - -

    +

    patch(action, **args)

    - -
    -

    Simulate a PATCH request with the given parameters and set/volley the response. See get for more details.

    -
    - +
    +

    Simulate a PATCH request with the given parameters and set/volley the response. See get for more details.

    +
    @@ -439,17 +391,11 @@

    -

    - - post(action, **args) - -

    +

    post(action, **args)

    - -
    -

    Simulate a POST request with the given parameters and set/volley the response. See get for more details.

    -
    - +
    +

    Simulate a POST request with the given parameters and set/volley the response. See get for more details.

    +
    @@ -474,15 +420,10 @@

    -

    - - process(action, method: "GET", params: nil, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil) - -

    +

    process(action, method: "GET", params: nil, session: nil, body: nil, flash: {}, format: nil, xhr: false, as: nil)

    - -
    -

    Simulate an HTTP request to action by specifying request method, parameters and set/volley the response.

    +
    +

    Simulate an HTTP request to action by specifying request method, parameters and set/volley the response.

    • action: The controller action to call.

    • @@ -517,8 +458,7 @@

      It’s not recommended to make more than one request in the same test. Instance variables that are set in one request will not persist to the next request, but it’s not guaranteed that all Rails internal state will be reset. Prefer ActionDispatch::IntegrationTest for making multiple requests in the same test.

      Note that the request method is not verified.

      -

    - +
    @@ -579,17 +519,11 @@

    -

    - - put(action, **args) - -

    +

    put(action, **args)

    - -
    -

    Simulate a PUT request with the given parameters and set/volley the response. See get for more details.

    -
    - +
    +

    Simulate a PUT request with the given parameters and set/volley the response. See get for more details.

    +
    @@ -614,17 +548,9 @@

    -

    - - query_parameter_names(generated_extras) - -

    +

    query_parameter_names(generated_extras)

    -
    - -
    - @@ -649,17 +575,9 @@

    -

    - - setup_controller_request_and_response() - -

    +

    setup_controller_request_and_response()

    -
    - -
    - diff --git a/src/classes/ActionController/TestCase/Behavior/ClassMethods.html b/src/classes/ActionController/TestCase/Behavior/ClassMethods.html index d3aeb92c5c..9a3ddb8254 100644 --- a/src/classes/ActionController/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionController/TestCase/Behavior/ClassMethods.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - controller_class() - -

    +

    controller_class()

    -
    - -
    - @@ -109,17 +101,9 @@

    -

    - - controller_class=(new_class) - -

    +

    controller_class=(new_class)

    -
    - -
    - @@ -144,17 +128,9 @@

    -

    - - determine_default_controller_class(name) - -

    +

    determine_default_controller_class(name)

    -
    - -
    - @@ -181,22 +157,16 @@

    -

    - - tests(controller_class) - -

    +

    tests(controller_class)

    - -
    -

    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
     tests 'widget'
     
    -
    - +
    diff --git a/src/classes/ActionController/UrlFor.html b/src/classes/ActionController/UrlFor.html index a2eb3dba2b..e74c7bf818 100644 --- a/src/classes/ActionController/UrlFor.html +++ b/src/classes/ActionController/UrlFor.html @@ -98,17 +98,9 @@

    Included Modules

    Class Public methods

    -

    - - new(...) - -

    +

    new(...)

    -
    - -
    - @@ -138,17 +130,9 @@

    Instance Public methods

    -

    - - url_options() - -

    +

    url_options()

    -
    - -
    - diff --git a/src/classes/ActionDispatch.html b/src/classes/ActionDispatch.html index 4e1153729b..c9deadc1fe 100644 --- a/src/classes/ActionDispatch.html +++ b/src/classes/ActionDispatch.html @@ -403,20 +403,14 @@

    Included Modules

    Class Public methods

    -

    - - unknown - -

    +

    unknown

    - -
    -

    Specifies if the methods calling redirects in controllers and routes should

    +
    +

    Specifies if the methods calling redirects in controllers and routes should

    be logged below their relevant log lines. Defaults to false.
     
    -
    - +
    @@ -444,17 +438,9 @@

    Instance Public methods

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/AssertionResponse.html b/src/classes/ActionDispatch/AssertionResponse.html index add0397b3a..c69d0a777d 100644 --- a/src/classes/ActionDispatch/AssertionResponse.html +++ b/src/classes/ActionDispatch/AssertionResponse.html @@ -95,17 +95,11 @@

    Attributes

    Class Public methods

    -

    - - new(code_or_name) - -

    +

    new(code_or_name)

    - -
    -

    Accepts a specific response status code as an Integer (404) or String (‘404’) or a response status range as a Symbol pseudo-code (:success, indicating any 200-299 status code).

    -
    - +
    +

    Accepts a specific response status code as an Integer (404) or String (‘404’) or a response status range as a Symbol pseudo-code (:success, indicating any 200-299 status code).

    +
    @@ -143,17 +137,9 @@

    Instance Public methods

    -

    - - code_and_name() - -

    +

    code_and_name()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Assertions.html b/src/classes/ActionDispatch/Assertions.html index c71c709efc..d7764a5a11 100644 --- a/src/classes/ActionDispatch/Assertions.html +++ b/src/classes/ActionDispatch/Assertions.html @@ -105,17 +105,9 @@

    Included Modules

    Instance Public methods

    -

    - - html_document() - -

    +

    html_document()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Assertions/ResponseAssertions.html b/src/classes/ActionDispatch/Assertions/ResponseAssertions.html index d3431041dc..08d16d159e 100644 --- a/src/classes/ActionDispatch/Assertions/ResponseAssertions.html +++ b/src/classes/ActionDispatch/Assertions/ResponseAssertions.html @@ -76,20 +76,14 @@

    Methods

    Instance Public methods

    -

    - - assert_in_body(text) - -

    +

    assert_in_body(text)

    - -
    -

    Asserts that the given text is present somewhere in the response body.

    +
    +

    Asserts that the given text is present somewhere in the response body.

    assert_in_body fixture(:name).description
     
    -
    - +
    @@ -114,20 +108,14 @@

    -

    - - assert_not_in_body(text) - -

    +

    assert_not_in_body(text)

    - -
    -

    Asserts that the given text is not present anywhere in the response body.

    +
    +

    Asserts that the given text is not present anywhere in the response body.

    assert_not_in_body fixture(:name).description
     
    -
    - +
    @@ -152,15 +140,10 @@

    -

    - - assert_redirected_to(url_options = {}, options = {}, message = nil) - -

    +

    assert_redirected_to(url_options = {}, options = {}, message = nil)

    - -
    -

    Asserts that the response is a redirect to a URL matching the given options.

    +
    +

    Asserts that the response is a redirect to a URL matching the given options.

    # Asserts that the redirection was to the "index" action on the WeblogController
     assert_redirected_to controller: "weblog", action: "index"
    @@ -178,8 +161,7 @@ 

    # Permanently). assert_redirected_to "/some/path", status: :moved_permanently

    -
    - +
    @@ -214,15 +196,10 @@

    -

    - - assert_response(type, message = nil) - -

    +

    assert_response(type, message = nil)

    - -
    -

    Asserts that the response is one of the following types:

    +
    +

    Asserts that the response is one of the following types:

    • :success - Status code was in the 200-299 range

    • @@ -241,8 +218,7 @@

      # Asserts that the response code was status code 401 (unauthorized) assert_response 401 -

    - +
    diff --git a/src/classes/ActionDispatch/Assertions/RoutingAssertions.html b/src/classes/ActionDispatch/Assertions/RoutingAssertions.html index cd11898aa6..6d16192a5c 100644 --- a/src/classes/ActionDispatch/Assertions/RoutingAssertions.html +++ b/src/classes/ActionDispatch/Assertions/RoutingAssertions.html @@ -95,15 +95,10 @@

    Methods

    Instance Public methods

    -

    - - assert_generates(expected_path, options, defaults = {}, extras = {}, message = nil) - -

    +

    assert_generates(expected_path, options, defaults = {}, extras = {}, message = nil)

    - -
    -

    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.

    @@ -119,8 +114,7 @@

    # Asserts that the generated route gives us our custom route assert_generates "changesets/12", { controller: 'scm', action: 'show_diff', revision: "12" } -

    - +
    @@ -163,15 +157,10 @@

    -

    - - assert_recognizes(expected_options, path, extras = {}, msg = nil) - -

    +

    assert_recognizes(expected_options, path, extras = {}, msg = nil)

    - -
    -

    Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.

    +
    +

    Asserts that the routing of the given path was handled correctly and that the parsed options (given in the expected_options hash) match path. Basically, it asserts that Rails recognizes the route given by expected_options.

    Pass a hash in the second argument (path) to specify the request method. This is useful for routes requiring a specific HTTP method. The hash should contain a :path with the incoming request path and a :method containing the required HTTP verb.

    @@ -199,8 +188,7 @@

    # Test a custom route assert_recognizes({controller: 'items', action: 'show', id: '1'}, 'view/item1') -

    - +
    @@ -242,15 +230,10 @@

    -

    - - assert_routing(path, options, defaults = {}, extras = {}, message = nil) - -

    +

    assert_routing(path, options, defaults = {}, extras = {}, message = nil)

    - -
    -

    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.

    @@ -269,8 +252,7 @@

    # Tests a route with an HTTP method assert_routing({ method: 'put', path: '/product/321' }, { controller: "product", action: "update", id: "321" }) -

    - +
    @@ -303,17 +285,11 @@

    -

    - - method_missing(selector, ...) - -

    +

    method_missing(selector, ...)

    - -
    -

    ROUTES TODO: These assertions should really work in an integration context

    -
    - +
    +

    ROUTES TODO: These assertions should really work in an integration context

    +
    @@ -342,15 +318,10 @@

    -

    - - with_routing(config = nil, &block) - -

    +

    with_routing(config = nil, &block)

    - -
    -

    A helper to make it easier to test different route configurations. This method temporarily replaces @routes with a new RouteSet instance.

    +
    +

    A helper to make it easier to test different route configurations. This method temporarily replaces @routes with a new RouteSet instance.

    The new instance is yielded to the passed block. Typically the block will create some routes using set.draw { match ... }:

    @@ -361,8 +332,7 @@

    assert_equal "/users", users_path end -

    - +
    diff --git a/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html b/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html index 5adfba8b3a..282dea51b3 100644 --- a/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html +++ b/src/classes/ActionDispatch/Assertions/RoutingAssertions/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - with_routing(&block) - -

    +

    with_routing(&block)

    - -
    -

    A helper to make it easier to test different route configurations. This method temporarily replaces @routes with a new RouteSet instance before each test.

    +
    +

    A helper to make it easier to test different route configurations. This method temporarily replaces @routes with a new RouteSet instance before each test.

    The new instance is yielded to the passed block. Typically the block will create some routes using set.draw { match ... }:

    @@ -76,8 +71,7 @@

    end end -

    - +
    diff --git a/src/classes/ActionDispatch/Assertions/RoutingAssertions/WithIntegrationRouting/ClassMethods.html b/src/classes/ActionDispatch/Assertions/RoutingAssertions/WithIntegrationRouting/ClassMethods.html index 00294f018d..cb534ffb45 100644 --- a/src/classes/ActionDispatch/Assertions/RoutingAssertions/WithIntegrationRouting/ClassMethods.html +++ b/src/classes/ActionDispatch/Assertions/RoutingAssertions/WithIntegrationRouting/ClassMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - with_routing(&block) - -

    +

    with_routing(&block)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/AssumeSSL.html b/src/classes/ActionDispatch/AssumeSSL.html index 04ac3c3b46..e6a33538bb 100644 --- a/src/classes/ActionDispatch/AssumeSSL.html +++ b/src/classes/ActionDispatch/AssumeSSL.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -114,17 +106,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Callbacks.html b/src/classes/ActionDispatch/Callbacks.html index 60b700ddc7..5e4ed82e6b 100644 --- a/src/classes/ActionDispatch/Callbacks.html +++ b/src/classes/ActionDispatch/Callbacks.html @@ -97,17 +97,9 @@

    Included Modules

    Class Public methods

    -

    - - after(*args, &block) - -

    +

    after(*args, &block)

    -
    - -
    - @@ -132,17 +124,9 @@

    -

    - - before(*args, &block) - -

    +

    before(*args, &block)

    -
    - -
    - @@ -167,17 +151,9 @@

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -206,17 +182,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ContentSecurityPolicy.html b/src/classes/ActionDispatch/ContentSecurityPolicy.html index 9bcf251b21..82eca9a108 100644 --- a/src/classes/ActionDispatch/ContentSecurityPolicy.html +++ b/src/classes/ActionDispatch/ContentSecurityPolicy.html @@ -169,17 +169,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -209,15 +201,10 @@

    Instance Public methods

    -

    - - block_all_mixed_content(enabled = true) - -

    +

    block_all_mixed_content(enabled = true)

    - -
    -

    Specify whether to prevent the user agent from loading any assets over HTTP when the page uses HTTPS:

    +
    +

    Specify whether to prevent the user agent from loading any assets over HTTP when the page uses HTTPS:

    policy.block_all_mixed_content
     
    @@ -226,8 +213,7 @@

    policy.block_all_mixed_content false
     
    -

    - +
    @@ -256,17 +242,9 @@

    -

    - - build(context = nil, nonce = nil, nonce_directives = nil) - -

    +

    build(context = nil, nonce = nil, nonce_directives = nil)

    -
    - -
    - @@ -292,17 +270,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -327,15 +297,10 @@

    -

    - - plugin_types(*types) - -

    +

    plugin_types(*types)

    - -
    -

    Restricts the set of plugins that can be embedded:

    +
    +

    Restricts the set of plugins that can be embedded:

    policy.plugin_types "application/x-shockwave-flash"
     
    @@ -344,8 +309,7 @@

    policy.plugin_types
     
    -

    - +
    @@ -374,20 +338,14 @@

    -

    - - report_uri(uri) - -

    +

    report_uri(uri)

    - -
    -

    Enable the report-uri directive. Violation reports will be sent to the specified URI:

    +
    +

    Enable the report-uri directive. Violation reports will be sent to the specified URI:

    policy.report_uri "/csp-violation-report-endpoint"
     
    -
    - +
    @@ -412,15 +370,10 @@

    -

    - - require_sri_for(*types) - -

    +

    require_sri_for(*types)

    - -
    -

    Specify asset types for which Subresource Integrity is required:

    +
    +

    Specify asset types for which Subresource Integrity is required:

    policy.require_sri_for :script, :style
     
    @@ -429,8 +382,7 @@

    policy.require_sri_for
     
    -

    - +
    @@ -459,15 +411,10 @@

    -

    - - sandbox(*values) - -

    +

    sandbox(*values)

    - -
    -

    Specify whether a sandbox should be enabled for the requested resource:

    +
    +

    Specify whether a sandbox should be enabled for the requested resource:

    policy.sandbox
     
    @@ -481,8 +428,7 @@

    policy.sandbox false
     
    -

    - +
    @@ -513,15 +459,10 @@

    -

    - - upgrade_insecure_requests(enabled = true) - -

    +

    upgrade_insecure_requests(enabled = true)

    - -
    -

    Specify whether user agents should treat any assets over HTTP as HTTPS:

    +
    +

    Specify whether user agents should treat any assets over HTTP as HTTPS:

    policy.upgrade_insecure_requests
     
    @@ -530,8 +471,7 @@

    policy.upgrade_insecure_requests false
     
    -

    - +
    diff --git a/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html b/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html index 1bd7c0c235..054c64c973 100644 --- a/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html +++ b/src/classes/ActionDispatch/ContentSecurityPolicy/Middleware.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html b/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html index d6c4e5e35e..09d34b0124 100644 --- a/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html +++ b/src/classes/ActionDispatch/ContentSecurityPolicy/Request.html @@ -131,17 +131,9 @@

    Constants

    Instance Public methods

    -

    - - content_security_policy() - -

    +

    content_security_policy()

    -
    - -
    - @@ -166,17 +158,9 @@

    -

    - - content_security_policy=(policy) - -

    +

    content_security_policy=(policy)

    -
    - -
    - @@ -201,17 +185,9 @@

    -

    - - content_security_policy_nonce() - -

    +

    content_security_policy_nonce()

    -
    - -
    - @@ -242,17 +218,9 @@

    -

    - - content_security_policy_nonce_directives() - -

    +

    content_security_policy_nonce_directives()

    -
    - -
    - @@ -277,17 +245,9 @@

    -

    - - content_security_policy_nonce_directives=(generator) - -

    +

    content_security_policy_nonce_directives=(generator)

    -
    - -
    - @@ -312,17 +272,9 @@

    -

    - - content_security_policy_nonce_generator() - -

    +

    content_security_policy_nonce_generator()

    -
    - -
    - @@ -347,17 +299,9 @@

    -

    - - content_security_policy_nonce_generator=(generator) - -

    +

    content_security_policy_nonce_generator=(generator)

    -
    - -
    - @@ -382,17 +326,9 @@

    -

    - - content_security_policy_report_only() - -

    +

    content_security_policy_report_only()

    -
    - -
    - @@ -417,17 +353,9 @@

    -

    - - content_security_policy_report_only=(value) - -

    +

    content_security_policy_report_only=(value)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Cookies.html b/src/classes/ActionDispatch/Cookies.html index d88399f741..1c1a536fbf 100644 --- a/src/classes/ActionDispatch/Cookies.html +++ b/src/classes/ActionDispatch/Cookies.html @@ -313,17 +313,9 @@

    Constants

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -352,17 +344,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html b/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html index 8bb7e230e4..2600c8365a 100644 --- a/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html +++ b/src/classes/ActionDispatch/Cookies/ChainedCookieJars.html @@ -76,15 +76,10 @@

    Methods

    Instance Public methods

    -

    - - encrypted() - -

    +

    encrypted()

    - -
    -

    Returns a jar that’ll automatically encrypt cookie values before sending them to the client and will decrypt them for read. If the cookie was tampered with by the user (or a 3rd party), nil will be returned.

    +
    +

    Returns a jar that’ll automatically encrypt cookie values before sending them to the client and will decrypt them for read. If the cookie was tampered with by the user (or a 3rd party), nil will be returned.

    If config.action_dispatch.encrypted_cookie_salt and config.action_dispatch.encrypted_signed_cookie_salt are both set, legacy cookies encrypted with HMAC AES-256-CBC will be transparently upgraded.

    @@ -97,8 +92,7 @@

    cookies.encrypted[:discount] # => 45 -

    - +
    @@ -123,15 +117,10 @@

    -

    - - permanent() - -

    +

    permanent()

    - -
    -

    Returns a jar that’ll automatically set the assigned cookies to have an expiration date 20 years from now. Example:

    +
    +

    Returns a jar that’ll automatically set the assigned cookies to have an expiration date 20 years from now. Example:

    cookies.permanent[:prefers_open_id] = true
     # => Set-Cookie: prefers_open_id=true; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT
    @@ -144,8 +133,7 @@ 

    cookies.permanent.signed[:remember_me] = current_user.id
     # => Set-Cookie: remember_me=BAhU--848956038e692d7046deab32b7131856ab20e14e; path=/; expires=Sun, 16-Dec-2029 03:24:16 GMT
     
    -

    - +
    @@ -170,15 +158,10 @@

    -

    - - signed() - -

    +

    signed()

    - -
    -

    Returns a jar that’ll automatically generate a signed representation of cookie value and verify it when reading from the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed cookie was tampered with by the user (or a 3rd party), nil will be returned.

    +
    +

    Returns a jar that’ll automatically generate a signed representation of cookie value and verify it when reading from the cookie again. This is useful for creating cookies with values that the user is not supposed to change. If a signed cookie was tampered with by the user (or a 3rd party), nil will be returned.

    This jar requires that you set a suitable secret for the verification on your app’s secret_key_base.

    @@ -189,8 +172,7 @@

    cookies.signed[:discount] # => 45 -

    - +
    @@ -215,17 +197,11 @@

    -

    - - signed_or_encrypted() - -

    +

    signed_or_encrypted()

    - -
    -

    Returns the signed or encrypted jar, preferring encrypted if secret_key_base is set. Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores.

    -
    - +
    +

    Returns the signed or encrypted jar, preferring encrypted if secret_key_base is set. Used by ActionDispatch::Session::CookieStore to avoid the need to introduce new cookie stores.

    +
    diff --git a/src/classes/ActionDispatch/DebugExceptions.html b/src/classes/ActionDispatch/DebugExceptions.html index 6c68fafb70..2673b70496 100644 --- a/src/classes/ActionDispatch/DebugExceptions.html +++ b/src/classes/ActionDispatch/DebugExceptions.html @@ -79,17 +79,9 @@

    Methods

    Class Public methods

    -

    - - new(app, routes_app = nil, response_format = :default, interceptors = self.class.interceptors) - -

    +

    new(app, routes_app = nil, response_format = :default, interceptors = self.class.interceptors)

    -
    - -
    - @@ -117,17 +109,9 @@

    -

    - - register_interceptor(object = nil, &block) - -

    +

    register_interceptor(object = nil, &block)

    -
    - -
    - @@ -157,17 +141,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/DebugLocks.html b/src/classes/ActionDispatch/DebugLocks.html index 64a4117bf1..9affdf1bc0 100644 --- a/src/classes/ActionDispatch/DebugLocks.html +++ b/src/classes/ActionDispatch/DebugLocks.html @@ -88,17 +88,9 @@

    Methods

    Class Public methods

    -

    - - new(app, path = "/rails/locks") - -

    +

    new(app, path = "/rails/locks")

    -
    - -
    - @@ -128,17 +120,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ExceptionWrapper.html b/src/classes/ActionDispatch/ExceptionWrapper.html index 1590a51718..c8725b7617 100644 --- a/src/classes/ActionDispatch/ExceptionWrapper.html +++ b/src/classes/ActionDispatch/ExceptionWrapper.html @@ -221,17 +221,9 @@

    Attributes

    Class Public methods

    -

    - - new(backtrace_cleaner, exception) - -

    +

    new(backtrace_cleaner, exception)

    -
    - -
    - @@ -263,17 +255,9 @@

    -

    - - status_code_for_exception(class_name) - -

    +

    status_code_for_exception(class_name)

    -
    - -
    - @@ -302,17 +286,9 @@

    Instance Public methods

    -

    - - actions() - -

    +

    actions()

    -
    - -
    - @@ -337,17 +313,9 @@

    -

    - - annotated_source_code() - -

    +

    annotated_source_code()

    -
    - -
    - @@ -376,17 +344,9 @@

    -

    - - application_trace() - -

    +

    application_trace()

    -
    - -
    - @@ -411,17 +371,9 @@

    -

    - - corrections() - -

    +

    corrections()

    -
    - -
    - @@ -446,17 +398,9 @@

    -

    - - exception_id() - -

    +

    exception_id()

    -
    - -
    - @@ -481,17 +425,9 @@

    -

    - - exception_inspect() - -

    +

    exception_inspect()

    -
    - -
    - @@ -516,17 +452,9 @@

    -

    - - exception_name() - -

    +

    exception_name()

    -
    - -
    - @@ -551,17 +479,9 @@

    -

    - - exception_trace() - -

    +

    exception_trace()

    -
    - -
    - @@ -588,17 +508,9 @@

    -

    - - failures() - -

    +

    failures()

    -
    - -
    - @@ -623,17 +535,9 @@

    -

    - - file_name() - -

    +

    file_name()

    -
    - -
    - @@ -658,17 +562,9 @@

    -

    - - framework_trace() - -

    +

    framework_trace()

    -
    - -
    - @@ -693,17 +589,9 @@

    -

    - - full_trace() - -

    +

    full_trace()

    -
    - -
    - @@ -728,17 +616,9 @@

    -

    - - has_cause?() - -

    +

    has_cause?()

    -
    - -
    - @@ -763,17 +643,9 @@

    -

    - - has_corrections?() - -

    +

    has_corrections?()

    -
    - -
    - @@ -798,17 +670,9 @@

    -

    - - line_number() - -

    +

    line_number()

    -
    - -
    - @@ -833,17 +697,9 @@

    -

    - - message() - -

    +

    message()

    -
    - -
    - @@ -868,17 +724,9 @@

    -

    - - original_message() - -

    +

    original_message()

    -
    - -
    - @@ -903,17 +751,9 @@

    -

    - - rescue_response?() - -

    +

    rescue_response?()

    -
    - -
    - @@ -938,17 +778,9 @@

    -

    - - rescue_template() - -

    +

    rescue_template()

    -
    - -
    - @@ -973,17 +805,9 @@

    -

    - - routing_error?() - -

    +

    routing_error?()

    -
    - -
    - @@ -1008,17 +832,9 @@

    -

    - - show?(request) - -

    +

    show?(request)

    -
    - -
    - @@ -1054,17 +870,9 @@

    -

    - - source_extracts() - -

    +

    source_extracts()

    -
    - -
    - @@ -1091,17 +899,9 @@

    -

    - - source_to_show_id() - -

    +

    source_to_show_id()

    -
    - -
    - @@ -1126,17 +926,9 @@

    -

    - - status_code() - -

    +

    status_code()

    -
    - -
    - @@ -1161,17 +953,9 @@

    -

    - - sub_template_message() - -

    +

    sub_template_message()

    -
    - -
    - @@ -1196,17 +980,9 @@

    -

    - - template_error?() - -

    +

    template_error?()

    -
    - -
    - @@ -1231,17 +1007,9 @@

    -

    - - trace_to_show() - -

    +

    trace_to_show()

    -
    - -
    - @@ -1270,17 +1038,9 @@

    -

    - - traces() - -

    +

    traces()

    -
    - -
    - @@ -1334,17 +1094,9 @@

    -

    - - unwrapped_exception() - -

    +

    unwrapped_exception()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Executor.html b/src/classes/ActionDispatch/Executor.html index f6c1b59102..53bdc1369a 100644 --- a/src/classes/ActionDispatch/Executor.html +++ b/src/classes/ActionDispatch/Executor.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(app, executor) - -

    +

    new(app, executor)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/FileHandler.html b/src/classes/ActionDispatch/FileHandler.html index bddde86b6a..c9cbe1c651 100644 --- a/src/classes/ActionDispatch/FileHandler.html +++ b/src/classes/ActionDispatch/FileHandler.html @@ -109,17 +109,9 @@

    Constants

    Class Public methods

    -

    - - new(root, index: "index", headers: {}, precompressed: %i[ br gzip ], compressible_content_types: /\A(?:text\/|application\/javascript|image\/svg\+xml)/) - -

    +

    new(root, index: "index", headers: {}, precompressed: %i[ br gzip ], compressible_content_types: /\A(?:text\/|application\/javascript|image\/svg\+xml)/)

    -
    - -
    - @@ -154,17 +146,9 @@

    Instance Public methods

    -

    - - attempt(env) - -

    +

    attempt(env)

    -
    - -
    - @@ -195,17 +179,9 @@

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Flash.html b/src/classes/ActionDispatch/Flash.html index 69c5a78478..180cd3972a 100644 --- a/src/classes/ActionDispatch/Flash.html +++ b/src/classes/ActionDispatch/Flash.html @@ -136,17 +136,9 @@

    Constants

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Flash/FlashHash.html b/src/classes/ActionDispatch/Flash/FlashHash.html index 342615fdc5..658b3c41ff 100644 --- a/src/classes/ActionDispatch/Flash/FlashHash.html +++ b/src/classes/ActionDispatch/Flash/FlashHash.html @@ -150,17 +150,9 @@

    Included Modules

    Instance Public methods

    -

    - - [](k) - -

    +

    [](k)

    -
    - -
    - @@ -185,17 +177,9 @@

    -

    - - []=(k, v) - -

    +

    []=(k, v)

    -
    - -
    - @@ -222,17 +206,11 @@

    -

    - - alert() - -

    +

    alert()

    - -
    -

    Convenience accessor for flash[:alert].

    -
    - +
    +

    Convenience accessor for flash[:alert].

    +
    @@ -257,17 +235,11 @@

    -

    - - alert=(message) - -

    +

    alert=(message)

    - -
    -

    Convenience accessor for flash[:alert]=.

    -
    - +
    +

    Convenience accessor for flash[:alert]=.

    +
    @@ -292,17 +264,9 @@

    -

    - - clear() - -

    +

    clear()

    -
    - -
    - @@ -328,17 +292,11 @@

    -

    - - delete(key) - -

    +

    delete(key)

    - -
    -

    Immediately deletes the single flash entry. Use this method when you want remove the message within the current action. See also discard.

    -
    - +
    +

    Immediately deletes the single flash entry. Use this method when you want remove the message within the current action. See also discard.

    +
    @@ -366,23 +324,17 @@

    -

    - - discard(k = nil) - -

    +

    discard(k = nil)

    - -
    -

    Marks the entire flash or a single flash entry to be discarded by the end of the current action:

    +
    +

    Marks the entire flash or a single flash entry to be discarded by the end of the current action:

    flash.discard              # discard the entire flash at the end of the current action
     flash.discard(:warning)    # discard only the "warning" entry at the end of the current action
     

    Use this method when you want to display the message in the current action but not in the next one. See also delete.

    -
    - +
    @@ -409,17 +361,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -444,17 +388,9 @@

    -

    - - empty?() - -

    +

    empty?()

    -
    - -
    - @@ -479,17 +415,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -518,21 +446,15 @@

    -

    - - keep(k = nil) - -

    +

    keep(k = nil)

    - -
    -

    Keeps either the entire current flash or a specific flash entry available for the next action:

    +
    +

    Keeps either the entire current flash or a specific flash entry available for the next action:

    flash.keep            # keeps the entire flash
     flash.keep(:notice)   # keeps only the "notice" entry, the rest of the flash is discarded
     
    -
    - +
    @@ -559,17 +481,9 @@

    -

    - - key?(name) - -

    +

    key?(name)

    -
    - -
    - @@ -594,17 +508,9 @@

    -

    - - keys() - -

    +

    keys()

    -
    - -
    - @@ -629,17 +535,11 @@

    -

    - - notice() - -

    +

    notice()

    - -
    -

    Convenience accessor for flash[:notice].

    -
    - +
    +

    Convenience accessor for flash[:notice].

    +
    @@ -664,17 +564,11 @@

    -

    - - notice=(message) - -

    +

    notice=(message)

    - -
    -

    Convenience accessor for flash[:notice]=.

    -
    - +
    +

    Convenience accessor for flash[:notice]=.

    +
    @@ -699,15 +593,10 @@

    -

    - - now() - -

    +

    now()

    - -
    -

    Sets a flash that will not be available to the next action, only to the current.

    +
    +

    Sets a flash that will not be available to the next action, only to the current.

    flash.now[:message] = "Hello current action"
     
    @@ -724,8 +613,7 @@

    flash.now.notice = "Good luck now!" # Equivalent to flash.now[:notice] = "Good luck now!" -

    - +
    @@ -750,17 +638,9 @@

    -

    - - to_hash() - -

    +

    to_hash()

    -
    - -
    - @@ -788,17 +668,9 @@

    Instance Protected methods

    -

    - - now_is_loaded?() - -

    +

    now_is_loaded?()

    -
    - -
    - @@ -826,17 +698,9 @@

    Instance Private methods

    -

    - - stringify_array(array) - -

    +

    stringify_array(array)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Flash/RequestMethods.html b/src/classes/ActionDispatch/Flash/RequestMethods.html index 53f9da6786..6cb374bab8 100644 --- a/src/classes/ActionDispatch/Flash/RequestMethods.html +++ b/src/classes/ActionDispatch/Flash/RequestMethods.html @@ -62,19 +62,13 @@

    Methods

    Instance Public methods

    -

    - - flash() - -

    +

    flash()

    - -
    -

    Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash.

    +
    +

    Access the contents of the flash. Returns a ActionDispatch::Flash::FlashHash.

    See ActionDispatch::Flash for example usage.

    -
    - +
    @@ -101,17 +95,9 @@

    -

    - - flash=(flash) - -

    +

    flash=(flash)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/HostAuthorization.html b/src/classes/ActionDispatch/HostAuthorization.html index c5758ef423..6428a12ea4 100644 --- a/src/classes/ActionDispatch/HostAuthorization.html +++ b/src/classes/ActionDispatch/HostAuthorization.html @@ -97,17 +97,9 @@

    Constants

    Class Public methods

    -

    - - new(app, hosts, exclude: nil, response_app: nil) - -

    +

    new(app, hosts, exclude: nil, response_app: nil)

    -
    - -
    - @@ -140,17 +132,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Http/Cache/Request.html b/src/classes/ActionDispatch/Http/Cache/Request.html index 0e783ce655..e977be9549 100644 --- a/src/classes/ActionDispatch/Http/Cache/Request.html +++ b/src/classes/ActionDispatch/Http/Cache/Request.html @@ -115,17 +115,9 @@

    Constants

    Instance Public methods

    -

    - - cache_control_directives() - -

    +

    cache_control_directives()

    -
    - -
    - @@ -150,17 +142,9 @@

    -

    - - etag_matches?(etag) - -

    +

    etag_matches?(etag)

    -
    - -
    - @@ -188,17 +172,11 @@

    -

    - - fresh?(response) - -

    +

    fresh?(response)

    - -
    -

    Check response freshness (Last-Modified and ETag) against request If-Modified-Since and If-None-Match conditions. If both headers are supplied, based on configuration, either ETag is preferred over Last-Modified or both are considered equally. You can adjust the preference with config.action_dispatch.strict_freshness. Reference: tools.ietf.org/html/rfc7232#section-6

    -
    - +
    +

    Check response freshness (Last-Modified and ETag) against request If-Modified-Since and If-None-Match conditions. If both headers are supplied, based on configuration, either ETag is preferred over Last-Modified or both are considered equally. You can adjust the preference with config.action_dispatch.strict_freshness. Reference: tools.ietf.org/html/rfc7232#section-6

    +
    @@ -241,17 +219,9 @@

    -

    - - if_modified_since() - -

    +

    if_modified_since()

    -
    - -
    - @@ -278,17 +248,9 @@

    -

    - - if_none_match() - -

    +

    if_none_match()

    -
    - -
    - @@ -313,17 +275,9 @@

    -

    - - if_none_match_etags() - -

    +

    if_none_match_etags()

    -
    - -
    - @@ -348,17 +302,9 @@

    -

    - - not_modified?(modified_at) - -

    +

    not_modified?(modified_at)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Http/Cache/Request/CacheControlDirectives.html b/src/classes/ActionDispatch/Http/Cache/Request/CacheControlDirectives.html index a131787ef1..552c7a8f97 100644 --- a/src/classes/ActionDispatch/Http/Cache/Request/CacheControlDirectives.html +++ b/src/classes/ActionDispatch/Http/Cache/Request/CacheControlDirectives.html @@ -131,17 +131,9 @@

    Attributes

    Class Public methods

    -

    - - new(cache_control_header) - -

    +

    new(cache_control_header)

    -
    - -
    - @@ -178,17 +170,11 @@

    Instance Public methods

    -

    - - max_stale?() - -

    +

    max_stale?()

    - -
    -

    Returns true if max-stale directive is present (with or without a value)

    -
    - +
    +

    Returns true if max-stale directive is present (with or without a value)

    +
    @@ -213,17 +199,11 @@

    -

    - - max_stale_unlimited?() - -

    +

    max_stale_unlimited?()

    - -
    -

    Returns true if max-stale directive is present without a value (unlimited staleness)

    -
    - +
    +

    Returns true if max-stale directive is present without a value (unlimited staleness)

    +
    @@ -248,17 +228,11 @@

    -

    - - no_cache?() - -

    +

    no_cache?()

    - -
    -

    Returns true if the no-cache directive is present. This directive indicates that a cache must not use the response to satisfy subsequent requests without successful validation on the origin server.

    -
    - +
    +

    Returns true if the no-cache directive is present. This directive indicates that a cache must not use the response to satisfy subsequent requests without successful validation on the origin server.

    +
    @@ -283,17 +257,11 @@

    -

    - - no_store?() - -

    +

    no_store?()

    - -
    -

    Returns true if the no-store directive is present. This directive indicates that a cache must not store any part of the request or response.

    -
    - +
    +

    Returns true if the no-store directive is present. This directive indicates that a cache must not store any part of the request or response.

    +
    @@ -318,17 +286,11 @@

    -

    - - no_transform?() - -

    +

    no_transform?()

    - -
    -

    Returns true if the no-transform directive is present. This directive indicates that a cache or proxy must not transform the payload.

    -
    - +
    +

    Returns true if the no-transform directive is present. This directive indicates that a cache or proxy must not transform the payload.

    +
    @@ -353,17 +315,11 @@

    -

    - - only_if_cached?() - -

    +

    only_if_cached?()

    - -
    -

    Returns true if the only-if-cached directive is present. This directive indicates that the client only wishes to obtain a stored response. If a valid stored response is not available, the server should respond with a 504 (Gateway Timeout) status.

    -
    - +
    +

    Returns true if the only-if-cached directive is present. This directive indicates that the client only wishes to obtain a stored response. If a valid stored response is not available, the server should respond with a 504 (Gateway Timeout) status.

    +
    diff --git a/src/classes/ActionDispatch/Http/Cache/Response.html b/src/classes/ActionDispatch/Http/Cache/Response.html index cd9c66ad67..d12516b491 100644 --- a/src/classes/ActionDispatch/Http/Cache/Response.html +++ b/src/classes/ActionDispatch/Http/Cache/Response.html @@ -199,17 +199,9 @@

    Attributes

    Instance Public methods

    -

    - - date() - -

    +

    date()

    -
    - -
    - @@ -236,17 +228,9 @@

    -

    - - date=(utc_time) - -

    +

    date=(utc_time)

    -
    - -
    - @@ -271,17 +255,9 @@

    -

    - - date?() - -

    +

    date?()

    -
    - -
    - @@ -306,15 +282,10 @@

    -

    - - etag=(weak_validators) - -

    +

    etag=(weak_validators)

    - -
    -

    This method sets a weak ETag validator on the response so browsers and proxies may cache the response, keyed on the ETag. On subsequent requests, the If-None-Match header is set to the cached ETag. If it matches the current ETag, we can return a 304 Not Modified response with no body, letting the browser or proxy know that their cache is current. Big savings in request time and network bandwidth.

    +
    +

    This method sets a weak ETag validator on the response so browsers and proxies may cache the response, keyed on the ETag. On subsequent requests, the If-None-Match header is set to the cached ETag. If it matches the current ETag, we can return a 304 Not Modified response with no body, letting the browser or proxy know that their cache is current. Big savings in request time and network bandwidth.

    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.

    @@ -323,8 +294,7 @@

    Weak ETags are what we almost always need, so they’re the default. Check out

    strong_etag= to provide a strong ETag validator.

    -

    - +
    @@ -349,17 +319,9 @@

    -

    - - etag?() - -

    +

    etag?()

    -
    - -
    - @@ -382,17 +344,9 @@

    -

    - - last_modified() - -

    +

    last_modified()

    -
    - -
    - @@ -419,17 +373,9 @@

    -

    - - last_modified=(utc_time) - -

    +

    last_modified=(utc_time)

    -
    - -
    - @@ -454,17 +400,9 @@

    -

    - - last_modified?() - -

    +

    last_modified?()

    -
    - -
    - @@ -489,17 +427,9 @@

    -

    - - strong_etag=(strong_validators) - -

    +

    strong_etag=(strong_validators)

    -
    - -
    - @@ -524,17 +454,11 @@

    -

    - - strong_etag?() - -

    +

    strong_etag?()

    - -
    -

    True if an ETag is set, and it isn’t a weak validator (not preceded with W/).

    -
    - +
    +

    True if an ETag is set, and it isn’t a weak validator (not preceded with W/).

    +
    @@ -559,17 +483,9 @@

    -

    - - weak_etag=(weak_validators) - -

    +

    weak_etag=(weak_validators)

    -
    - -
    - @@ -594,17 +510,11 @@

    -

    - - weak_etag?() - -

    +

    weak_etag?()

    - -
    -

    True if an ETag is set, and it’s a weak validator (preceded with W/).

    -
    - +
    +

    True if an ETag is set, and it’s a weak validator (preceded with W/).

    +
    diff --git a/src/classes/ActionDispatch/Http/FilterParameters.html b/src/classes/ActionDispatch/Http/FilterParameters.html index a514f30310..ec5de3f083 100644 --- a/src/classes/ActionDispatch/Http/FilterParameters.html +++ b/src/classes/ActionDispatch/Http/FilterParameters.html @@ -99,17 +99,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -142,17 +134,11 @@

    Instance Public methods

    -

    - - filtered_env() - -

    +

    filtered_env()

    - -
    -

    Returns a hash of request.env with all sensitive data replaced.

    -
    - +
    +

    Returns a hash of request.env with all sensitive data replaced.

    +
    @@ -177,17 +163,11 @@

    -

    - - filtered_parameters() - -

    +

    filtered_parameters()

    - -
    -

    Returns a hash of parameters with all sensitive data replaced.

    -
    - +
    +

    Returns a hash of parameters with all sensitive data replaced.

    +
    @@ -214,17 +194,11 @@

    -

    - - filtered_path() - -

    +

    filtered_path()

    - -
    -

    Reconstructs a path with all sensitive GET parameters replaced.

    -
    - +
    +

    Reconstructs a path with all sensitive GET parameters replaced.

    +
    @@ -249,17 +223,11 @@

    -

    - - parameter_filter() - -

    +

    parameter_filter()

    - -
    -

    Returns the ActiveSupport::ParameterFilter object used to filter in this request.

    -
    - +
    +

    Returns the ActiveSupport::ParameterFilter object used to filter in this request.

    +
    @@ -291,17 +259,9 @@

    Instance Private methods

    -

    - - env_filter() - -

    +

    env_filter()

    -
    - -
    - @@ -329,17 +289,9 @@

    -

    - - filtered_query_string() - -

    +

    filtered_query_string()

    -
    - -
    - @@ -373,17 +325,9 @@

    -

    - - parameter_filter_for(filters) - -

    +

    parameter_filter_for(filters)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Http/Headers.html b/src/classes/ActionDispatch/Http/Headers.html index 0ea4b1ec54..8e3f72e1c9 100644 --- a/src/classes/ActionDispatch/Http/Headers.html +++ b/src/classes/ActionDispatch/Http/Headers.html @@ -181,17 +181,9 @@

    Constants

    Class Public methods

    -

    - - from_hash(hash) - -

    +

    from_hash(hash)

    -
    - -
    - @@ -220,17 +212,11 @@

    Instance Public methods

    -

    - - [](key) - -

    +

    [](key)

    - -
    -

    Returns the value for the given key mapped to @env.

    -
    - +
    +

    Returns the value for the given key mapped to @env.

    +
    @@ -255,17 +241,11 @@

    -

    - - []=(key, value) - -

    +

    []=(key, value)

    - -
    -

    Sets the given value for the key mapped to @env.

    -
    - +
    +

    Sets the given value for the key mapped to @env.

    +
    @@ -290,17 +270,11 @@

    -

    - - add(key, value) - -

    +

    add(key, value)

    - -
    -

    Add a value to a multivalued header like Vary or Accept-Encoding.

    -
    - +
    +

    Add a value to a multivalued header like Vary or Accept-Encoding.

    +
    @@ -325,17 +299,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -360,17 +326,9 @@

    -

    - - env() - -

    +

    env()

    -
    - -
    - @@ -393,21 +351,15 @@

    -

    - - fetch(key, default = DEFAULT) - -

    +

    fetch(key, default = DEFAULT)

    - -
    -

    Returns the value for the given key mapped to @env.

    +
    +

    Returns the value for the given key mapped to @env.

    If the key is not found and an optional code block is not provided, raises a KeyError exception.

    If the code block is provided, then it will be run and its result returned.

    -
    - +
    @@ -436,24 +388,17 @@

    -

    - - include?(key) - -

    +

    include?(key)

    -
    - -
    - -
    - Alias for: key? -
    +

    + Alias for: + key?. +

    @@ -461,22 +406,16 @@

    -

    - - key?(key) - -

    +

    key?(key)

    -
    - -
    - -
    - Also aliased as: include? -
    +

    + Also aliased as: + + include?. +

    @@ -500,17 +439,11 @@

    -

    - - merge(headers_or_env) - -

    +

    merge(headers_or_env)

    - -
    -

    Returns a new Http::Headers instance containing the contents of headers_or_env and the original instance.

    -
    - +
    +

    Returns a new Http::Headers instance containing the contents of headers_or_env and the original instance.

    +
    @@ -537,17 +470,11 @@

    -

    - - merge!(headers_or_env) - -

    +

    merge!(headers_or_env)

    - -
    -

    Adds the contents of headers_or_env to original instance entries; duplicate keys are overwritten with the values from headers_or_env.

    -
    - +
    +

    Adds the contents of headers_or_env to original instance entries; duplicate keys are overwritten with the values from headers_or_env.

    +
    diff --git a/src/classes/ActionDispatch/Http/MimeNegotiation.html b/src/classes/ActionDispatch/Http/MimeNegotiation.html index 7a2524d48c..2257d70a58 100644 --- a/src/classes/ActionDispatch/Http/MimeNegotiation.html +++ b/src/classes/ActionDispatch/Http/MimeNegotiation.html @@ -135,17 +135,11 @@

    Constants

    Instance Public methods

    -

    - - accepts() - -

    +

    accepts()

    - -
    -

    Returns the accepted MIME type for the request.

    -
    - +
    +

    Returns the accepted MIME type for the request.

    +
    @@ -181,17 +175,11 @@

    -

    - - content_mime_type() - -

    +

    content_mime_type()

    - -
    -

    The MIME type of the HTTP request, such as Mime.

    -
    - +
    +

    The MIME type of the HTTP request, such as Mime.

    +
    @@ -225,15 +213,10 @@

    -

    - - format(_view_path = nil) - -

    +

    format(_view_path = nil)

    - -
    -

    Returns the MIME type for the format used in the request.

    +
    +

    Returns the MIME type for the format used in the request.

    # GET /posts/5.xml
     request.format # => Mime[:xml]
    @@ -244,8 +227,7 @@ 

    # GET /posts/5 request.format # => Mime[:html] or Mime[:js], or request.accepts.first

    -
    - +
    @@ -270,15 +252,10 @@

    -

    - - format=(extension) - -

    +

    format=(extension)

    - -
    -

    Sets the format by string extension, which can be used to force custom formats that are not controlled by the extension.

    +
    +

    Sets the format by string extension, which can be used to force custom formats that are not controlled by the extension.

    class ApplicationController < ActionController::Base
       before_action :adjust_format_for_iphone
    @@ -289,8 +266,7 @@ 

    end end

    -
    - +
    @@ -316,17 +292,9 @@

    -

    - - formats() - -

    +

    formats()

    -
    - -
    - @@ -369,15 +337,10 @@

    -

    - - formats=(extensions) - -

    +

    formats=(extensions)

    - -
    -

    Sets the formats by string extensions. This differs from format= by allowing you to set multiple, ordered formats, which is useful when you want to have a fallback.

    +
    +

    Sets the formats by string extensions. This differs from format= by allowing you to set multiple, ordered formats, which is useful when you want to have a fallback.

    In this example, the :iphone format will be used if it’s available, otherwise it’ll fall back to the :html format.

    @@ -390,8 +353,7 @@

    end end -

    - +
    @@ -419,17 +381,11 @@

    -

    - - negotiate_mime(order) - -

    +

    negotiate_mime(order)

    - -
    -

    Returns the first MIME type that matches the provided array of MIME types.

    -
    - +
    +

    Returns the first MIME type that matches the provided array of MIME types.

    +
    @@ -462,17 +418,9 @@

    -

    - - should_apply_vary_header?() - -

    +

    should_apply_vary_header?()

    -
    - -
    - @@ -497,15 +445,10 @@

    -

    - - variant() - -

    +

    variant()

    - -
    -

    Returns the variant for the response template as an instance of ActiveSupport::ArrayInquirer.

    +
    +

    Returns the variant for the response template as an instance of ActiveSupport::ArrayInquirer.

    request.variant = :phone
     request.variant.phone?  # => true
    @@ -517,8 +460,7 @@ 

    request.variant.any?(:phone, :desktop) # => true request.variant.any?(:desktop, :watch) # => false

    -
    - +
    @@ -543,15 +485,10 @@

    -

    - - variant=(variant) - -

    +

    variant=(variant)

    - -
    -

    Sets the variant for the response template.

    +
    +

    Sets the variant for the response template.

    When determining which template to render, Action View will incorporate all variants from the request. For example, if an ArticlesController#index action needs to respond to request.variant = [:ios, :turbo_native], it will render the first template file it can find in the following list:

    • @@ -589,8 +526,7 @@

      Examples

      end end -
    - +
    diff --git a/src/classes/ActionDispatch/Http/Parameters.html b/src/classes/ActionDispatch/Http/Parameters.html index 91bf5c7792..8e6184684f 100644 --- a/src/classes/ActionDispatch/Http/Parameters.html +++ b/src/classes/ActionDispatch/Http/Parameters.html @@ -125,22 +125,18 @@

    Attributes

    Instance Public methods

    -

    - - parameters() - -

    +

    parameters()

    - -
    -

    Returns both GET and POST parameters in a single hash.

    -
    - +
    +

    Returns both GET and POST parameters in a single hash.

    +
    -
    - Also aliased as: params -
    +

    + Also aliased as: + + params. +

    @@ -174,24 +170,17 @@

    -

    - - params() - -

    +

    params()

    -
    - -
    - -
    - Alias for: parameters -
    +

    + Alias for: + parameters. +

    @@ -199,20 +188,14 @@

    -

    - - path_parameters() - -

    +

    path_parameters()

    - -
    -

    Returns a hash with the parameters used to form the path of the request. Returned hash keys are symbols:

    +
    +

    Returns a hash with the parameters used to form the path of the request. Returned hash keys are symbols:

    { action: "my_action", controller: "my_controller" }
     
    -
    - +
    diff --git a/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html b/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html index 8115f7e54e..0d839a25f4 100644 --- a/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html +++ b/src/classes/ActionDispatch/Http/Parameters/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - parameter_parsers=(parsers) - -

    +

    parameter_parsers=(parsers)

    - -
    -

    Configure the parameter parser for a given MIME type.

    +
    +

    Configure the parameter parser for a given MIME type.

    It accepts a hash where the key is the symbol of the MIME type and the value is a proc.

    @@ -75,8 +70,7 @@

    new_parsers = original_parsers.merge(xml: xml_parser) ActionDispatch::Request.parameter_parsers = new_parsers -

    - +
    diff --git a/src/classes/ActionDispatch/Http/Parameters/ParseError.html b/src/classes/ActionDispatch/Http/Parameters/ParseError.html index 6d491e9440..00445d7695 100644 --- a/src/classes/ActionDispatch/Http/Parameters/ParseError.html +++ b/src/classes/ActionDispatch/Http/Parameters/ParseError.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(message = $!.message) - -

    +

    new(message = $!.message)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Http/URL.html b/src/classes/ActionDispatch/Http/URL.html index c7f2ba6298..309e77228e 100644 --- a/src/classes/ActionDispatch/Http/URL.html +++ b/src/classes/ActionDispatch/Http/URL.html @@ -177,23 +177,17 @@

    Constants

    Class Public methods

    -

    - - extract_domain(host, tld_length) - -

    +

    extract_domain(host, tld_length)

    - -
    -

    Returns the domain part of a host given the domain level.

    +
    +

    Returns the domain part of a host given the domain level.

    # Top-level domain example
     extract_domain('www.example.com', 1) # => "example.com"
     # Second-level domain example
     extract_domain('dev.www.example.co.uk', 2) # => "example.co.uk"
     
    -
    - +
    @@ -218,23 +212,17 @@

    -

    - - extract_subdomain(host, tld_length) - -

    +

    extract_subdomain(host, tld_length)

    - -
    -

    Returns the subdomains of a host as a String given the domain level.

    +
    +

    Returns the subdomains of a host as a String given the domain level.

    # Top-level domain example
     extract_subdomain('www.example.com', 1) # => "www"
     # Second-level domain example
     extract_subdomain('dev.www.example.co.uk', 2) # => "dev.www"
     
    -
    - +
    @@ -259,23 +247,17 @@

    -

    - - extract_subdomains(host, tld_length) - -

    +

    extract_subdomains(host, tld_length)

    - -
    -

    Returns the subdomains of a host as an Array given the domain level.

    +
    +

    Returns the subdomains of a host as an Array given the domain level.

    # Top-level domain example
     extract_subdomains('www.example.com', 1) # => ["www"]
     # Second-level domain example
     extract_subdomains('dev.www.example.co.uk', 2) # => ["dev", "www"]
     
    -
    - +
    @@ -304,17 +286,9 @@

    -

    - - full_url_for(options) - -

    +

    full_url_for(options)

    -
    - -
    - @@ -347,17 +321,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -384,17 +350,9 @@

    -

    - - path_for(options) - -

    +

    path_for(options)

    -
    - -
    - @@ -427,17 +385,9 @@

    -

    - - url_for(options) - -

    +

    url_for(options)

    -
    - -
    - @@ -470,17 +420,11 @@

    Instance Public methods

    -

    - - domain(tld_length = @@tld_length) - -

    +

    domain(tld_length = @@tld_length)

    - -
    -

    Returns the domain part of a host, such as “rubyonrails.org” in “www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch rubyonrails.co.uk in “www.rubyonrails.co.uk”.

    -
    - +
    +

    Returns the domain part of a host, such as “rubyonrails.org” in “www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch rubyonrails.co.uk in “www.rubyonrails.co.uk”.

    +
    @@ -505,21 +449,15 @@

    -

    - - host() - -

    +

    host()

    - -
    -

    Returns the host for this request, such as “example.com”.

    +
    +

    Returns the host for this request, such as “example.com”.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080'
     req.host # => "example.com"
     
    -
    - +
    @@ -544,15 +482,10 @@

    -

    - - host_with_port() - -

    +

    host_with_port()

    - -
    -

    Returns a host:port string for this request, such as “example.com” or “example.com:8080”. Port is only included if it is not a default port (80 or 443)

    +
    +

    Returns a host:port string for this request, such as “example.com” or “example.com:8080”. Port is only included if it is not a default port (80 or 443)

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
     req.host_with_port # => "example.com"
    @@ -563,8 +496,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' req.host_with_port # => "example.com:8080"

    -
    - +
    @@ -589,15 +521,10 @@

    -

    - - optional_port() - -

    +

    optional_port()

    - -
    -

    Returns a number port suffix like 8080 if the port number of this request is not the default HTTP port 80 or HTTPS port 443.

    +
    +

    Returns a number port suffix like 8080 if the port number of this request is not the default HTTP port 80 or HTTPS port 443.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80'
     req.optional_port # => nil
    @@ -605,8 +532,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' req.optional_port # => 8080

    -
    - +
    @@ -631,15 +557,10 @@

    -

    - - port() - -

    +

    port()

    - -
    -

    Returns the port number of this request as an integer.

    +
    +

    Returns the port number of this request as an integer.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
     req.port # => 80
    @@ -647,8 +568,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' req.port # => 8080

    -
    - +
    @@ -677,15 +597,10 @@

    -

    - - port_string() - -

    +

    port_string()

    - -
    -

    Returns a string port suffix, including colon, like “:8080” if the port number of this request is not the default HTTP port 80 or HTTPS port 443.

    +
    +

    Returns a string port suffix, including colon, like “:8080” if the port number of this request is not the default HTTP port 80 or HTTPS port 443.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80'
     req.port_string # => ""
    @@ -693,8 +608,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' req.port_string # => ":8080"

    -
    - +
    @@ -719,15 +633,10 @@

    -

    - - protocol() - -

    +

    protocol()

    - -
    -

    Returns ‘https://’ if this is an SSL request and ‘http://’ otherwise.

    +
    +

    Returns ‘https://’ if this is an SSL request and ‘http://’ otherwise.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
     req.protocol # => "http://"
    @@ -735,8 +644,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com', 'HTTPS' => 'on' req.protocol # => "https://"

    -
    - +
    @@ -761,15 +669,10 @@

    -

    - - raw_host_with_port() - -

    +

    raw_host_with_port()

    - -
    -

    Returns the host and port for this request, such as “example.com:8080”.

    +
    +

    Returns the host and port for this request, such as “example.com:8080”.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
     req.raw_host_with_port # => "example.com"
    @@ -780,8 +683,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' req.raw_host_with_port # => "example.com:8080"

    -
    - +
    @@ -810,15 +712,10 @@

    -

    - - server_port() - -

    +

    server_port()

    - -
    -

    Returns the requested port, such as 8080, based on SERVER_PORT.

    +
    +

    Returns the requested port, such as 8080, based on SERVER_PORT.

    req = ActionDispatch::Request.new 'SERVER_PORT' => '80'
     req.server_port # => 80
    @@ -826,8 +723,7 @@ 

    req = ActionDispatch::Request.new 'SERVER_PORT' => '8080' req.server_port # => 8080

    -
    - +
    @@ -852,21 +748,15 @@

    -

    - - standard_port() - -

    +

    standard_port()

    - -
    -

    Returns the standard port number for this request’s protocol.

    +
    +

    Returns the standard port number for this request’s protocol.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080'
     req.standard_port # => 80
     
    -
    - +
    @@ -895,15 +785,10 @@

    -

    - - standard_port?() - -

    +

    standard_port?()

    - -
    -

    Returns whether this request is using the standard port.

    +
    +

    Returns whether this request is using the standard port.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:80'
     req.standard_port? # => true
    @@ -911,8 +796,7 @@ 

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com:8080' req.standard_port? # => false

    -
    - +
    @@ -937,17 +821,11 @@

    -

    - - subdomain(tld_length = @@tld_length) - -

    +

    subdomain(tld_length = @@tld_length)

    - -
    -

    Returns all the subdomains as a string, so "dev.www" would be returned for “dev.www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch "www" instead of "www.rubyonrails" in “www.rubyonrails.co.uk”.

    -
    - +
    +

    Returns all the subdomains as a string, so "dev.www" would be returned for “dev.www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch "www" instead of "www.rubyonrails" in “www.rubyonrails.co.uk”.

    +
    @@ -972,17 +850,11 @@

    -

    - - subdomains(tld_length = @@tld_length) - -

    +

    subdomains(tld_length = @@tld_length)

    - -
    -

    Returns all the subdomains as an array, so ["dev", "www"] would be returned for “dev.www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch ["www"] instead of ["www", "rubyonrails"] in “www.rubyonrails.co.uk”.

    -
    - +
    +

    Returns all the subdomains as an array, so ["dev", "www"] would be returned for “dev.www.rubyonrails.org”. You can specify a different tld_length, such as 2 to catch ["www"] instead of ["www", "rubyonrails"] in “www.rubyonrails.co.uk”.

    +
    @@ -1007,21 +879,15 @@

    -

    - - url() - -

    +

    url()

    - -
    -

    Returns the complete URL used for this request.

    +
    +

    Returns the complete URL used for this request.

    req = ActionDispatch::Request.new 'HTTP_HOST' => 'example.com'
     req.url # => "http://example.com"
     
    -
    - +
    diff --git a/src/classes/ActionDispatch/Http/URL/DomainExtractor.html b/src/classes/ActionDispatch/Http/URL/DomainExtractor.html index 7f149f08cd..6ef1fab401 100644 --- a/src/classes/ActionDispatch/Http/URL/DomainExtractor.html +++ b/src/classes/ActionDispatch/Http/URL/DomainExtractor.html @@ -72,15 +72,10 @@

    Methods

    Instance Public methods

    -

    - - domain_from(host, tld_length) - -

    +

    domain_from(host, tld_length)

    - -
    -

    Extracts the domain part from a host string, including the specified number of top-level domain components.

    +
    +

    Extracts the domain part from a host string, including the specified number of top-level domain components.

    The domain includes the main domain name plus the TLD components. The tld_length parameter specifies how many components from the right should be considered part of the TLD.

    @@ -99,8 +94,7 @@

    # Multiple subdomains DomainExtractor.domain_from(“api.staging.myapp.herokuapp.com”, 1) # => “herokuapp.com”

    # Single component (returns the host itself) DomainExtractor.domain_from(“localhost”, 1) # => “localhost”

    -

    - +
    @@ -125,15 +119,10 @@

    -

    - - subdomains_from(host, tld_length) - -

    +

    subdomains_from(host, tld_length)

    - -
    -

    Extracts the subdomain components from a host string as an Array.

    +
    +

    Extracts the subdomain components from a host string as an Array.

    Returns all the components that come before the domain and TLD parts. The tld_length parameter is used to determine where the domain begins so that everything before it is considered a subdomain.

    @@ -154,8 +143,7 @@

    # Single subdomain with complex TLD DomainExtractor.subdomains_from(“www.mysite.co.uk”, 2) # => [“www”]

    # Multiple levels of subdomains DomainExtractor.subdomains_from(“dev.api.staging.example.com”, 1) # => [“dev”, “api”, “staging”]

    -

    - +
    diff --git a/src/classes/ActionDispatch/Http/UploadedFile.html b/src/classes/ActionDispatch/Http/UploadedFile.html index df8691b879..f13ed36e80 100644 --- a/src/classes/ActionDispatch/Http/UploadedFile.html +++ b/src/classes/ActionDispatch/Http/UploadedFile.html @@ -146,17 +146,11 @@

    Attributes

    Instance Public methods

    -

    - - close(unlink_now = false) - -

    +

    close(unlink_now = false)

    - -
    -

    Shortcut for tempfile.close.

    -
    - +
    +

    Shortcut for tempfile.close.

    +
    @@ -181,17 +175,11 @@

    -

    - - eof?() - -

    +

    eof?()

    - -
    -

    Shortcut for tempfile.eof?.

    -
    - +
    +

    Shortcut for tempfile.eof?.

    +
    @@ -216,17 +204,11 @@

    -

    - - open() - -

    +

    open()

    - -
    -

    Shortcut for tempfile.open.

    -
    - +
    +

    Shortcut for tempfile.open.

    +
    @@ -251,17 +233,11 @@

    -

    - - path() - -

    +

    path()

    - -
    -

    Shortcut for tempfile.path.

    -
    - +
    +

    Shortcut for tempfile.path.

    +
    @@ -286,17 +262,11 @@

    -

    - - read(length = nil, buffer = nil) - -

    +

    read(length = nil, buffer = nil)

    - -
    -

    Shortcut for tempfile.read.

    -
    - +
    +

    Shortcut for tempfile.read.

    +
    @@ -321,17 +291,11 @@

    -

    - - rewind() - -

    +

    rewind()

    - -
    -

    Shortcut for tempfile.rewind.

    -
    - +
    +

    Shortcut for tempfile.rewind.

    +
    @@ -356,17 +320,11 @@

    -

    - - size() - -

    +

    size()

    - -
    -

    Shortcut for tempfile.size.

    -
    - +
    +

    Shortcut for tempfile.size.

    +
    @@ -391,17 +349,9 @@

    -

    - - to_io() - -

    +

    to_io()

    -
    - -
    - @@ -426,17 +376,11 @@

    -

    - - to_path() - -

    +

    to_path()

    - -
    -

    Shortcut for tempfile.to_path.

    -
    - +
    +

    Shortcut for tempfile.to_path.

    +
    diff --git a/src/classes/ActionDispatch/Integration/RequestHelpers.html b/src/classes/ActionDispatch/Integration/RequestHelpers.html index 56c883168f..8d3e18f02c 100644 --- a/src/classes/ActionDispatch/Integration/RequestHelpers.html +++ b/src/classes/ActionDispatch/Integration/RequestHelpers.html @@ -86,17 +86,11 @@

    Methods

    Instance Public methods

    -

    - - delete(path, **args) - -

    +

    delete(path, **args)

    - -
    -

    Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs a DELETE request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    @@ -121,19 +115,13 @@

    -

    - - follow_redirect!(headers: {}, **args) - -

    +

    follow_redirect!(headers: {}, **args)

    - -
    -

    Follow a single redirect response. If the last response was not a redirect, an exception will be raised. Otherwise, the redirect is performed on the location header. If the redirection is a 307 or 308 redirect, the same HTTP verb will be used when redirecting, otherwise a GET request will be performed. Any arguments are passed to the underlying request.

    +
    +

    Follow a single redirect response. If the last response was not a redirect, an exception will be raised. Otherwise, the redirect is performed on the location header. If the redirection is a 307 or 308 redirect, the same HTTP verb will be used when redirecting, otherwise a GET request will be performed. Any arguments are passed to the underlying request.

    The HTTP_REFERER header will be set to the previous url.

    -
    - +
    @@ -172,17 +160,11 @@

    -

    - - get(path, **args) - -

    +

    get(path, **args)

    - -
    -

    Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs a GET request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    @@ -207,17 +189,11 @@

    -

    - - head(path, **args) - -

    +

    head(path, **args)

    - -
    -

    Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs a HEAD request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    @@ -242,17 +218,11 @@

    -

    - - options(path, **args) - -

    +

    options(path, **args)

    - -
    -

    Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs an OPTIONS request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    @@ -277,17 +247,11 @@

    -

    - - patch(path, **args) - -

    +

    patch(path, **args)

    - -
    -

    Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs a PATCH request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    @@ -312,17 +276,11 @@

    -

    - - post(path, **args) - -

    +

    post(path, **args)

    - -
    -

    Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs a POST request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    @@ -347,17 +305,11 @@

    -

    - - put(path, **args) - -

    +

    put(path, **args)

    - -
    -

    Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    -
    - +
    +

    Performs a PUT request with the given parameters. See ActionDispatch::Integration::Session#process for more details.

    +
    diff --git a/src/classes/ActionDispatch/Integration/Runner.html b/src/classes/ActionDispatch/Integration/Runner.html index 0036d3ebf7..d7a133f287 100644 --- a/src/classes/ActionDispatch/Integration/Runner.html +++ b/src/classes/ActionDispatch/Integration/Runner.html @@ -122,17 +122,9 @@

    Attributes

    Class Public methods

    -

    - - new(*args, &blk) - -

    +

    new(*args, &blk)

    -
    - -
    - @@ -162,17 +154,9 @@

    Instance Public methods

    -

    - - create_session(app) - -

    +

    create_session(app)

    -
    - -
    - @@ -205,17 +189,9 @@

    -

    - - default_url_options() - -

    +

    default_url_options()

    -
    - -
    - @@ -240,17 +216,9 @@

    -

    - - default_url_options=(options) - -

    +

    default_url_options=(options)

    -
    - -
    - @@ -275,17 +243,9 @@

    -

    - - integration_session() - -

    +

    integration_session()

    -
    - -
    - @@ -310,15 +270,10 @@

    -

    - - open_session() - -

    +

    open_session()

    - -
    -

    Open a new session instance. If a block is given, the new session is yielded to the block before being returned.

    +
    +

    Open a new session instance. If a block is given, the new session is yielded to the block before being returned.

    session = open_session do |sess|
       sess.extend(CustomAssertions)
    @@ -326,8 +281,7 @@ 

    By default, a single session is automatically created for you, but you can use this method to open multiple sessions that ought to be tested simultaneously.

    -
    - +
    @@ -356,17 +310,11 @@

    -

    - - reset!() - -

    +

    reset!()

    - -
    -

    Reset the current session. This is useful for testing multiple sessions in a single test case.

    -
    - +
    +

    Reset the current session. This is useful for testing multiple sessions in a single test case.

    +
    diff --git a/src/classes/ActionDispatch/Integration/Session.html b/src/classes/ActionDispatch/Integration/Session.html index aacb65a136..8abb60bc65 100644 --- a/src/classes/ActionDispatch/Integration/Session.html +++ b/src/classes/ActionDispatch/Integration/Session.html @@ -202,17 +202,11 @@

    Attributes

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    - -
    -

    Create and initialize a new Session instance.

    -
    - +
    +

    Create and initialize a new Session instance.

    +
    @@ -244,17 +238,11 @@

    Instance Public methods

    -

    - - cookies() - -

    +

    cookies()

    - -
    -

    A map of the cookies returned by the last response, and which will be sent with the next request.

    -
    - +
    +

    A map of the cookies returned by the last response, and which will be sent with the next request.

    +
    @@ -279,17 +267,11 @@

    -

    - - host() - -

    +

    host()

    - -
    -

    The hostname used in the last request.

    -
    - +
    +

    The hostname used in the last request.

    +
    @@ -314,21 +296,15 @@

    -

    - - https!(flag = true) - -

    +

    https!(flag = true)

    - -
    -

    Specify whether or not the session should mimic a secure HTTPS request.

    +
    +

    Specify whether or not the session should mimic a secure HTTPS request.

    session.https!
     session.https!(false)
     
    -
    - +
    @@ -353,22 +329,16 @@

    -

    - - https?() - -

    +

    https?()

    - -
    -

    Returns true if the session is mimicking a secure HTTPS request.

    +
    +

    Returns true if the session is mimicking a secure HTTPS request.

    if session.https?
       ...
     end
     
    -
    - +
    @@ -393,15 +363,10 @@

    -

    - - process(method, path, params: nil, headers: nil, env: nil, xhr: false, as: nil) - -

    +

    process(method, path, params: nil, headers: nil, env: nil, xhr: false, as: nil)

    - -
    -

    Performs the actual request.

    +
    +

    Performs the actual request.

    • method: The HTTP method (GET, POST, PATCH, PUT, DELETE, HEAD, OPTIONS) as a symbol.

    • @@ -423,8 +388,7 @@

      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.

      Example: process :get, ‘/author’, params: { since: 201501011400 }

      -

    - +
    @@ -532,20 +496,14 @@

    -

    - - reset!() - -

    +

    reset!()

    - -
    -

    Resets the instance. This can be used to reset the state information in an existing session instance, so it can be used from a clean-slate condition.

    +
    +

    Resets the instance. This can be used to reset the state information in an existing session instance, so it can be used from a clean-slate condition.

    session.reset!
     
    -
    - +
    @@ -586,17 +544,9 @@

    -

    - - url_options() - -

    +

    url_options()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/IntegrationTest/Behavior.html b/src/classes/ActionDispatch/IntegrationTest/Behavior.html index 6db30ae607..25eb7dba9b 100644 --- a/src/classes/ActionDispatch/IntegrationTest/Behavior.html +++ b/src/classes/ActionDispatch/IntegrationTest/Behavior.html @@ -113,17 +113,9 @@

    Included Modules

    Instance Public methods

    -

    - - app() - -

    +

    app()

    -
    - -
    - @@ -148,17 +140,9 @@

    -

    - - document_root_element() - -

    +

    document_root_element()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html b/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html index 76a5909c95..0e18a275b4 100644 --- a/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html +++ b/src/classes/ActionDispatch/IntegrationTest/Behavior/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - app() - -

    +

    app()

    -
    - -
    - @@ -105,17 +97,9 @@

    -

    - - app=(app) - -

    +

    app=(app)

    -
    - -
    - @@ -140,17 +124,9 @@

    -

    - - register_encoder(*args, **options) - -

    +

    register_encoder(*args, **options)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html b/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html index cb4f9d7ea7..4313b23d57 100644 --- a/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html +++ b/src/classes/ActionDispatch/IntegrationTest/UrlOptions.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - url_options() - -

    +

    url_options()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Journey/Scanner/Scanner.html b/src/classes/ActionDispatch/Journey/Scanner/Scanner.html index 034fbfceaf..d5d264a8c5 100644 --- a/src/classes/ActionDispatch/Journey/Scanner/Scanner.html +++ b/src/classes/ActionDispatch/Journey/Scanner/Scanner.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - peek_byte() - -

    +

    peek_byte()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/MiddlewareStack.html b/src/classes/ActionDispatch/MiddlewareStack.html index 810ebe6453..b286222cf8 100644 --- a/src/classes/ActionDispatch/MiddlewareStack.html +++ b/src/classes/ActionDispatch/MiddlewareStack.html @@ -182,17 +182,9 @@

    Attributes

    Class Public methods

    -

    - - new(*args) - -

    +

    new(*args)

    -
    - -
    - @@ -222,17 +214,9 @@

    Instance Public methods

    -

    - - [](i) - -

    +

    [](i)

    -
    - -
    - @@ -257,17 +241,9 @@

    -

    - - build(app = nil, &block) - -

    +

    build(app = nil, &block)

    -
    - -
    - @@ -299,19 +275,13 @@

    -

    - - delete(target) - -

    +

    delete(target)

    - -
    -

    Deletes a middleware from the middleware stack.

    +
    +

    Deletes a middleware from the middleware stack.

    Returns the array of middlewares not including the deleted item, or returns nil if the target is not found.

    -
    - +
    @@ -336,19 +306,13 @@

    -

    - - delete!(target) - -

    +

    delete!(target)

    - -
    -

    Deletes a middleware from the middleware stack.

    +
    +

    Deletes a middleware from the middleware stack.

    Returns the array of middlewares not including the deleted item, or raises RuntimeError if the target is not found.

    -
    - +
    @@ -373,17 +337,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -408,17 +364,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -443,22 +391,16 @@

    -

    - - insert(index, klass, *args, &block) - -

    +

    insert(index, klass, *args, &block)

    -
    - -
    - -
    - Also aliased as: insert_before -
    +

    + Also aliased as: + + insert_before. +

    @@ -483,17 +425,9 @@

    -

    - - insert_after(index, *args, &block) - -

    +

    insert_after(index, *args, &block)

    -
    - -
    - @@ -519,24 +453,17 @@

    -

    - - insert_before(index, klass, *args, &block) - -

    +

    insert_before(index, klass, *args, &block)

    -
    - -
    - -
    - Alias for: insert -
    +

    + Alias for: + insert. +

    @@ -544,17 +471,9 @@

    -

    - - last() - -

    +

    last()

    -
    - -
    - @@ -579,22 +498,16 @@

    -

    - - move(target, source) - -

    +

    move(target, source)

    -
    - -
    - -
    - Also aliased as: move_before -
    +

    + Also aliased as: + + move_before. +

    @@ -622,17 +535,9 @@

    -

    - - move_after(target, source) - -

    +

    move_after(target, source)

    -
    - -
    - @@ -661,24 +566,17 @@

    -

    - - move_before(target, source) - -

    +

    move_before(target, source)

    -
    - -
    - -
    - Alias for: move -
    +

    + Alias for: + move. +

    @@ -686,17 +584,9 @@

    -

    - - size() - -

    +

    size()

    -
    - -
    - @@ -721,17 +611,9 @@

    -

    - - swap(target, *args, &block) - -

    +

    swap(target, *args, &block)

    -
    - -
    - @@ -758,17 +640,9 @@

    -

    - - unshift(klass, *args, &block) - -

    +

    unshift(klass, *args, &block)

    -
    - -
    - @@ -793,17 +667,9 @@

    -

    - - use(klass, *args, &block) - -

    +

    use(klass, *args, &block)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html b/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html index 24120924df..4f47ca6f02 100644 --- a/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html +++ b/src/classes/ActionDispatch/MiddlewareStack/InstrumentationProxy.html @@ -86,17 +86,9 @@

    Constants

    Class Public methods

    -

    - - new(middleware, class_name) - -

    +

    new(middleware, class_name)

    -
    - -
    - @@ -129,17 +121,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/MiddlewareStack/Middleware.html b/src/classes/ActionDispatch/MiddlewareStack/Middleware.html index 83c05bf0f0..20ce37369a 100644 --- a/src/classes/ActionDispatch/MiddlewareStack/Middleware.html +++ b/src/classes/ActionDispatch/MiddlewareStack/Middleware.html @@ -113,17 +113,9 @@

    Attributes

    Class Public methods

    -

    - - new(klass, args, block) - -

    +

    new(klass, args, block)

    -
    - -
    - @@ -154,17 +146,9 @@

    Instance Public methods

    -

    - - ==(middleware) - -

    +

    ==(middleware)

    -
    - -
    - @@ -194,17 +178,9 @@

    -

    - - build(app) - -

    +

    build(app)

    -
    - -
    - @@ -229,17 +205,9 @@

    -

    - - build_instrumented(app) - -

    +

    build_instrumented(app)

    -
    - -
    - @@ -264,17 +232,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -303,17 +263,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ParamBuilder.html b/src/classes/ActionDispatch/ParamBuilder.html index 57be5a4b10..23b1564ed4 100644 --- a/src/classes/ActionDispatch/ParamBuilder.html +++ b/src/classes/ActionDispatch/ParamBuilder.html @@ -101,17 +101,9 @@

    Attributes

    Class Public methods

    -

    - - ignore_leading_brackets() - -

    +

    ignore_leading_brackets()

    -
    - -
    - @@ -140,17 +132,9 @@

    -

    - - ignore_leading_brackets=(value) - -

    +

    ignore_leading_brackets=(value)

    -
    - -
    - @@ -179,17 +163,11 @@

    -

    - - make_default(param_depth_limit) - -

    +

    make_default(param_depth_limit)

    - -
    -

    – This implementation is based on Rack::QueryParser, Copyright © 2007-2021 Leah Neukirchen <leahneukirchen.org/infopage.html>

    -
    - +
    +

    – This implementation is based on Rack::QueryParser, Copyright © 2007-2021 Leah Neukirchen <leahneukirchen.org/infopage.html>

    +
    @@ -214,17 +192,9 @@

    -

    - - new(param_depth_limit) - -

    +

    new(param_depth_limit)

    -
    - -
    - @@ -253,17 +223,9 @@

    Instance Public methods

    -

    - - from_hash(hash, encoding_template: nil) - -

    +

    from_hash(hash, encoding_template: nil)

    -
    - -
    - @@ -298,17 +260,9 @@

    -

    - - from_pairs(pairs, encoding_template: nil) - -

    +

    from_pairs(pairs, encoding_template: nil)

    -
    - -
    - @@ -345,17 +299,9 @@

    -

    - - from_query_string(qs, separator: nil, encoding_template: nil) - -

    +

    from_query_string(qs, separator: nil, encoding_template: nil)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ParamError.html b/src/classes/ActionDispatch/ParamError.html index 9d7815aba2..20fa6d69ea 100644 --- a/src/classes/ActionDispatch/ParamError.html +++ b/src/classes/ActionDispatch/ParamError.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - ===(other) - -

    +

    ===(other)

    -
    - -
    - @@ -106,17 +98,9 @@

    -

    - - new(message = nil) - -

    +

    new(message = nil)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/PermissionsPolicy.html b/src/classes/ActionDispatch/PermissionsPolicy.html index 04370767ec..f2048ace5d 100644 --- a/src/classes/ActionDispatch/PermissionsPolicy.html +++ b/src/classes/ActionDispatch/PermissionsPolicy.html @@ -129,17 +129,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -169,17 +161,9 @@

    Instance Public methods

    -

    - - build(context = nil) - -

    +

    build(context = nil)

    -
    - -
    - @@ -204,17 +188,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html b/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html index 0754788464..4d3e5f8a5d 100644 --- a/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html +++ b/src/classes/ActionDispatch/PermissionsPolicy/Middleware.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/PermissionsPolicy/Request.html b/src/classes/ActionDispatch/PermissionsPolicy/Request.html index 050fae08c4..ebf0d22f49 100644 --- a/src/classes/ActionDispatch/PermissionsPolicy/Request.html +++ b/src/classes/ActionDispatch/PermissionsPolicy/Request.html @@ -75,17 +75,9 @@

    Constants

    Instance Public methods

    -

    - - permissions_policy() - -

    +

    permissions_policy()

    -
    - -
    - @@ -110,17 +102,9 @@

    -

    - - permissions_policy=(policy) - -

    +

    permissions_policy=(policy)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/PublicExceptions.html b/src/classes/ActionDispatch/PublicExceptions.html index 9c357209ea..17b496004c 100644 --- a/src/classes/ActionDispatch/PublicExceptions.html +++ b/src/classes/ActionDispatch/PublicExceptions.html @@ -91,17 +91,9 @@

    Attributes

    Class Public methods

    -

    - - new(public_path) - -

    +

    new(public_path)

    -
    - -
    - @@ -130,17 +122,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/QueryParser.html b/src/classes/ActionDispatch/QueryParser.html index d3f5f89aab..db759afb98 100644 --- a/src/classes/ActionDispatch/QueryParser.html +++ b/src/classes/ActionDispatch/QueryParser.html @@ -91,17 +91,9 @@

    Constants

    Class Public methods

    -

    - - each_pair(s, separator = nil) - -

    +

    each_pair(s, separator = nil)

    -
    - -
    - @@ -148,17 +140,9 @@

    -

    - - strict_query_string_separator() - -

    +

    strict_query_string_separator()

    -
    - -
    - @@ -186,17 +170,9 @@

    -

    - - strict_query_string_separator=(value) - -

    +

    strict_query_string_separator=(value)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/RemoteIp.html b/src/classes/ActionDispatch/RemoteIp.html index 36e768226e..27b2559fcb 100644 --- a/src/classes/ActionDispatch/RemoteIp.html +++ b/src/classes/ActionDispatch/RemoteIp.html @@ -143,21 +143,15 @@

    Attributes

    Class Public methods

    -

    - - new(app, ip_spoofing_check = true, custom_proxies = nil) - -

    +

    new(app, ip_spoofing_check = true, custom_proxies = nil)

    - -
    -

    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.

    -
    - +
    @@ -206,17 +200,11 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    - -
    -

    Since the IP address may not be needed, we store the object here without calculating the IP to keep from slowing down the majority of requests. For those requests that do need to know the IP, the GetIp#calculate_ip method will calculate the memoized client IP address.

    -
    - +
    +

    Since the IP address may not be needed, we store the object here without calculating the IP to keep from slowing down the majority of requests. For those requests that do need to know the IP, the GetIp#calculate_ip method will calculate the memoized client IP address.

    +
    diff --git a/src/classes/ActionDispatch/RemoteIp/GetIp.html b/src/classes/ActionDispatch/RemoteIp/GetIp.html index b7bc8979c3..006d0a4405 100644 --- a/src/classes/ActionDispatch/RemoteIp/GetIp.html +++ b/src/classes/ActionDispatch/RemoteIp/GetIp.html @@ -89,17 +89,9 @@

    Methods

    Class Public methods

    -

    - - new(req, check_ip, proxies) - -

    +

    new(req, check_ip, proxies)

    -
    - -
    - @@ -130,23 +122,17 @@

    Instance Public methods

    -

    - - calculate_ip() - -

    +

    calculate_ip()

    - -
    -

    Sort through the various IP address headers, looking for the IP most likely to be the address of the actual remote client making this request.

    +
    +

    Sort through the various IP address headers, looking for the IP most likely to be the address of the actual remote client making this request.

    REMOTE_ADDR will be correct if the request is made directly against the Ruby process, on e.g. Heroku. When the request is proxied by another server like HAProxy or NGINX, the IP address that made the original request will be put in an X-Forwarded-For header. If there are multiple proxies, that header may contain a list of IPs. Other proxy services set the Client-Ip header instead, so we check that too.

    As discussed in this post about Rails IP Spoofing, while the first IP in the list is likely to be the “originating” IP, it could also have been set by the client maliciously.

    In order to find the first address that is (probably) accurate, we take the list of IPs, remove known and trusted proxies, and then take the last address left, which was presumably set by one of those proxies.

    -
    - +
    @@ -209,17 +195,11 @@

    -

    - - to_s() - -

    +

    to_s()

    - -
    -

    Memoizes the value returned by calculate_ip and returns it for ActionDispatch::Request to use.

    -
    - +
    +

    Memoizes the value returned by calculate_ip and returns it for ActionDispatch::Request to use.

    +
    @@ -247,17 +227,9 @@

    Instance Private methods

    -

    - - filter_proxies(ips) - -

    +

    filter_proxies(ips)

    -
    - -
    - @@ -284,17 +256,9 @@

    -

    - - ips_from(header) - -

    +

    ips_from(header)

    -
    - -
    - @@ -321,17 +285,9 @@

    -

    - - sanitize_ips(ips) - -

    +

    sanitize_ips(ips)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Request.html b/src/classes/ActionDispatch/Request.html index ccffe66d85..d1388215cb 100644 --- a/src/classes/ActionDispatch/Request.html +++ b/src/classes/ActionDispatch/Request.html @@ -462,17 +462,9 @@

    Attributes

    Class Public methods

    -

    - - empty() - -

    +

    empty()

    -
    - -
    - @@ -497,17 +489,9 @@

    -

    - - new(env) - -

    +

    new(env)

    -
    - -
    - @@ -545,22 +529,18 @@

    Instance Public methods

    -

    - - GET() - -

    +

    GET()

    - -
    -

    Override Rack’s GET method to support indifferent access.

    -
    - +
    +

    Override Rack’s GET method to support indifferent access.

    +
    -
    - Also aliased as: query_parameters -
    +

    + Also aliased as: + + query_parameters. +

    @@ -591,22 +571,18 @@

    -

    - - POST() - -

    +

    POST()

    - -
    -

    Override Rack’s POST method to support indifferent access.

    -
    - +
    +

    Override Rack’s POST method to support indifferent access.

    +
    -
    - Also aliased as: request_parameters -
    +

    + Also aliased as: + + request_parameters. +

    @@ -654,17 +630,11 @@

    -

    - - authorization() - -

    +

    authorization()

    - -
    -

    Returns the authorization header regardless of whether it was specified directly or through one of the proxy alternatives.

    -
    - +
    +

    Returns the authorization header regardless of whether it was specified directly or through one of the proxy alternatives.

    +
    @@ -692,17 +662,11 @@

    -

    - - body() - -

    +

    body()

    - -
    -

    The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.

    -
    - +
    +

    The request body is an IO input stream. If the RAW_POST_DATA environment variable is already set, wrap it in a StringIO.

    +
    @@ -732,17 +696,9 @@

    -

    - - commit_csrf_token() - -

    +

    commit_csrf_token()

    -
    - -
    - @@ -767,17 +723,9 @@

    -

    - - commit_flash() - -

    +

    commit_flash()

    -
    - -
    - @@ -801,17 +749,11 @@

    -

    - - content_length() - -

    +

    content_length()

    - -
    -

    Returns the content length of the request as an integer.

    -
    - +
    +

    Returns the content length of the request as an integer.

    +
    @@ -837,17 +779,9 @@

    -

    - - controller_class() - -

    +

    controller_class()

    -
    - -
    - @@ -874,17 +808,9 @@

    -

    - - controller_class_for(name) - -

    +

    controller_class_for(name)

    -
    - -
    - @@ -923,19 +849,13 @@

    -

    - - form_data?() - -

    +

    form_data?()

    - -
    -

    Determine whether the request body contains form-data by checking the request Content-Type for one of the media-types: application/x-www-form-urlencoded or multipart/form-data. The list of form-data media types can be modified through the FORM_DATA_MEDIA_TYPES array.

    +
    +

    Determine whether the request body contains form-data by checking the request Content-Type for one of the media-types: application/x-www-form-urlencoded or multipart/form-data. The list of form-data media types can be modified through the FORM_DATA_MEDIA_TYPES array.

    A request body is not assumed to contain form-data when no Content-Type header is provided and the request_method is POST.

    -
    - +
    @@ -960,15 +880,10 @@

    -

    - - fullpath() - -

    +

    fullpath()

    - -
    -

    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"
    @@ -976,8 +891,7 @@ 

    # get "/articles?page=2" request.fullpath # => "/articles?page=2"

    -
    - +
    @@ -1002,20 +916,14 @@

    -

    - - headers() - -

    +

    headers()

    - -
    -

    Provides access to the request’s HTTP headers, for example:

    +
    +

    Provides access to the request’s HTTP headers, for example:

    request.headers["Content-Type"] # => "text/plain"
     
    -
    - +
    @@ -1040,17 +948,9 @@

    -

    - - http_auth_salt() - -

    +

    http_auth_salt()

    -
    - -
    - @@ -1075,17 +975,11 @@

    -

    - - ip() - -

    +

    ip()

    - -
    -

    Returns the IP address of client as a String.

    -
    - +
    +

    Returns the IP address of client as a String.

    +
    @@ -1110,20 +1004,14 @@

    -

    - - key?(key) - -

    +

    key?(key)

    - -
    -

    Returns true if the request has a header matching the given key parameter.

    +
    +

    Returns true if the request has a header matching the given key parameter.

    request.key? :ip_spoofing_check # => true
     
    -
    - +
    @@ -1148,17 +1036,11 @@

    -

    - - local?() - -

    +

    local?()

    - -
    -

    True if the request came from localhost, 127.0.0.1, or ::1.

    -
    - +
    +

    True if the request came from localhost, 127.0.0.1, or ::1.

    +
    @@ -1183,17 +1065,9 @@

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -1218,21 +1092,15 @@

    -

    - - media_type() - -

    +

    media_type()

    - -
    -

    The String MIME type of the request.

    +
    +

    The String MIME type of the request.

    # get "/articles"
     request.media_type # => "application/x-www-form-urlencoded"
     
    -
    - +
    @@ -1257,19 +1125,13 @@

    -

    - - method(*args) - -

    +

    method(*args)

    - -
    -

    Returns the original value of the environment’s REQUEST_METHOD, even if it was overridden by middleware. See request_method for more information.

    +
    +

    Returns the original value of the environment’s REQUEST_METHOD, even if it was overridden by middleware. See request_method for more information.

    For debugging purposes, when called with arguments this method will fall back to Object#method

    -
    - +
    @@ -1301,17 +1163,11 @@

    -

    - - method_symbol() - -

    +

    method_symbol()

    - -
    -

    Returns a symbol form of the method.

    -
    - +
    +

    Returns a symbol form of the method.

    +
    @@ -1336,15 +1192,10 @@

    -

    - - original_fullpath() - -

    +

    original_fullpath()

    - -
    -

    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'
    @@ -1352,8 +1203,7 @@ 

    # get '/foo?bar' request.original_fullpath # => '/foo?bar'

    -
    - +
    @@ -1378,21 +1228,15 @@

    -

    - - original_url() - -

    +

    original_url()

    - -
    -

    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"
     
    -
    - +
    @@ -1417,24 +1261,17 @@

    -

    - - query_parameters() - -

    +

    query_parameters()

    -
    - -
    - -
    - Alias for: GET -
    +

    + Alias for: + GET. +

    @@ -1442,17 +1279,11 @@

    -

    - - raw_post() - -

    +

    raw_post()

    - -
    -

    Read the request body. This is useful for web services that need to work with raw requests directly.

    -
    - +
    +

    Read the request body. This is useful for web services that need to work with raw requests directly.

    +
    @@ -1480,17 +1311,11 @@

    -

    - - remote_ip() - -

    +

    remote_ip()

    - -
    -

    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.

    +
    @@ -1515,17 +1340,9 @@

    -

    - - remote_ip=(remote_ip) - -

    +

    remote_ip=(remote_ip)

    -
    - -
    - @@ -1551,24 +1368,20 @@

    -

    - - request_id() - -

    +

    request_id()

    - -
    -

    Returns the unique request id, which is based on either the X-Request-Id header that can be generated by a firewall, load balancer, or web server, or by the RequestId middleware (which sets the action_dispatch.request_id environment variable).

    +
    +

    Returns the unique request id, which is based on either the X-Request-Id header that can be generated by a firewall, load balancer, or web server, or by the RequestId middleware (which sets the action_dispatch.request_id environment variable).

    This unique ID is useful for tracing a request from end-to-end as part of logging or debugging. This relies on the Rack variable set by the ActionDispatch::RequestId middleware.

    -
    - +
    -
    - Also aliased as: uuid -
    +

    + Also aliased as: + + uuid. +

    @@ -1592,17 +1405,11 @@

    -

    - - request_method() - -

    +

    request_method()

    - -
    -

    Returns the HTTP method that the application should see. In the case where the method was overridden by a middleware (for instance, if a HEAD request was converted to a GET, or if a _method parameter was used to determine the method the application should use), this method returns the overridden value, not the original.

    -
    - +
    +

    Returns the HTTP method that the application should see. In the case where the method was overridden by a middleware (for instance, if a HEAD request was converted to a GET, or if a _method parameter was used to determine the method the application should use), this method returns the overridden value, not the original.

    +
    @@ -1627,17 +1434,11 @@

    -

    - - request_method_symbol() - -

    +

    request_method_symbol()

    - -
    -

    Returns a symbol form of the request_method.

    -
    - +
    +

    Returns a symbol form of the request_method.

    +
    @@ -1662,24 +1463,17 @@

    -

    - - request_parameters() - -

    +

    request_parameters()

    -
    - -
    - -
    - Alias for: POST -
    +

    + Alias for: + POST. +

    @@ -1687,17 +1481,9 @@

    -

    - - request_parameters=(params) - -

    +

    request_parameters=(params)

    -
    - -
    - @@ -1723,17 +1509,9 @@

    -

    - - request_parameters_list() - -

    +

    request_parameters_list()

    -
    - -
    - @@ -1775,17 +1553,9 @@

    -

    - - reset_csrf_token() - -

    +

    reset_csrf_token()

    -
    - -
    - @@ -1810,17 +1580,9 @@

    -

    - - reset_session() - -

    +

    reset_session()

    -
    - -
    - @@ -1846,20 +1608,14 @@

    -

    - - route_uri_pattern() - -

    +

    route_uri_pattern()

    - -
    -

    Returns the URI pattern of the matched route for the request, using the same format as bin/rails routes:

    +
    +

    Returns the URI pattern of the matched route for the request, using the same format as bin/rails routes:

    request.route_uri_pattern # => "/:controller(/:action(/:id))(.:format)"
     
    -
    - +
    @@ -1890,15 +1646,10 @@

    -

    - - send_early_hints(links) - -

    +

    send_early_hints(links)

    - -
    -

    Early Hints is an HTTP/2 status code that indicates hints to help a client start making preparations for processing the final response.

    +
    +

    Early Hints is an HTTP/2 status code that indicates hints to help a client start making preparations for processing the final response.

    If the env contains rack.early_hints then the server accepts HTTP2 push for link headers.

    @@ -1908,8 +1659,7 @@

    If you are using javascript_include_tag or stylesheet_link_tag the Early Hints headers are included by default if supported.

    -

    - +
    @@ -1934,17 +1684,11 @@

    -

    - - server_software() - -

    +

    server_software()

    - -
    -

    Returns the lowercase name of the HTTP server software.

    -
    - +
    +

    Returns the lowercase name of the HTTP server software.

    +
    @@ -1969,17 +1713,9 @@

    -

    - - session_options=(options) - -

    +

    session_options=(options)

    -
    - -
    - @@ -2004,24 +1740,17 @@

    -

    - - uuid() - -

    +

    uuid()

    -
    - -
    - -
    - Alias for: request_id -
    +

    + Alias for: + request_id. +

    @@ -2029,24 +1758,17 @@

    -

    - - xhr?() - -

    +

    xhr?()

    -
    - -
    - -
    - Alias for: xml_http_request? -
    +

    + Alias for: + xml_http_request?. +

    @@ -2054,22 +1776,18 @@

    -

    - - xml_http_request?() - -

    +

    xml_http_request?()

    - -
    -

    Returns true if the X-Requested-With header contains “XMLHttpRequest” (case-insensitive), which may need to be manually added depending on the choice of JavaScript libraries and frameworks.

    -
    - +
    +

    Returns true if the X-Requested-With header contains “XMLHttpRequest” (case-insensitive), which may need to be manually added depending on the choice of JavaScript libraries and frameworks.

    +
    -
    - Also aliased as: xhr? -
    +

    + Also aliased as: + + xhr?. +

    diff --git a/src/classes/ActionDispatch/RequestCookieMethods.html b/src/classes/ActionDispatch/RequestCookieMethods.html index 43b3db0160..d4171995b0 100644 --- a/src/classes/ActionDispatch/RequestCookieMethods.html +++ b/src/classes/ActionDispatch/RequestCookieMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    - + -
    - -
    - diff --git a/src/classes/ActionDispatch/RequestEncoder/IdentityEncoder.html b/src/classes/ActionDispatch/RequestEncoder/IdentityEncoder.html index 2236f2e28c..9f5c71f2d1 100644 --- a/src/classes/ActionDispatch/RequestEncoder/IdentityEncoder.html +++ b/src/classes/ActionDispatch/RequestEncoder/IdentityEncoder.html @@ -76,17 +76,9 @@

    Methods

    Instance Public methods

    -

    - - accept_header() - -

    +

    accept_header()

    -
    - -
    - @@ -109,17 +101,9 @@

    -

    - - content_type() - -

    +

    content_type()

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - encode_params(params) - -

    +

    encode_params(params)

    -
    - -
    - @@ -175,17 +151,9 @@

    -

    - - response_parser() - -

    +

    response_parser()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/RequestId.html b/src/classes/ActionDispatch/RequestId.html index 01bb2466d2..e2fbb55214 100644 --- a/src/classes/ActionDispatch/RequestId.html +++ b/src/classes/ActionDispatch/RequestId.html @@ -79,17 +79,9 @@

    Methods

    Class Public methods

    -

    - - new(app, header:) - -

    +

    new(app, header:)

    -
    - -
    - @@ -120,17 +112,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Response.html b/src/classes/ActionDispatch/Response.html index 8c56b9d334..c321e055ee 100644 --- a/src/classes/ActionDispatch/Response.html +++ b/src/classes/ActionDispatch/Response.html @@ -426,17 +426,9 @@

    Attributes

    Class Public methods

    -

    - - create(status = 200, headers = {}, body = [], default_headers: self.default_headers) - -

    +

    create(status = 200, headers = {}, body = [], default_headers: self.default_headers)

    -
    - -
    - @@ -462,17 +454,9 @@

    -

    - - merge_default_headers(original, default) - -

    +

    merge_default_headers(original, default)

    -
    - -
    - @@ -497,17 +481,9 @@

    -

    - - new(status = 200, headers = nil, body = []) - -

    +

    new(status = 200, headers = nil, body = [])

    -
    - -
    - @@ -553,17 +529,9 @@

    Instance Public methods

    -

    - - abort() - -

    +

    abort()

    -
    - -
    - @@ -594,17 +562,9 @@

    -

    - - await_commit() - -

    +

    await_commit()

    -
    - -
    - @@ -631,17 +591,9 @@

    -

    - - await_sent() - -

    +

    await_sent()

    -
    - -
    - @@ -666,17 +618,11 @@

    -

    - - body() - -

    +

    body()

    - -
    -

    Returns the content of the response as a string. This contains the contents of any calls to render.

    -
    - +
    +

    Returns the content of the response as a string. This contains the contents of any calls to render.

    +
    @@ -707,17 +653,11 @@

    -

    - - body=(body) - -

    +

    body=(body)

    - -
    -

    Allows you to manually set or override the response body.

    -
    - +
    +

    Allows you to manually set or override the response body.

    +
    @@ -753,17 +693,9 @@

    -

    - - body_parts() - -

    +

    body_parts()

    -
    - -
    - @@ -790,17 +722,11 @@

    -

    - - charset() - -

    +

    charset()

    - -
    -

    The charset of the response. HTML wants to know the encoding of the content you’re giving them, so we need to send that along.

    -
    - +
    +

    The charset of the response. HTML wants to know the encoding of the content you’re giving them, so we need to send that along.

    +
    @@ -826,21 +752,15 @@

    -

    - - charset=(charset) - -

    +

    charset=(charset)

    - -
    -

    Sets the HTTP character set. In case of nil parameter it sets the charset to default_charset.

    +
    +

    Sets the HTTP character set. In case of nil parameter it sets the charset to default_charset.

    response.charset = 'utf-16' # => 'utf-16'
     response.charset = nil      # => 'utf-8'
     
    -
    - +
    @@ -870,17 +790,9 @@

    -

    - - close() - -

    +

    close()

    -
    - -
    - @@ -905,17 +817,11 @@

    -

    - - code() - -

    +

    code()

    - -
    -

    Returns a string to ensure compatibility with Net::HTTPResponse.

    -
    - +
    +

    Returns a string to ensure compatibility with Net::HTTPResponse.

    +
    @@ -940,17 +846,9 @@

    -

    - - commit!() - -

    +

    commit!()

    -
    - -
    - @@ -979,17 +877,9 @@

    -

    - - committed?() - -

    +

    committed?()

    -
    - -
    - @@ -1012,17 +902,11 @@

    -

    - - content_type() - -

    +

    content_type()

    - -
    -

    Content type of response.

    -
    - +
    +

    Content type of response.

    +
    @@ -1047,15 +931,10 @@

    -

    - - content_type=(content_type) - -

    +

    content_type=(content_type)

    - -
    -

    Sets the HTTP response’s content MIME type. For example, in the controller you could write this:

    +
    +

    Sets the HTTP response’s content MIME type. For example, in the controller you could write this:

    response.content_type = "text/html"
     
    @@ -1066,8 +945,7 @@

    If a character set has been defined for this response (see charset=) then the character set information will also be included in the content type information.

    -

    - +
    @@ -1106,20 +984,14 @@

    -

    - - cookies() - -

    +

    cookies()

    - -
    -

    Returns the response cookies, converted to a Hash of (name => value) pairs

    +
    +

    Returns the response cookies, converted to a Hash of (name => value) pairs

    assert_equal 'AuthorOfNewPage', r.cookies['author']
     
    -
    - +
    @@ -1154,17 +1026,9 @@

    -

    - - delete_header(key) - -

    +

    delete_header(key)

    -
    - -
    - @@ -1187,17 +1051,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -1225,17 +1081,9 @@

    -

    - - get_header(key) - -

    +

    get_header(key)

    -
    - -
    - @@ -1258,17 +1106,9 @@

    -

    - - has_header?(key) - -

    +

    has_header?(key)

    -
    - -
    - @@ -1291,22 +1131,18 @@

    -

    - - location - -

    +

    location

    - -
    -

    Location of the response.

    -
    - +
    +

    Location of the response.

    +
    -
    - Also aliased as: redirect_url -
    +

    + Also aliased as: + + redirect_url. +

    @@ -1318,18 +1154,12 @@

    -

    - - location=(location) - - -

    +

    location=(location) +

    - -
    -

    Sets the location of the response

    -
    - +
    +

    Sets the location of the response

    +
    @@ -1342,17 +1172,11 @@

    -

    - - media_type() - -

    +

    media_type()

    - -
    -

    Media type of response.

    -
    - +
    +

    Media type of response.

    +
    @@ -1377,15 +1201,10 @@

    -

    - - message() - -

    +

    message()

    - -
    -

    Returns the corresponding message for the current HTTP status code:

    +
    +

    Returns the corresponding message for the current HTTP status code:

    response.status = 200
     response.message # => "OK"
    @@ -1393,13 +1212,14 @@ 

    response.status = 404 response.message # => "Not Found"

    -
    - +
    -
    - Also aliased as: status_message -
    +

    + Also aliased as: + + status_message. +

    @@ -1423,24 +1243,17 @@

    -

    - - prepare!() - -

    +

    prepare!()

    -
    - -
    - -
    - Alias for: to_a -
    +

    + Alias for: + to_a. +

    @@ -1448,24 +1261,19 @@

    -

    - - redirect_url - -

    +

    redirect_url

    - -
    -

    The location header we’ll be responding with.

    -
    - +
    +

    The location header we’ll be responding with.

    +
    -
    - Alias for: location -
    +

    + Alias for: + location. +

    @@ -1473,17 +1281,9 @@

    -

    - - reset_body!() - -

    +

    reset_body!()

    -
    - -
    - @@ -1508,17 +1308,11 @@

    -

    - - response_code() - -

    +

    response_code()

    - -
    -

    The response code of the request.

    -
    - +
    +

    The response code of the request.

    +
    @@ -1543,17 +1337,11 @@

    -

    - - send_file(path) - -

    +

    send_file(path)

    - -
    -

    Send the file stored at path as the response body.

    -
    - +
    +

    Send the file stored at path as the response body.

    +
    @@ -1579,17 +1367,9 @@

    -

    - - sending!() - -

    +

    sending!()

    -
    - -
    - @@ -1618,17 +1398,9 @@

    -

    - - sending?() - -

    +

    sending?()

    -
    - -
    - @@ -1651,17 +1423,9 @@

    -

    - - sending_file=(v) - -

    +

    sending_file=(v)

    -
    - -
    - @@ -1688,17 +1452,9 @@

    -

    - - sent!() - -

    +

    sent!()

    -
    - -
    - @@ -1726,17 +1482,9 @@

    -

    - - sent?() - -

    +

    sent?()

    -
    - -
    - @@ -1759,17 +1507,9 @@

    -

    - - set_header(key, v) - -

    +

    set_header(key, v)

    -
    - -
    - @@ -1792,17 +1532,11 @@

    -

    - - status=(status) - -

    +

    status=(status)

    - -
    -

    Sets the HTTP status code.

    -
    - +
    +

    Sets the HTTP status code.

    +
    @@ -1827,24 +1561,17 @@

    -

    - - status_message() - -

    +

    status_message()

    -
    - -
    - -
    - Alias for: message -
    +

    + Alias for: + message. +

    @@ -1852,25 +1579,21 @@

    -

    - - to_a() - -

    +

    to_a()

    - -
    -

    Turns the Response into a Rack-compatible array of the status, headers, and body. Allows explicit splatting:

    +
    +

    Turns the Response into a Rack-compatible array of the status, headers, and body. Allows explicit splatting:

    status, headers, body = *response
     
    -
    - +
    -
    - Also aliased as: prepare! -
    +

    + Also aliased as: + + prepare!. +

    @@ -1895,17 +1618,9 @@

    -

    - - write(string) - -

    +

    write(string)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Response/RackBody.html b/src/classes/ActionDispatch/Response/RackBody.html index 46b3830a50..259403c48d 100644 --- a/src/classes/ActionDispatch/Response/RackBody.html +++ b/src/classes/ActionDispatch/Response/RackBody.html @@ -118,17 +118,9 @@

    Attributes

    Class Public methods

    -

    - - new(response) - -

    +

    new(response)

    -
    - -
    - @@ -157,17 +149,9 @@

    Instance Public methods

    -

    - - body() - -

    +

    body()

    -
    - -
    - @@ -192,17 +176,9 @@

    -

    - - call(*arguments, &block) - -

    +

    call(*arguments, &block)

    -
    - -
    - @@ -227,17 +203,9 @@

    -

    - - close() - -

    +

    close()

    -
    - -
    - @@ -264,17 +232,9 @@

    -

    - - each(*args, &block) - -

    +

    each(*args, &block)

    -
    - -
    - @@ -299,17 +259,9 @@

    -

    - - respond_to?(method, include_private = false) - -

    +

    respond_to?(method, include_private = false)

    -
    - -
    - @@ -338,17 +290,9 @@

    -

    - - to_ary() - -

    +

    to_ary()

    -
    - -
    - @@ -373,17 +317,9 @@

    -

    - - to_path() - -

    +

    to_path()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html index d1aeb61c0f..c1c4ecdee3 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Base.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -126,17 +118,9 @@

    Instance Public methods

    - + -
    - -
    - @@ -160,17 +144,9 @@
    -

    - - header(routes) - -

    +

    header(routes)

    -
    - -
    - @@ -194,17 +170,9 @@

    -

    - - no_routes(engine, routes, filter) - -

    +

    no_routes(engine, routes, filter)

    -
    - -
    - @@ -248,17 +216,9 @@

    -

    - - result() - -

    +

    result()

    -
    - -
    - @@ -283,17 +243,9 @@

    -

    - - section(routes) - -

    +

    section(routes)

    -
    - -
    - @@ -317,17 +269,9 @@

    -

    - - section_title(title) - -

    +

    section_title(title)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html index de835e3206..4ce67cebf8 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Expanded.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(width: IO.console_size[1]) - -

    +

    new(width: IO.console_size[1])

    -
    - -
    - @@ -115,17 +107,9 @@

    Instance Public methods

    - + -
    - -
    - @@ -150,17 +134,9 @@
    -

    - - section(routes) - -

    +

    section(routes)

    -
    - -
    - @@ -185,17 +161,9 @@

    -

    - - section_title(title) - -

    +

    section_title(title)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html index 4e89243c0a..06fa9035ef 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Sheet.html @@ -76,17 +76,9 @@

    Methods

    Instance Public methods

    - + -
    - -
    - @@ -111,17 +103,9 @@
    -

    - - header(routes) - -

    +

    header(routes)

    -
    - -
    - @@ -146,17 +130,9 @@

    -

    - - section(routes) - -

    +

    section(routes)

    -
    - -
    - @@ -181,17 +157,9 @@

    -

    - - section_title(title) - -

    +

    section_title(title)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html index 0f14b1bc52..ba85fb3e7b 100644 --- a/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html +++ b/src/classes/ActionDispatch/Routing/ConsoleFormatter/Unused.html @@ -68,17 +68,9 @@

    Methods

    Instance Public methods

    -

    - - header(routes) - -

    +

    header(routes)

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - no_routes(engine, routes, filter) - -

    +

    no_routes(engine, routes, filter)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html b/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html index 283f452ca3..519b416362 100644 --- a/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html +++ b/src/classes/ActionDispatch/Routing/HtmlTableFormatter.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new(view) - -

    +

    new(view)

    -
    - -
    - @@ -127,17 +119,9 @@

    Instance Public methods

    - + -
    - -
    - @@ -161,17 +145,11 @@
    -

    - - header(routes) - -

    +

    header(routes)

    - -
    -

    The header is part of the HTML page, so we don’t construct it here.

    -
    - +
    +

    The header is part of the HTML page, so we don’t construct it here.

    +
    @@ -195,17 +173,9 @@

    -

    - - no_routes(*) - -

    +

    no_routes(*)

    -
    - -
    - @@ -239,17 +209,9 @@

    -

    - - result() - -

    +

    result()

    -
    - -
    - @@ -276,17 +238,9 @@

    -

    - - section(routes) - -

    +

    section(routes)

    -
    - -
    - @@ -311,17 +265,9 @@

    -

    - - section_title(title) - -

    +

    section_title(title)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/Mapper.html b/src/classes/ActionDispatch/Routing/Mapper.html index 5f7df2eca3..0ec3704b9f 100644 --- a/src/classes/ActionDispatch/Routing/Mapper.html +++ b/src/classes/ActionDispatch/Routing/Mapper.html @@ -165,17 +165,9 @@

    Constants

    Class Public methods

    -

    - - normalize_name(name) - -

    +

    normalize_name(name)

    -
    - -
    - @@ -200,17 +192,11 @@

    -

    - - normalize_path(path) - -

    +

    normalize_path(path)

    - -
    -

    Invokes Journey::Router::Utils.normalize_path, then ensures that /(:locale) becomes (/:locale). Except for root cases, where the former is the correct one.

    -
    - +
    +

    Invokes Journey::Router::Utils.normalize_path, then ensures that /(:locale) becomes (/:locale). Except for root cases, where the former is the correct one.

    +
    diff --git a/src/classes/ActionDispatch/Routing/Mapper/Base.html b/src/classes/ActionDispatch/Routing/Mapper/Base.html index f345bed202..0477149e67 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Base.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Base.html @@ -78,24 +78,17 @@

    Methods

    Instance Public methods

    -

    - - default_url_options(options) - -

    +

    default_url_options(options)

    -
    - -
    - -
    - Alias for: default_url_options= -
    +

    + Alias for: + default_url_options=. +

    @@ -103,22 +96,16 @@

    -

    - - default_url_options=(options) - -

    +

    default_url_options=(options)

    -
    - -
    - -
    - Also aliased as: default_url_options -
    +

    + Also aliased as: + + default_url_options. +

    @@ -142,17 +129,11 @@

    -

    - - has_named_route?(name) - -

    +

    has_named_route?(name)

    - -
    -

    Query if the following named route was already defined.

    -
    - +
    +

    Query if the following named route was already defined.

    +
    @@ -177,15 +158,10 @@

    -

    - - match(path, options = nil) - -

    +

    match(path, options = nil)

    - -
    -

    Matches a URL pattern to one or more routes.

    +
    +

    Matches a URL pattern to one or more routes.

    You should not use the match method in your router without specifying an HTTP method.

    @@ -363,8 +339,7 @@

    Options

    Allows you to specify the default value for optional format segment or disable it by supplying false.

    -
    - +
    @@ -388,15 +363,10 @@

    Options

    -

    - - mount(app = nil, deprecated_options = nil, as: DEFAULT, via: nil, at: nil, defaults: nil, constraints: nil, anchor: false, format: false, path: nil, internal: nil, **mapping, &block) - -

    +

    mount(app = nil, deprecated_options = nil, as: DEFAULT, via: nil, at: nil, defaults: nil, constraints: nil, anchor: false, format: false, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Mount a Rack-based application to be used within the application.

    +
    +

    Mount a Rack-based application to be used within the application.

    mount SomeRackApp, at: "some_route"
     
    @@ -409,8 +379,7 @@

    This will generate the exciting_path and exciting_url helpers which can be used to navigate to this mounted app.

    -

    - +
    @@ -476,17 +445,9 @@

    -

    - - with_default_scope(scope, &block) - -

    +

    with_default_scope(scope, &block)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/Mapper/Concerns.html b/src/classes/ActionDispatch/Routing/Mapper/Concerns.html index 90054708d1..7d324c063a 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Concerns.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Concerns.html @@ -89,15 +89,10 @@

    Methods

    Instance Public methods

    -

    - - concern(name, callable = nil, &block) - -

    +

    concern(name, callable = nil, &block)

    - -
    -

    Define a routing concern using a name.

    +
    +

    Define a routing concern using a name.

    Concerns may be defined inline, using a block, or handled by another object, by passing that object as the second parameter.

    @@ -147,8 +142,7 @@

    Any routing helpers can be used inside a concern. If using a callable, they’re accessible from the Mapper that’s passed to call.

    -

    - +
    @@ -174,15 +168,10 @@

    -

    - - concerns(*args, **options) - -

    +

    concerns(*args, **options)

    - -
    -

    Use the named concerns

    +
    +

    Use the named concerns

    resources :posts do
       concerns :commentable
    @@ -195,8 +184,7 @@ 

    concerns :commentable end

    -
    - +
    diff --git a/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html b/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html index 918b7d317e..6087ef4b9e 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html +++ b/src/classes/ActionDispatch/Routing/Mapper/CustomUrls.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - direct(name, options = {}, &block) - -

    +

    direct(name, options = {}, &block)

    - -
    -

    Define custom URL helpers that will be added to the application’s routes. This allows you to override and/or replace the default behavior of routing helpers, e.g:

    +
    +

    Define custom URL helpers that will be added to the application’s routes. This allows you to override and/or replace the default behavior of routing helpers, e.g:

    direct :homepage do
       "https://rubyonrails.org"
    @@ -115,8 +110,7 @@ 

    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.

    -

    - +
    @@ -145,15 +139,10 @@

    -

    - - resolve(*args, &block) - -

    +

    resolve(*args, &block)

    - -
    -

    Define custom polymorphic mappings of models to URLs. This alters the behavior of polymorphic_url and consequently the behavior of link_to, form_with and form_for when passed a model instance, e.g:

    +
    +

    Define custom polymorphic mappings of models to URLs. This alters the behavior of polymorphic_url and consequently the behavior of link_to, form_with and form_for when passed a model instance, e.g:

    resource :basket
     
    @@ -191,8 +180,7 @@ 

    This generates the URL “/basket#items” because when the last item in an array passed to polymorphic_url is a hash then it’s treated as options to the URL helper that gets called.

    NOTE: The resolve 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/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html b/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html index 5a2a5c447a..ee188795a7 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html +++ b/src/classes/ActionDispatch/Routing/Mapper/HttpHelpers.html @@ -82,20 +82,14 @@

    Methods

    Instance Public methods

    -

    - - connect(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: false, format: false, path: nil, internal: nil, **mapping, &block) - -

    +

    connect(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: false, format: false, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that recognizes HTTP CONNECT (and GET) requests. More specifically this recognizes HTTP/1 protocol upgrade requests and HTTP/2 CONNECT requests with the protocol pseudo header. For supported arguments, see match

    +
    +

    Define a route that recognizes HTTP CONNECT (and GET) requests. More specifically this recognizes HTTP/1 protocol upgrade requests and HTTP/2 CONNECT requests with the protocol pseudo header. For supported arguments, see match

    connect 'live', to: 'live#index'
     
    -
    - +
    @@ -136,20 +130,14 @@

    -

    - - delete(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block) - -

    +

    delete(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that only recognizes HTTP DELETE. For supported arguments, see match

    +
    +

    Define a route that only recognizes HTTP DELETE. For supported arguments, see match

    delete 'broccoli', to: 'food#broccoli'
     
    -
    - +
    @@ -190,20 +178,14 @@

    -

    - - get(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block) - -

    +

    get(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that only recognizes HTTP GET. For supported arguments, see match

    +
    +

    Define a route that only recognizes HTTP GET. For supported arguments, see match

    get 'bacon', to: 'food#bacon'
     
    -
    - +
    @@ -244,20 +226,14 @@

    -

    - - options(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: false, format: false, path: nil, internal: nil, **mapping, &block) - -

    +

    options(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: false, format: false, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that only recognizes HTTP OPTIONS. For supported arguments, see match

    +
    +

    Define a route that only recognizes HTTP OPTIONS. For supported arguments, see match

    options 'carrots', to: 'food#carrots'
     
    -
    - +
    @@ -298,20 +274,14 @@

    -

    - - patch(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block) - -

    +

    patch(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that only recognizes HTTP PATCH. For supported arguments, see match

    +
    +

    Define a route that only recognizes HTTP PATCH. For supported arguments, see match

    patch 'bacon', to: 'food#bacon'
     
    -
    - +
    @@ -352,20 +322,14 @@

    -

    - - post(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block) - -

    +

    post(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that only recognizes HTTP POST. For supported arguments, see match

    +
    +

    Define a route that only recognizes HTTP POST. For supported arguments, see match

    post 'bacon', to: 'food#bacon'
     
    -
    - +
    @@ -406,20 +370,14 @@

    -

    - - put(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block) - -

    +

    put(*path_or_actions, as: DEFAULT, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Define a route that only recognizes HTTP PUT. For supported arguments, see match

    +
    +

    Define a route that only recognizes HTTP PUT. For supported arguments, see match

    put 'bacon', to: 'food#bacon'
     
    -
    - +
    diff --git a/src/classes/ActionDispatch/Routing/Mapper/Resources.html b/src/classes/ActionDispatch/Routing/Mapper/Resources.html index 1c5fcacb89..dcab1e3a9b 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Resources.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Resources.html @@ -185,15 +185,10 @@

    Constants

    Instance Public methods

    -

    - - collection(&block) - -

    +

    collection(&block)

    - -
    -

    To add a route to the collection:

    +
    +

    To add a route to the collection:

    resources :photos do
       collection do
    @@ -203,8 +198,7 @@ 

    This will enable Rails to recognize paths such as /photos/search with GET, and route to the search action of PhotosController. It will also create the search_photos_url and search_photos_path route helpers.

    -
    - +
    @@ -235,15 +229,10 @@

    -

    - - draw(name) - -

    +

    draw(name)

    - -
    -

    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
    @@ -261,8 +250,7 @@ 

    CAUTION: Use this feature with care. Having multiple routes files can negatively impact discoverability and readability. For most applications —even those with a few hundred routes — it’s easier for developers to have a single routes file.

    -
    - +
    @@ -299,21 +287,15 @@

    -

    - - match(*path_or_actions, as: DEFAULT, via: nil, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block) - -

    +

    match(*path_or_actions, as: DEFAULT, via: nil, to: nil, controller: nil, action: nil, on: nil, defaults: nil, constraints: nil, anchor: nil, format: nil, path: nil, internal: nil, **mapping, &block)

    - -
    -

    Matches a URL pattern to one or more routes. For more information, see match.

    +
    +

    Matches a URL pattern to one or more routes. For more information, see match.

    match 'path', to: 'controller#action', via: :post
     match 'otherpath', on: :member, via: :get
     
    -
    - +
    @@ -387,15 +369,10 @@

    -

    - - member(&block) - -

    +

    member(&block)

    - -
    -

    To add a member route, add a member block into the resource block:

    +
    +

    To add a member route, add a member block into the resource block:

    resources :photos do
       member do
    @@ -405,8 +382,7 @@ 

    This will recognize /photos/1/preview with GET, and route to the preview action of PhotosController. It will also create the preview_photo_url and preview_photo_path helpers.

    -
    - +
    @@ -443,17 +419,11 @@

    -

    - - namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block) - -

    +

    namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block)

    - - - + @@ -482,17 +452,9 @@

    -

    - - nested(&block) - -

    +

    nested(&block)

    -
    - -
    - @@ -533,17 +495,9 @@

    -

    - - new(&block) - -

    +

    new(&block)

    -
    - -
    - @@ -574,15 +528,10 @@

    -

    - - resource(*resources, concerns: nil, **options, &block) - -

    +

    resource(*resources, concerns: nil, **options, &block)

    - -
    -

    Sometimes, you have a resource that clients always look up without referencing an ID. A common example, /profile always shows the profile of the currently logged in user. In this case, you can use a singular resource to map /profile (rather than /profile/:id) to the show action:

    +
    +

    Sometimes, you have a resource that clients always look up without referencing an ID. A common example, /profile always shows the profile of the currently logged in user. In this case, you can use a singular resource to map /profile (rather than /profile/:id) to the show action:

    resource :profile
     
    @@ -609,8 +558,7 @@

    Options

    Takes same options as resources

    -
    - +
    @@ -663,15 +611,10 @@

    Options

    -

    - - resources(*resources, concerns: nil, **options, &block) - -

    +

    resources(*resources, concerns: nil, **options, &block)

    - -
    -

    In Rails, a resourceful route provides a mapping between HTTP verbs and URLs and controller actions. By convention, each action also maps to particular CRUD operations in a database. A single entry in the routing file, such as

    +
    +

    In Rails, a resourceful route provides a mapping between HTTP verbs and URLs and controller actions. By convention, each action also maps to particular CRUD operations in a database. A single entry in the routing file, such as

    resources :photos
     
    @@ -826,8 +769,7 @@

    Examples

    # resource actions are at /admin/posts. resources :posts, path: "admin/posts"
    -
    - +
    @@ -881,17 +823,9 @@

    Examples

    -

    - - resources_path_names(options) - -

    +

    resources_path_names(options)

    -
    - -
    - @@ -916,15 +850,10 @@

    -

    - - root(path, options = {}) - -

    +

    root(path, options = {})

    - -
    -

    You can specify what Rails should route “/” to with the root method:

    +
    +

    You can specify what Rails should route “/” to with the root method:

    root to: 'pages#main'
     
    @@ -937,8 +866,7 @@

    You should put the root route at the top of config/routes.rb, because this means it will be matched first. As this is the most popular route of most Rails applications, this is beneficial.

    -

    - +
    @@ -979,17 +907,9 @@

    -

    - - shallow() - -

    +

    shallow()

    -
    - -
    - @@ -1017,17 +937,9 @@

    -

    - - shallow?() - -

    +

    shallow?()

    -
    - -
    - @@ -1055,17 +967,9 @@

    Instance Private methods

    -

    - - api_only?() - -

    +

    api_only?()

    -
    - -
    - @@ -1090,17 +994,9 @@

    -

    - - set_member_mappings_for_resource() - -

    +

    set_member_mappings_for_resource()

    -
    - -
    - @@ -1133,17 +1029,9 @@

    -

    - - with_scope_level(kind) - -

    +

    with_scope_level(kind)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/Mapper/Scoping.html b/src/classes/ActionDispatch/Routing/Mapper/Scoping.html index 8efb8f243a..9dbc8a503b 100644 --- a/src/classes/ActionDispatch/Routing/Mapper/Scoping.html +++ b/src/classes/ActionDispatch/Routing/Mapper/Scoping.html @@ -131,15 +131,10 @@

    Methods

    Instance Public methods

    -

    - - constraints(constraints = {}, &block) - -

    +

    constraints(constraints = {}, &block)

    - -
    -

    Parameter Restriction

    +
    +

    Parameter Restriction

    Allows you to constrain the nested routes based on a set of rules. For instance, in order to change the routes to allow for a dot character in the id parameter:

    @@ -196,8 +191,7 @@

    Dynamic request mat resources :iphones end -

    - +
    @@ -222,22 +216,16 @@

    Dynamic request mat

    -

    - - controller(controller) - -

    +

    controller(controller)

    - -
    -

    Scopes routes to a specific controller

    +
    +

    Scopes routes to a specific controller

    controller "food" do
       match "bacon", action: :bacon, via: :get
     end
     
    -
    - +
    @@ -265,15 +253,10 @@

    -

    - - defaults(defaults = {}) - -

    +

    defaults(defaults = {})

    - -
    -

    Allows you to set default parameters for a route, such as this:

    +
    +

    Allows you to set default parameters for a route, such as this:

    defaults id: 'home' do
       match 'scoped_pages/(:id)', to: 'pages#show'
    @@ -281,8 +264,7 @@ 

    Using this, the :id parameter here will default to ‘home’.

    -
    - +
    @@ -310,15 +292,10 @@

    -

    - - namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block) - -

    +

    namespace(name, deprecated_options = nil, as: DEFAULT, path: DEFAULT, shallow_path: DEFAULT, shallow_prefix: DEFAULT, **options, &block)

    - -
    -

    Scopes routes to a specific namespace. For example:

    +
    +

    Scopes routes to a specific namespace. For example:

    namespace :admin do
       resources :posts
    @@ -357,8 +334,7 @@ 

    Options

    resources :posts end
    -
    - +
    @@ -400,15 +376,10 @@

    Options

    -

    - - scope(*args, only: nil, except: nil, **options) - -

    +

    scope(*args, only: nil, except: nil, **options)

    - -
    -

    Scopes a set of routes to the given default options.

    +
    +

    Scopes a set of routes to the given default options.

    Take the following route definition as an example:

    @@ -438,8 +409,7 @@

    Options

    resources :posts end -
    - +
    diff --git a/src/classes/ActionDispatch/Routing/PathRedirect.html b/src/classes/ActionDispatch/Routing/PathRedirect.html index f5df97e75e..f48a06a4ca 100644 --- a/src/classes/ActionDispatch/Routing/PathRedirect.html +++ b/src/classes/ActionDispatch/Routing/PathRedirect.html @@ -81,17 +81,9 @@

    Constants

    Instance Public methods

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -116,17 +108,9 @@

    -

    - - path(params, request) - -

    +

    path(params, request)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html b/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html index 1b45ccf227..54e9f9a14a 100644 --- a/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html +++ b/src/classes/ActionDispatch/Routing/PolymorphicRoutes.html @@ -120,17 +120,11 @@

    Methods

    Instance Public methods

    -

    - - polymorphic_path(record_or_hash_or_array, options = {}) - -

    +

    polymorphic_path(record_or_hash_or_array, options = {})

    - -
    -

    Returns the path component of a URL for the given record.

    -
    - +
    +

    Returns the path component of a URL for the given record.

    +
    @@ -173,15 +167,10 @@

    -

    - - polymorphic_url(record_or_hash_or_array, options = {}) - -

    +

    polymorphic_url(record_or_hash_or_array, options = {})

    - -
    -

    Constructs a call to a named RESTful route for the given record and returns the resulting URL string. For example:

    +
    +

    Constructs a call to a named RESTful route for the given record and returns the resulting URL string. For example:

    # calls post_url(post)
     polymorphic_url(post) # => "http://example.com/posts/1"
    @@ -223,8 +212,7 @@ 

    Functionality

    # the class of a record will also map to the collection polymorphic_url(Comment) # same as comments_url()
    -
    - +
    diff --git a/src/classes/ActionDispatch/Routing/Redirection.html b/src/classes/ActionDispatch/Routing/Redirection.html index 23f4b41de1..9ddcd8bf2c 100644 --- a/src/classes/ActionDispatch/Routing/Redirection.html +++ b/src/classes/ActionDispatch/Routing/Redirection.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - redirect(*args, &block) - -

    +

    redirect(*args, &block)

    - -
    -

    Redirect any path to another path:

    +
    +

    Redirect any path to another path:

    get "/stories" => redirect("/posts")
     
    @@ -110,8 +105,7 @@

    get 'accounts/:name' => redirect(SubdomainRedirector.new('api'))
     
    -

    - +
    diff --git a/src/classes/ActionDispatch/Routing/RouteSet.html b/src/classes/ActionDispatch/Routing/RouteSet.html index 8d5f84ecc2..bea1673d39 100644 --- a/src/classes/ActionDispatch/Routing/RouteSet.html +++ b/src/classes/ActionDispatch/Routing/RouteSet.html @@ -72,15 +72,10 @@

    Methods

    Instance Public methods

    -

    - - from_requirements(requirements) - -

    +

    from_requirements(requirements)

    - -
    -

    Returns a Route matching the given requirements, or nil if none are found.

    +
    +

    Returns a Route matching the given requirements, or nil if none are found.

    This is intended for use by tools such as Language Servers.

    @@ -91,8 +86,7 @@

    Then the following will return the Route for the show action:

    Rails.application.routes.from_requirements(controller: “posts”, action: “show”)

    -

    - +
    diff --git a/src/classes/ActionDispatch/Routing/UrlFor.html b/src/classes/ActionDispatch/Routing/UrlFor.html index 4c75011eb3..a54eed89e7 100644 --- a/src/classes/ActionDispatch/Routing/UrlFor.html +++ b/src/classes/ActionDispatch/Routing/UrlFor.html @@ -160,17 +160,9 @@

    Included Modules

    Class Public methods

    -

    - - new(...) - -

    +

    new(...)

    -
    - -
    - @@ -200,15 +192,10 @@

    Instance Public methods

    -

    - - route_for(name, *args) - -

    +

    route_for(name, *args)

    - -
    -

    Allows calling direct or regular named route.

    +
    +

    Allows calling direct or regular named route.

    resources :buckets
     
    @@ -226,8 +213,7 @@ 

    threadable_path(threadable)  # => "/buckets/1"
     threadable_url(threadable)   # => "http://example.com/buckets/1"
     
    -

    - +
    @@ -252,15 +238,10 @@

    -

    - - url_for(options = nil) - -

    +

    url_for(options = nil)

    - -
    -

    Generate a URL based on the options provided, default_url_options, and the routes defined in config/routes.rb. The following options are supported:

    +
    +

    Generate a URL based on the options provided, default_url_options, and the routes defined in config/routes.rb. The following options are supported:

    • :only_path - If true, the relative URL is returned. Defaults to false.

    • @@ -311,8 +292,7 @@

      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.

      -

    - +
    @@ -337,17 +317,11 @@

    -

    - - url_options() - -

    +

    url_options()

    - -
    -

    Hook overridden in controller to add request information with default_url_options. Application logic should not go into url_options.

    -
    - +
    +

    Hook overridden in controller to add request information with default_url_options. Application logic should not go into url_options.

    +
    @@ -375,17 +349,9 @@

    Instance Protected methods

    -

    - - optimize_routes_generation?() - -

    +

    optimize_routes_generation?()

    -
    - -
    - @@ -413,17 +379,9 @@

    Instance Private methods

    -

    - - _routes_context() - -

    +

    _routes_context()

    -
    - -
    - @@ -448,17 +406,9 @@

    -

    - - _with_routes(routes) - -

    +

    _with_routes(routes)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ServerTiming.html b/src/classes/ActionDispatch/ServerTiming.html index 384eda1773..7ab7f9d6f3 100644 --- a/src/classes/ActionDispatch/ServerTiming.html +++ b/src/classes/ActionDispatch/ServerTiming.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -108,17 +100,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Session/AbstractSecureStore.html b/src/classes/ActionDispatch/Session/AbstractSecureStore.html index 22acd8633b..a345384b95 100644 --- a/src/classes/ActionDispatch/Session/AbstractSecureStore.html +++ b/src/classes/ActionDispatch/Session/AbstractSecureStore.html @@ -86,17 +86,9 @@

    Included Modules

    Instance Public methods

    -

    - - generate_sid() - -

    +

    generate_sid()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Session/CacheStore.html b/src/classes/ActionDispatch/Session/CacheStore.html index ebc7b1ccc1..3b7d750928 100644 --- a/src/classes/ActionDispatch/Session/CacheStore.html +++ b/src/classes/ActionDispatch/Session/CacheStore.html @@ -92,17 +92,9 @@

    Methods

    Class Public methods

    -

    - - new(app, options = {}) - -

    +

    new(app, options = {})

    -
    - -
    - @@ -134,17 +126,11 @@

    Instance Public methods

    -

    - - delete_session(env, sid, options) - -

    +

    delete_session(env, sid, options)

    - -
    -

    Remove a session from the cache.

    -
    - +
    +

    Remove a session from the cache.

    +
    @@ -171,17 +157,11 @@

    -

    - - find_session(env, sid) - -

    +

    find_session(env, sid)

    - -
    -

    Get a session from the cache.

    -
    - +
    +

    Get a session from the cache.

    +
    @@ -209,17 +189,11 @@

    -

    - - write_session(env, sid, session, options) - -

    +

    write_session(env, sid, session, options)

    - -
    -

    Set a session in the cache.

    -
    - +
    +

    Set a session in the cache.

    +
    diff --git a/src/classes/ActionDispatch/Session/Compatibility.html b/src/classes/ActionDispatch/Session/Compatibility.html index 62926f6829..1d799261ca 100644 --- a/src/classes/ActionDispatch/Session/Compatibility.html +++ b/src/classes/ActionDispatch/Session/Compatibility.html @@ -65,17 +65,9 @@

    Methods

    Class Public methods

    -

    - - new(app, options = {}) - -

    +

    new(app, options = {})

    -
    - -
    - @@ -105,17 +97,9 @@

    Instance Public methods

    -

    - - generate_sid() - -

    +

    generate_sid()

    -
    - -
    - @@ -145,17 +129,9 @@

    Instance Private methods

    -

    - - initialize_sid() - -

    +

    initialize_sid()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Session/CookieStore.html b/src/classes/ActionDispatch/Session/CookieStore.html index 17f1a4e233..3f3c4e0dab 100644 --- a/src/classes/ActionDispatch/Session/CookieStore.html +++ b/src/classes/ActionDispatch/Session/CookieStore.html @@ -116,17 +116,9 @@

    Methods

    Class Public methods

    -

    - - new(app, options = {}) - -

    +

    new(app, options = {})

    -
    - -
    - @@ -157,17 +149,9 @@

    Instance Public methods

    -

    - - delete_session(req, session_id, options) - -

    +

    delete_session(req, session_id, options)

    -
    - -
    - @@ -195,17 +179,9 @@

    -

    - - load_session(req) - -

    +

    load_session(req)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Session/CookieStore/SessionId.html b/src/classes/ActionDispatch/Session/CookieStore/SessionId.html index 0cc60e68d1..1fe2ee0958 100644 --- a/src/classes/ActionDispatch/Session/CookieStore/SessionId.html +++ b/src/classes/ActionDispatch/Session/CookieStore/SessionId.html @@ -77,17 +77,9 @@

    Attributes

    Class Public methods

    -

    - - new(session_id, cookie_value = {}) - -

    +

    new(session_id, cookie_value = {})

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Session/MemCacheStore.html b/src/classes/ActionDispatch/Session/MemCacheStore.html index e81a216e72..e0a97176d3 100644 --- a/src/classes/ActionDispatch/Session/MemCacheStore.html +++ b/src/classes/ActionDispatch/Session/MemCacheStore.html @@ -98,17 +98,9 @@

    Included Modules

    Class Public methods

    -

    - - new(app, options = {}) - -

    +

    new(app, options = {})

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Session/StaleSessionCheck.html b/src/classes/ActionDispatch/Session/StaleSessionCheck.html index ee97312ff7..76bfa3d6f1 100644 --- a/src/classes/ActionDispatch/Session/StaleSessionCheck.html +++ b/src/classes/ActionDispatch/Session/StaleSessionCheck.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - extract_session_id(env) - -

    +

    extract_session_id(env)

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - load_session(env) - -

    +

    load_session(env)

    -
    - -
    - @@ -136,17 +120,9 @@

    -

    - - stale_session_check!() - -

    +

    stale_session_check!()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/ShowExceptions.html b/src/classes/ActionDispatch/ShowExceptions.html index f5308e185c..a2b50380f3 100644 --- a/src/classes/ActionDispatch/ShowExceptions.html +++ b/src/classes/ActionDispatch/ShowExceptions.html @@ -81,17 +81,9 @@

    Methods

    Class Public methods

    -

    - - new(app, exceptions_app) - -

    +

    new(app, exceptions_app)

    -
    - -
    - @@ -121,17 +113,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/Static.html b/src/classes/ActionDispatch/Static.html index 4701c6378f..7eb6463ed2 100644 --- a/src/classes/ActionDispatch/Static.html +++ b/src/classes/ActionDispatch/Static.html @@ -81,17 +81,9 @@

    Methods

    Class Public methods

    -

    - - new(app, path, index: "index", headers: {}) - -

    +

    new(app, path, index: "index", headers: {})

    -
    - -
    - @@ -121,17 +113,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/SystemTestCase.html b/src/classes/ActionDispatch/SystemTestCase.html index 8779b6f4df..8ad79bd1f2 100644 --- a/src/classes/ActionDispatch/SystemTestCase.html +++ b/src/classes/ActionDispatch/SystemTestCase.html @@ -184,15 +184,10 @@

    Constants

    Class Public methods

    -

    - - driven_by(driver, using: :chrome, screen_size: [1400, 1400], options: {}, &capabilities) - -

    +

    driven_by(driver, using: :chrome, screen_size: [1400, 1400], options: {}, &capabilities)

    - -
    -

    System Test configuration options

    +
    +

    System Test configuration options

    The default settings are Selenium, using Chrome, with a screen size of 1400x1400.

    @@ -210,8 +205,7 @@

    driven_by :selenium, using: :headless_firefox -

    - +
    @@ -238,19 +232,13 @@

    -

    - - served_by(host:, port:) - -

    +

    served_by(host:, port:)

    - -
    -

    Configuration for the System Test application server.

    +
    +

    Configuration for the System Test application server.

    By default this is localhost. This method allows the host and port to be specified manually.

    -
    - +
    diff --git a/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html b/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html index 2b59b3ee1e..52a6c8b8c1 100644 --- a/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html +++ b/src/classes/ActionDispatch/SystemTesting/TestHelpers/ScreenshotHelper.html @@ -68,19 +68,13 @@

    Methods

    Instance Public methods

    -

    - - take_failed_screenshot() - -

    +

    take_failed_screenshot()

    - -
    -

    Takes a screenshot of the current page in the browser if the test failed.

    +
    +

    Takes a screenshot of the current page in the browser if the test failed.

    take_failed_screenshot is called during system test teardown.

    -
    - +
    @@ -108,15 +102,10 @@

    -

    - - take_screenshot(html: false, screenshot: nil) - -

    +

    take_screenshot(html: false, screenshot: nil)

    - -
    -

    Takes a screenshot of the current page in the browser.

    +
    +

    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)

    @@ -135,8 +124,7 @@

    : Display the screenshot in the terminal, using the terminal artifact format (buildkite.github.io/terminal-to-html/inline-images/).

    -

    - +
    diff --git a/src/classes/ActionDispatch/TestHelpers/PageDumpHelper.html b/src/classes/ActionDispatch/TestHelpers/PageDumpHelper.html index 73dd5250b3..7d3f6e68e0 100644 --- a/src/classes/ActionDispatch/TestHelpers/PageDumpHelper.html +++ b/src/classes/ActionDispatch/TestHelpers/PageDumpHelper.html @@ -71,17 +71,11 @@

    Methods

    Instance Public methods

    -

    - - save_and_open_page(path = html_dump_default_path) - -

    +

    save_and_open_page(path = html_dump_default_path)

    - -
    -

    Saves the content of response body to a file and tries to open it in your browser. Launchy must be present in your Gemfile for the page to open automatically.

    -
    - +
    +

    Saves the content of response body to a file and tries to open it in your browser. Launchy must be present in your Gemfile for the page to open automatically.

    +
    diff --git a/src/classes/ActionDispatch/TestProcess.html b/src/classes/ActionDispatch/TestProcess.html index ca3d194a5a..de10fc437d 100644 --- a/src/classes/ActionDispatch/TestProcess.html +++ b/src/classes/ActionDispatch/TestProcess.html @@ -101,17 +101,9 @@

    Included Modules

    Instance Public methods

    -

    - - assigns(key = nil) - -

    +

    assigns(key = nil)

    -
    - -
    - @@ -138,17 +130,9 @@

    -

    - - cookies() - -

    +

    cookies()

    -
    - -
    - @@ -173,17 +157,9 @@

    -

    - - flash() - -

    +

    flash()

    -
    - -
    - @@ -208,17 +184,9 @@

    -

    - - redirect_to_url() - -

    +

    redirect_to_url()

    -
    - -
    - @@ -243,17 +211,9 @@

    -

    - - session() - -

    +

    session()

    -
    - -
    - diff --git a/src/classes/ActionDispatch/TestProcess/FixtureFile.html b/src/classes/ActionDispatch/TestProcess/FixtureFile.html index 045353ff61..cdaa5b4a7d 100644 --- a/src/classes/ActionDispatch/TestProcess/FixtureFile.html +++ b/src/classes/ActionDispatch/TestProcess/FixtureFile.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - file_fixture_upload(path, mime_type = nil, binary = false) - -

    +

    file_fixture_upload(path, mime_type = nil, binary = false)

    - -
    -

    Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type):

    +
    +

    Shortcut for Rack::Test::UploadedFile.new(File.join(ActionDispatch::IntegrationTest.file_fixture_path, path), type):

    post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png') }
     
    @@ -81,13 +76,14 @@

    post :change_avatar, params: { avatar: file_fixture_upload('david.png', 'image/png', :binary) }
     
    -

    - +
    -
    - Also aliased as: fixture_file_upload -
    +

    + Also aliased as: + + fixture_file_upload. +

    @@ -115,24 +111,17 @@

    -

    - - fixture_file_upload(path, mime_type = nil, binary = false) - -

    +

    fixture_file_upload(path, mime_type = nil, binary = false)

    -
    - -
    - -
    - Alias for: file_fixture_upload -
    +

    + Alias for: + file_fixture_upload. +

    diff --git a/src/classes/ActionDispatch/TestRequest.html b/src/classes/ActionDispatch/TestRequest.html index 8e720ffd51..82bb5038b9 100644 --- a/src/classes/ActionDispatch/TestRequest.html +++ b/src/classes/ActionDispatch/TestRequest.html @@ -124,17 +124,11 @@

    Constants

    Class Public methods

    -

    - - create(env = {}) - -

    +

    create(env = {})

    - -
    -

    Create a new test request with default env values.

    -
    - +
    +

    Create a new test request with default env values.

    +
    @@ -165,17 +159,9 @@

    Instance Public methods

    -

    - - accept=(mime_types) - -

    +

    accept=(mime_types)

    -
    - -
    - @@ -201,17 +187,9 @@

    -

    - - action=(action_name) - -

    +

    action=(action_name)

    -
    - -
    - @@ -236,17 +214,9 @@

    -

    - - host=(host) - -

    +

    host=(host)

    -
    - -
    - @@ -271,17 +241,9 @@

    -

    - - if_modified_since=(last_modified) - -

    +

    if_modified_since=(last_modified)

    -
    - -
    - @@ -306,17 +268,9 @@

    -

    - - if_none_match=(etag) - -

    +

    if_none_match=(etag)

    -
    - -
    - @@ -341,17 +295,9 @@

    -

    - - path=(path) - -

    +

    path=(path)

    -
    - -
    - @@ -376,17 +322,9 @@

    -

    - - port=(number) - -

    +

    port=(number)

    -
    - -
    - @@ -411,17 +349,9 @@

    -

    - - remote_addr=(addr) - -

    +

    remote_addr=(addr)

    -
    - -
    - @@ -446,17 +376,9 @@

    -

    - - request_method=(method) - -

    +

    request_method=(method)

    -
    - -
    - @@ -481,17 +403,9 @@

    -

    - - request_uri=(uri) - -

    +

    request_uri=(uri)

    -
    - -
    - @@ -516,17 +430,9 @@

    -

    - - user_agent=(user_agent) - -

    +

    user_agent=(user_agent)

    -
    - -
    - diff --git a/src/classes/ActionDispatch/TestResponse.html b/src/classes/ActionDispatch/TestResponse.html index 5ad4401c3c..b68f32c0e8 100644 --- a/src/classes/ActionDispatch/TestResponse.html +++ b/src/classes/ActionDispatch/TestResponse.html @@ -79,17 +79,9 @@

    Methods

    Class Public methods

    -

    - - from_response(response) - -

    +

    from_response(response)

    -
    - -
    - @@ -118,15 +110,10 @@

    Instance Public methods

    -

    - - parsed_body() - -

    +

    parsed_body()

    - -
    -

    Returns a parsed body depending on the response MIME type. When a parser corresponding to the MIME type is not found, it returns the raw body.

    +
    +

    Returns a parsed body depending on the response MIME type. When a parser corresponding to the MIME type is not found, it returns the raw body.

    Examples

    @@ -159,8 +146,7 @@

    Examples

    assert_equal 42, id assert_equal "Title", title -
    - +
    @@ -185,17 +171,9 @@

    Examples

    -

    - - response_parser() - -

    +

    response_parser()

    -
    - -
    - diff --git a/src/classes/ActionMailbox.html b/src/classes/ActionMailbox.html index 3d210475ea..a7fe77509b 100644 --- a/src/classes/ActionMailbox.html +++ b/src/classes/ActionMailbox.html @@ -177,17 +177,11 @@

    Methods

    Class Public methods

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Action Mailbox as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Action Mailbox as a Gem::Version.

    +
    @@ -212,17 +206,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Action Mailbox as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Action Mailbox as a Gem::Version.

    +
    diff --git a/src/classes/ActionMailbox/Base.html b/src/classes/ActionMailbox/Base.html index ef4e87a731..400e00e5d3 100644 --- a/src/classes/ActionMailbox/Base.html +++ b/src/classes/ActionMailbox/Base.html @@ -158,17 +158,9 @@

    Attributes

    Class Public methods

    -

    - - new(inbound_email) - -

    +

    new(inbound_email)

    -
    - -
    - @@ -193,17 +185,9 @@

    -

    - - receive(inbound_email) - -

    +

    receive(inbound_email)

    -
    - -
    - @@ -232,17 +216,11 @@

    Instance Public methods

    -

    - - bounce_now_with(message) - -

    +

    bounce_now_with(message)

    - -
    -

    Immediately sends the given message and changes the inbound email’s status to :bounced.

    -
    - +
    +

    Immediately sends the given message and changes the inbound email’s status to :bounced.

    +
    @@ -268,17 +246,11 @@

    -

    - - bounce_with(message) - -

    +

    bounce_with(message)

    - -
    -

    Enqueues the given message for delivery and changes the inbound email’s status to :bounced.

    -
    - +
    +

    Enqueues the given message for delivery and changes the inbound email’s status to :bounced.

    +
    @@ -304,17 +276,9 @@

    -

    - - process() - -

    +

    process()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Callbacks.html b/src/classes/ActionMailbox/Callbacks.html index bf702b84be..692f334b30 100644 --- a/src/classes/ActionMailbox/Callbacks.html +++ b/src/classes/ActionMailbox/Callbacks.html @@ -104,17 +104,9 @@

    Constants

    Instance Public methods

    -

    - - after_processing(*methods, &block) - -

    +

    after_processing(*methods, &block)

    -
    - -
    - @@ -139,17 +131,9 @@

    -

    - - around_processing(*methods, &block) - -

    +

    around_processing(*methods, &block)

    -
    - -
    - @@ -174,17 +158,9 @@

    -

    - - before_processing(*methods, &block) - -

    +

    before_processing(*methods, &block)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/InboundEmail.html b/src/classes/ActionMailbox/InboundEmail.html index ada9bb8628..c3db7c5589 100644 --- a/src/classes/ActionMailbox/InboundEmail.html +++ b/src/classes/ActionMailbox/InboundEmail.html @@ -124,17 +124,9 @@

    Methods

    Instance Public methods

    -

    - - mail() - -

    +

    mail()

    -
    - -
    - @@ -159,17 +151,9 @@

    -

    - - processed?() - -

    +

    processed?()

    -
    - -
    - @@ -194,17 +178,9 @@

    -

    - - source() - -

    +

    source()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/InboundEmail/Incineratable.html b/src/classes/ActionMailbox/InboundEmail/Incineratable.html index 38010f6aa0..12bc728d0c 100644 --- a/src/classes/ActionMailbox/InboundEmail/Incineratable.html +++ b/src/classes/ActionMailbox/InboundEmail/Incineratable.html @@ -83,17 +83,9 @@

    Methods

    Instance Public methods

    -

    - - incinerate() - -

    +

    incinerate()

    -
    - -
    - @@ -118,17 +110,9 @@

    -

    - - incinerate_later() - -

    +

    incinerate_later()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html b/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html index 1ae637bb89..6159929c6f 100644 --- a/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html +++ b/src/classes/ActionMailbox/InboundEmail/Incineratable/Incineration.html @@ -73,17 +73,9 @@

    Methods

    Class Public methods

    -

    - - new(inbound_email) - -

    +

    new(inbound_email)

    -
    - -
    - @@ -112,17 +104,9 @@

    Instance Public methods

    -

    - - run() - -

    +

    run()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/InboundEmail/MessageId.html b/src/classes/ActionMailbox/InboundEmail/MessageId.html index 77047c92ec..61e7934834 100644 --- a/src/classes/ActionMailbox/InboundEmail/MessageId.html +++ b/src/classes/ActionMailbox/InboundEmail/MessageId.html @@ -78,17 +78,11 @@

    Methods

    Instance Public methods

    -

    - - create_and_extract_message_id!(source, **options) - -

    +

    create_and_extract_message_id!(source, **options)

    - -
    -

    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.

    +
    @@ -119,17 +113,9 @@

    -

    - - create_and_upload_raw_email!(source) - -

    +

    create_and_upload_raw_email!(source)

    -
    - -
    - @@ -155,17 +141,9 @@

    -

    - - extract_message_id(source) - -

    +

    extract_message_id(source)

    -
    - -
    - @@ -190,17 +168,9 @@

    -

    - - generate_missing_message_id(message_checksum) - -

    +

    generate_missing_message_id(message_checksum)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/InboundEmail/Routable.html b/src/classes/ActionMailbox/InboundEmail/Routable.html index 66b78f70b1..81306afcec 100644 --- a/src/classes/ActionMailbox/InboundEmail/Routable.html +++ b/src/classes/ActionMailbox/InboundEmail/Routable.html @@ -70,17 +70,11 @@

    Methods

    Instance Public methods

    -

    - - route() - -

    +

    route()

    - -
    -

    Route this InboundEmail using the routing rules declared on the ApplicationMailbox.

    -
    - +
    +

    Route this InboundEmail using the routing rules declared on the ApplicationMailbox.

    +
    @@ -105,17 +99,11 @@

    -

    - - route_later() - -

    +

    route_later()

    - -
    -

    Enqueue a RoutingJob for this InboundEmail.

    -
    - +
    +

    Enqueue a RoutingJob for this InboundEmail.

    +
    diff --git a/src/classes/ActionMailbox/IncinerationJob.html b/src/classes/ActionMailbox/IncinerationJob.html index cd6c442786..9495b51cef 100644 --- a/src/classes/ActionMailbox/IncinerationJob.html +++ b/src/classes/ActionMailbox/IncinerationJob.html @@ -77,17 +77,9 @@

    Methods

    Class Public methods

    -

    - - schedule(inbound_email) - -

    +

    schedule(inbound_email)

    -
    - -
    - @@ -116,17 +108,9 @@

    Instance Public methods

    -

    - - perform(inbound_email) - -

    +

    perform(inbound_email)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html index 0050c214fb..5ee41eb1cc 100644 --- a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController.html @@ -130,17 +130,9 @@

    Methods

    Instance Public methods

    -

    - - create() - -

    +

    create()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html index 36aeb1d65e..2cb3b6fd5b 100644 --- a/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html +++ b/src/classes/ActionMailbox/Ingresses/Mailgun/InboundEmailsController/Authenticator.html @@ -105,17 +105,9 @@

    Attributes

    Class Public methods

    -

    - - new(key:, timestamp:, token:, signature:) - -

    +

    new(key:, timestamp:, token:, signature:)

    -
    - -
    - @@ -144,17 +136,9 @@

    Instance Public methods

    -

    - - authenticated?() - -

    +

    authenticated?()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html index ab23d4d51c..f6c52170ac 100644 --- a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController.html @@ -102,17 +102,9 @@

    Methods

    Instance Public methods

    -

    - - create() - -

    +

    create()

    -
    - -
    - @@ -141,17 +133,9 @@

    -

    - - health_check() - -

    +

    health_check()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html index a1ddc1df13..b9e5da3654 100644 --- a/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html +++ b/src/classes/ActionMailbox/Ingresses/Mandrill/InboundEmailsController/Authenticator.html @@ -89,17 +89,9 @@

    Attributes

    Class Public methods

    -

    - - new(request, key) - -

    +

    new(request, key)

    -
    - -
    - @@ -128,17 +120,9 @@

    Instance Public methods

    -

    - - authenticated?() - -

    +

    authenticated?()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html index c180c42d12..f2f5206cbf 100644 --- a/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Postmark/InboundEmailsController.html @@ -113,17 +113,9 @@

    Methods

    Instance Public methods

    -

    - - create() - -

    +

    create()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html index e165860fbb..dfcf9093a7 100644 --- a/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Relay/InboundEmailsController.html @@ -122,17 +122,9 @@

    Methods

    Instance Public methods

    -

    - - create() - -

    +

    create()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html b/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html index 9e519d7bf1..7cbd46dce0 100644 --- a/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html +++ b/src/classes/ActionMailbox/Ingresses/Sendgrid/InboundEmailsController.html @@ -113,17 +113,9 @@

    Methods

    Instance Public methods

    -

    - - create() - -

    +

    create()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Relayer.html b/src/classes/ActionMailbox/Relayer.html index 7ffc5a34b1..2d6db30d48 100644 --- a/src/classes/ActionMailbox/Relayer.html +++ b/src/classes/ActionMailbox/Relayer.html @@ -130,17 +130,9 @@

    Attributes

    Class Public methods

    -

    - - new(url:, username: "actionmailbox", password:) - -

    +

    new(url:, username: "actionmailbox", password:)

    -
    - -
    - @@ -169,17 +161,9 @@

    Instance Public methods

    -

    - - relay(source) - -

    +

    relay(source)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Relayer/Result.html b/src/classes/ActionMailbox/Relayer/Result.html index 2698dd2b6b..1d0ba6a521 100644 --- a/src/classes/ActionMailbox/Relayer/Result.html +++ b/src/classes/ActionMailbox/Relayer/Result.html @@ -76,17 +76,9 @@

    Methods

    Instance Public methods

    -

    - - failure?() - -

    +

    failure?()

    -
    - -
    - @@ -111,17 +103,9 @@

    -

    - - permanent_failure?() - -

    +

    permanent_failure?()

    -
    - -
    - @@ -146,17 +130,9 @@

    -

    - - success?() - -

    +

    success?()

    -
    - -
    - @@ -181,17 +157,9 @@

    -

    - - transient_failure?() - -

    +

    transient_failure?()

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Router.html b/src/classes/ActionMailbox/Router.html index 366217ce26..e6018b5bfc 100644 --- a/src/classes/ActionMailbox/Router.html +++ b/src/classes/ActionMailbox/Router.html @@ -104,17 +104,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -143,17 +135,9 @@

    Instance Public methods

    -

    - - add_route(address, to:) - -

    +

    add_route(address, to:)

    -
    - -
    - @@ -178,17 +162,9 @@

    -

    - - add_routes(routes) - -

    +

    add_routes(routes)

    -
    - -
    - @@ -215,17 +191,9 @@

    -

    - - mailbox_for(inbound_email) - -

    +

    mailbox_for(inbound_email)

    -
    - -
    - @@ -250,17 +218,9 @@

    -

    - - route(inbound_email) - -

    +

    route(inbound_email)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Router/Route.html b/src/classes/ActionMailbox/Router/Route.html index c114f014bb..8a7d7a57f3 100644 --- a/src/classes/ActionMailbox/Router/Route.html +++ b/src/classes/ActionMailbox/Router/Route.html @@ -99,17 +99,9 @@

    Attributes

    Class Public methods

    -

    - - new(address, to:) - -

    +

    new(address, to:)

    -
    - -
    - @@ -140,17 +132,9 @@

    Instance Public methods

    -

    - - mailbox_class() - -

    +

    mailbox_class()

    -
    - -
    - @@ -175,17 +159,9 @@

    -

    - - match?(inbound_email) - -

    +

    match?(inbound_email)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/Routing.html b/src/classes/ActionMailbox/Routing.html index 4f349fbe9b..d611df08cf 100644 --- a/src/classes/ActionMailbox/Routing.html +++ b/src/classes/ActionMailbox/Routing.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - mailbox_for(inbound_email) - -

    +

    mailbox_for(inbound_email)

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - route(inbound_email) - -

    +

    route(inbound_email)

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - routing(routes) - -

    +

    routing(routes)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/RoutingJob.html b/src/classes/ActionMailbox/RoutingJob.html index 6e397934a6..a03af52ccb 100644 --- a/src/classes/ActionMailbox/RoutingJob.html +++ b/src/classes/ActionMailbox/RoutingJob.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - perform(inbound_email) - -

    +

    perform(inbound_email)

    -
    - -
    - diff --git a/src/classes/ActionMailbox/TestHelper.html b/src/classes/ActionMailbox/TestHelper.html index dc5d27c302..1b3adfa6a9 100644 --- a/src/classes/ActionMailbox/TestHelper.html +++ b/src/classes/ActionMailbox/TestHelper.html @@ -78,17 +78,11 @@

    Methods

    Instance Public methods

    -

    - - create_inbound_email_from_fixture(fixture_name, status: :processing) - -

    +

    create_inbound_email_from_fixture(fixture_name, status: :processing)

    - -
    -

    Create an InboundEmail record using an eml fixture in the format of message/rfc822 referenced with fixture_name located in test/fixtures/files/fixture_name.

    -
    - +
    +

    Create an InboundEmail record using an eml fixture in the format of message/rfc822 referenced with fixture_name located in test/fixtures/files/fixture_name.

    +
    @@ -113,15 +107,10 @@

    -

    - - create_inbound_email_from_mail(status: :processing, **mail_options, &block) - -

    +

    create_inbound_email_from_mail(status: :processing, **mail_options, &block)

    - -
    -

    Creates an InboundEmail by specifying through options or a block.

    +
    +

    Creates an InboundEmail by specifying through options or a block.

    Options

    • @@ -170,8 +159,7 @@

      -

      - - create_inbound_email_from_source(source, status: :processing) - -

      +

      create_inbound_email_from_source(source, status: :processing)

      - -
      -

      Create an InboundEmail using the raw rfc822 source as text.

      -
      - +
      +

      Create an InboundEmail using the raw rfc822 source as text.

      +
      @@ -235,17 +217,11 @@

      -

      - - receive_inbound_email_from_fixture(*args) - -

      +

      receive_inbound_email_from_fixture(*args)

      - -
      -

      Create an InboundEmail from fixture using the same arguments as create_inbound_email_from_fixture and immediately route it to processing.

      -
      - +
      +

      Create an InboundEmail from fixture using the same arguments as create_inbound_email_from_fixture and immediately route it to processing.

      +
      @@ -270,17 +246,11 @@

      -

      - - receive_inbound_email_from_mail(**kwargs, &block) - -

      +

      receive_inbound_email_from_mail(**kwargs, &block)

      - -
      -

      Create an InboundEmail using the same options or block as create_inbound_email_from_mail, then immediately route it for processing.

      -
      - +
      +

      Create an InboundEmail using the same options or block as create_inbound_email_from_mail, then immediately route it for processing.

      +
      @@ -305,17 +275,11 @@

      -

      - - receive_inbound_email_from_source(*args) - -

      +

      receive_inbound_email_from_source(*args)

      - -
      -

      Create an InboundEmail using the same arguments as create_inbound_email_from_source and immediately route it to processing.

      -
      - +
      +

      Create an InboundEmail using the same arguments as create_inbound_email_from_source and immediately route it to processing.

      +
      diff --git a/src/classes/ActionMailer.html b/src/classes/ActionMailer.html index faf7715f26..bfb218c98e 100644 --- a/src/classes/ActionMailer.html +++ b/src/classes/ActionMailer.html @@ -310,17 +310,11 @@

      Methods

      Class Public methods

      -

      - - deliver_all_later(*deliveries, **options) - -

      +

      deliver_all_later(*deliveries, **options)

      - -
      -

      Enqueue many emails at once to be delivered through Active Job. When the individual job runs, it will send the email using deliver_now.

      -
      - +
      +

      Enqueue many emails at once to be delivered through Active Job. When the individual job runs, it will send the email using deliver_now.

      +
      @@ -345,17 +339,11 @@

      -

      - - deliver_all_later!(*deliveries, **options) - -

      +

      deliver_all_later!(*deliveries, **options)

      - -
      -

      Enqueue many emails at once to be delivered through Active Job. When the individual 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.

      -
      - +
      +

      Enqueue many emails at once to be delivered through Active Job. When the individual 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.

      +
      @@ -380,17 +368,9 @@

      -

      - - eager_load!() - -

      +

      eager_load!()

      -
      - -
      - @@ -422,17 +402,11 @@

      -

      - - gem_version() - -

      +

      gem_version()

      - -
      -

      Returns the currently loaded version of Action Mailer as a Gem::Version.

      -
      - +
      +

      Returns the currently loaded version of Action Mailer as a Gem::Version.

      +
      @@ -457,17 +431,11 @@

      -

      - - version() - -

      +

      version()

      - -
      -

      Returns the currently loaded version of Action Mailer as a Gem::Version.

      -
      - +
      +

      Returns the currently loaded version of Action Mailer as a Gem::Version.

      +
      diff --git a/src/classes/ActionMailer/Base.html b/src/classes/ActionMailer/Base.html index 2e15b57705..021eba7729 100644 --- a/src/classes/ActionMailer/Base.html +++ b/src/classes/ActionMailer/Base.html @@ -724,24 +724,17 @@

      Attributes

      Class Public methods

      -

      - - controller_path() - -

      +

      controller_path()

      -
      - -
      - -
      - Alias for: mailer_name -
      +

      + Alias for: + mailer_name. +

      @@ -749,25 +742,21 @@

      -

      - - default(value = nil) - -

      +

      default(value = nil)

      - -
      -

      Allows to set defaults through app configuration:

      +
      +

      Allows to set defaults through app configuration:

      config.action_mailer.default_options = { from: "no-reply@example.org" }
       
      -
      - +
      -
      - Also aliased as: default_options= -
      +

      + Also aliased as: + + default_options=. +

      @@ -792,24 +781,17 @@

      -

      - - default_options=(value = nil) - -

      +

      default_options=(value = nil)

      -
      - -
      - -
      - Alias for: default -
      +

      + Alias for: + default. +

      @@ -817,19 +799,13 @@

      -

      - - email_address_with_name(address, name) - -

      +

      email_address_with_name(address, name)

      - -
      -

      Returns an email in the format “Name <email@example.com>”.

      +
      +

      Returns an email in the format “Name <email@example.com>”.

      If the name is a blank string, it returns just the address.

      -
      - +
      @@ -857,22 +833,18 @@

      -

      - - mailer_name() - -

      +

      mailer_name()

      - -
      -

      Returns the name of the current mailer. This method is also being used as a path for a view lookup. If this is an anonymous mailer, this method will return anonymous instead.

      -
      - +
      +

      Returns the name of the current mailer. This method is also being used as a path for a view lookup. If this is an anonymous mailer, this method will return anonymous instead.

      +
      -
      - Also aliased as: controller_path -
      +

      + Also aliased as: + + controller_path. +

      @@ -896,17 +868,9 @@

      -

      - - new() - -

      +

      new()

      -
      - -
      - @@ -933,17 +897,11 @@

      -

      - - register_interceptor(interceptor) - -

      +

      register_interceptor(interceptor)

      - -
      -

      Register an Interceptor which will be called before mail is sent. Either a class, string, or symbol can be passed in as the Interceptor. If a string or symbol is passed in it will be camelized and constantized.

      -
      - +
      +

      Register an Interceptor which will be called before mail is sent. Either a class, string, or symbol can be passed in as the Interceptor. If a string or symbol is passed in it will be camelized and constantized.

      +
      @@ -968,17 +926,11 @@

      -

      - - register_interceptors(*interceptors) - -

      +

      register_interceptors(*interceptors)

      - -
      -

      Register one or more Interceptors which will be called before mail is sent.

      -
      - +
      +

      Register one or more Interceptors which will be called before mail is sent.

      +
      @@ -1003,17 +955,11 @@

      -

      - - register_observer(observer) - -

      +

      register_observer(observer)

      - -
      -

      Register an Observer which will be notified when mail is delivered. Either a class, string, or symbol can be passed in as the Observer. If a string or symbol is passed in it will be camelized and constantized.

      -
      - +
      +

      Register an Observer which will be notified when mail is delivered. Either a class, string, or symbol can be passed in as the Observer. If a string or symbol is passed in it will be camelized and constantized.

      +
      @@ -1038,17 +984,11 @@

      -

      - - register_observers(*observers) - -

      +

      register_observers(*observers)

      - -
      -

      Register one or more Observers which will be notified when mail is delivered.

      -
      - +
      +

      Register one or more Observers which will be notified when mail is delivered.

      +
      @@ -1073,17 +1013,11 @@

      -

      - - supports_path?() - -

      +

      supports_path?()

      - -
      -

      Emails do not support relative path links.

      -
      - +
      +

      Emails do not support relative path links.

      +
      @@ -1108,17 +1042,11 @@

      -

      - - unregister_interceptor(interceptor) - -

      +

      unregister_interceptor(interceptor)

      - -
      -

      Unregister a previously registered Interceptor. Either a class, string, or symbol can be passed in as the Interceptor. If a string or symbol is passed in it will be camelized and constantized.

      -
      - +
      +

      Unregister a previously registered Interceptor. Either a class, string, or symbol can be passed in as the Interceptor. If a string or symbol is passed in it will be camelized and constantized.

      +
      @@ -1143,17 +1071,11 @@

      -

      - - unregister_interceptors(*interceptors) - -

      +

      unregister_interceptors(*interceptors)

      - -
      -

      Unregister one or more previously registered Interceptors.

      -
      - +
      +

      Unregister one or more previously registered Interceptors.

      +
      @@ -1178,17 +1100,11 @@

      -

      - - unregister_observer(observer) - -

      +

      unregister_observer(observer)

      - -
      -

      Unregister a previously registered Observer. Either a class, string, or symbol can be passed in as the Observer. If a string or symbol is passed in it will be camelized and constantized.

      -
      - +
      +

      Unregister a previously registered Observer. Either a class, string, or symbol can be passed in as the Observer. If a string or symbol is passed in it will be camelized and constantized.

      +
      @@ -1213,17 +1129,11 @@

      -

      - - unregister_observers(*observers) - -

      +

      unregister_observers(*observers)

      - -
      -

      Unregister one or more previously registered Observers.

      -
      - +
      +

      Unregister one or more previously registered Observers.

      +
      @@ -1252,15 +1162,10 @@

      Instance Public methods

      -

      - - attachments() - -

      +

      attachments()

      - -
      -

      Allows you to add attachments to an email, like so:

      +
      +

      Allows you to add attachments to an email, like so:

      mail.attachments['filename.jpg'] = File.read('/path/to/filename.jpg')
       
      @@ -1289,8 +1194,7 @@

      # or by index mail.attachments[0] # => Mail::Part (first attachment) -

      - +
      @@ -1319,19 +1223,13 @@

      -

      - - email_address_with_name(address, name) - -

      +

      email_address_with_name(address, name)

      - -
      -

      Returns an email in the format “Name <email@example.com>”.

      +
      +

      Returns an email in the format “Name <email@example.com>”.

      If the name is a blank string, it returns just the address.

      -
      - +
      @@ -1356,15 +1254,10 @@

      -

      - - headers(args = nil) - -

      +

      headers(args = nil)

      - -
      -

      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"
       
      @@ -1406,8 +1299,7 @@

      Fields can only appear once in email headers while other fields such as X-Anything can appear multiple times.

      If you want to replace any header which already exists, first set it to nil in order to reset the value otherwise another field will be added for the same header.

      -

      - +
      @@ -1436,15 +1328,10 @@

      -

      - - mail(headers = {}, &block) - -

      +

      mail(headers = {}, &block)

      - -
      -

      The main method that creates the message and renders the email templates. There are two ways to call this method, with a block, or without a block.

      +
      +

      The main method that creates the message and renders the email templates. There are two ways to call this method, with a block, or without a block.

      It accepts a headers hash. This hash allows you to specify the most used headers in an email message, these are:

      • @@ -1523,8 +1410,7 @@

        format.html end -

      - +
      @@ -1580,17 +1466,11 @@

      -

      - - mailer_name() - -

      +

      mailer_name()

      - -
      -

      Returns the name of the mailer object.

      -
      - +
      +

      Returns the name of the mailer object.

      +
      @@ -1618,17 +1498,11 @@

      Instance Private methods

      -

      - - default_i18n_subject(interpolations = {}) - -

      +

      default_i18n_subject(interpolations = {})

      - -
      -

      Translates the subject using Rails I18n class under [mailer_scope, action_name] scope. If it does not find a translation for the subject under the specified scope it will default to a humanized version of the action_name. If the subject has interpolations, you can pass them through the interpolations parameter.

      -
      - +
      +

      Translates the subject using Rails I18n class under [mailer_scope, action_name] scope. If it does not find a translation for the subject under the specified scope it will default to a humanized version of the action_name. If the subject has interpolations, you can pass them through the interpolations parameter.

      +
      @@ -1654,21 +1528,15 @@

      -

      - - set_content_type(m, user_content_type, class_default) - -

      +

      set_content_type(m, user_content_type, class_default)

      - -
      -

      Used by mail to set the content type of the message.

      +
      +

      Used by mail to set the content type of the message.

      It will use the given user_content_type, or multipart if the mail message has any attachments. If the attachments are inline, the content type will be “multipart/related”, otherwise “multipart/mixed”.

      If there is no content type passed in via headers, and there are no attachments, or the message is multipart, then the default content type is used.

      -
      - +
      diff --git a/src/classes/ActionMailer/Base/LateAttachmentsProxy.html b/src/classes/ActionMailer/Base/LateAttachmentsProxy.html index 5f29685859..fd9fa73488 100644 --- a/src/classes/ActionMailer/Base/LateAttachmentsProxy.html +++ b/src/classes/ActionMailer/Base/LateAttachmentsProxy.html @@ -68,17 +68,9 @@

      Methods

      Instance Public methods

      -

      - - []=(_name, _content) - -

      +

      []=(_name, _content)

      -
      - -
      - @@ -101,17 +93,9 @@

      -

      - - inline() - -

      +

      inline()

      -
      - -
      - diff --git a/src/classes/ActionMailer/Callbacks/ClassMethods.html b/src/classes/ActionMailer/Callbacks/ClassMethods.html index 8ea9d16859..9b58dc9200 100644 --- a/src/classes/ActionMailer/Callbacks/ClassMethods.html +++ b/src/classes/ActionMailer/Callbacks/ClassMethods.html @@ -66,17 +66,11 @@

      Methods

      Instance Public methods

      -

      - - after_deliver(*filters, &blk) - -

      +

      after_deliver(*filters, &blk)

      - -
      -

      Defines a callback that will get called right after the message’s delivery method is finished.

      -
      - +
      +

      Defines a callback that will get called right after the message’s delivery method is finished.

      +
      @@ -101,17 +95,11 @@

      -

      - - around_deliver(*filters, &blk) - -

      +

      around_deliver(*filters, &blk)

      - -
      -

      Defines a callback that will get called around the message’s deliver method.

      -
      - +
      +

      Defines a callback that will get called around the message’s deliver method.

      +
      @@ -136,17 +124,11 @@

      -

      - - before_deliver(*filters, &blk) - -

      +

      before_deliver(*filters, &blk)

      - -
      -

      Defines a callback that will get called right before the message is sent to the delivery method.

      -
      - +
      +

      Defines a callback that will get called right before the message is sent to the delivery method.

      +
      diff --git a/src/classes/ActionMailer/Collector.html b/src/classes/ActionMailer/Collector.html index ae097fa456..38d7aedf91 100644 --- a/src/classes/ActionMailer/Collector.html +++ b/src/classes/ActionMailer/Collector.html @@ -103,17 +103,9 @@

      Attributes

      Class Public methods

      -

      - - new(context, &block) - -

      +

      new(context, &block)

      -
      - -
      - @@ -144,24 +136,17 @@

      Instance Public methods

      -

      - - all(*args, &block) - -

      +

      all(*args, &block)

      -
      - -
      - -
      - Alias for: any -
      +

      + Alias for: + any. +

      @@ -169,22 +154,16 @@

      -

      - - any(*args, &block) - -

      +

      any(*args, &block)

      -
      - -
      - -
      - Also aliased as: all -
      +

      + Also aliased as: + + all. +

      @@ -210,17 +189,9 @@

      -

      - - custom(mime, options = {}) - -

      +

      custom(mime, options = {})

      -
      - -
      - diff --git a/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html b/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html index 84f2cf2427..b3331be81c 100644 --- a/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html +++ b/src/classes/ActionMailer/DeliveryMethods/ClassMethods.html @@ -64,22 +64,16 @@

      Methods

      Instance Public methods

      -

      - - add_delivery_method(symbol, klass, default_options = {}) - -

      +

      add_delivery_method(symbol, klass, default_options = {})

      - -
      -

      Adds a new delivery method through the given class using the given symbol as alias and the default options supplied.

      +
      +

      Adds a new delivery method through the given class using the given symbol as alias and the default options supplied.

      add_delivery_method :sendmail, Mail::Sendmail,
         location:  '/usr/sbin/sendmail',
         arguments: %w[ -i ]
       
      -
      - +
      diff --git a/src/classes/ActionMailer/FormBuilder.html b/src/classes/ActionMailer/FormBuilder.html index 4f1c1a7a7e..14d8af60cc 100644 --- a/src/classes/ActionMailer/FormBuilder.html +++ b/src/classes/ActionMailer/FormBuilder.html @@ -83,17 +83,11 @@

      Methods

      Instance Public methods

      -

      - - default_form_builder() - -

      +

      default_form_builder()

      - -
      -

      Default form builder for the mailer

      -
      - +
      +

      Default form builder for the mailer

      +
      diff --git a/src/classes/ActionMailer/FormBuilder/ClassMethods.html b/src/classes/ActionMailer/FormBuilder/ClassMethods.html index 8c43efc06d..e97e355766 100644 --- a/src/classes/ActionMailer/FormBuilder/ClassMethods.html +++ b/src/classes/ActionMailer/FormBuilder/ClassMethods.html @@ -58,22 +58,16 @@

      Methods

      Instance Public methods

      -

      - - default_form_builder(builder) - -

      +

      default_form_builder(builder)

      - -
      -

      Set the form builder to be used as the default for all forms in the views rendered by this mailer and its subclasses.

      +
      +

      Set the form builder to be used as the default for all forms in the views rendered by this mailer and its subclasses.

      Parameters

      -
      - +
      diff --git a/src/classes/ActionMailer/MailHelper.html b/src/classes/ActionMailer/MailHelper.html index c486b6dc74..84b860bd8e 100644 --- a/src/classes/ActionMailer/MailHelper.html +++ b/src/classes/ActionMailer/MailHelper.html @@ -82,17 +82,11 @@

      Methods

      Instance Public methods

      -

      - - attachments() - -

      +

      attachments()

      - -
      -

      Access the message attachments list.

      -
      - +
      +

      Access the message attachments list.

      +
      @@ -117,15 +111,10 @@

      -

      - - block_format(text) - -

      +

      block_format(text)

      - -
      -

      Take the text and format it, indented two spaces for each line, and wrapped at 72 columns:

      +
      +

      Take the text and format it, indented two spaces for each line, and wrapped at 72 columns:

      text = <<-TEXT
         This is
      @@ -137,8 +126,7 @@ 

      block_format text # => " This is the paragraph.\n\n * item1\n * item2\n"

      -
      - +
      @@ -179,23 +167,17 @@

      -

      - - format_paragraph(text, len = 72, indent = 2) - -

      +

      format_paragraph(text, len = 72, indent = 2)

      - -
      -

      Returns text wrapped at len columns and indented indent spaces. By default column length len equals 72 characters and indent indent equal two spaces.

      +
      +

      Returns text wrapped at len columns and indented indent spaces. By default column length len equals 72 characters and indent indent equal two spaces.

      my_text = 'Here is a sample text with more than 40 characters'
       
       format_paragraph(my_text, 25, 4)
       # => "    Here is a sample text with\n    more than 40 characters"
       
      -
      - +
      @@ -233,17 +215,11 @@

      -

      - - mailer() - -

      +

      mailer()

      - -
      -

      Access the mailer instance.

      -
      - +
      +

      Access the mailer instance.

      +
      @@ -268,17 +244,11 @@

      -

      - - message() - -

      +

      message()

      - -
      -

      Access the message instance.

      -
      - +
      +

      Access the message instance.

      +
      diff --git a/src/classes/ActionMailer/MessageDelivery.html b/src/classes/ActionMailer/MessageDelivery.html index a2ef2e93c3..611602ff03 100644 --- a/src/classes/ActionMailer/MessageDelivery.html +++ b/src/classes/ActionMailer/MessageDelivery.html @@ -98,15 +98,10 @@

      Methods

      Instance Public methods

      -

      - - deliver_later(options = {}) - -

      +

      deliver_later(options = {})

      - -
      -

      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)
      @@ -131,8 +126,7 @@ 

      self.delivery_job = RegistrationDeliveryJob end

      -
      - +
      @@ -157,15 +151,10 @@

      -

      - - deliver_later!(options = {}) - -

      +

      deliver_later!(options = {})

      - -
      -

      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)
      @@ -190,8 +179,7 @@ 

      self.delivery_job = RegistrationDeliveryJob end

      -
      - +
      @@ -216,20 +204,14 @@

      -

      - - deliver_now() - -

      +

      deliver_now()

      - -
      -

      Delivers an email:

      +
      +

      Delivers an email:

      Notifier.welcome(User.first).deliver_now
       
      -
      - +
      @@ -258,20 +240,14 @@

      -

      - - deliver_now!() - -

      +

      deliver_now!()

      - -
      -

      Delivers an email without checking perform_deliveries and raise_delivery_errors, so use with caution.

      +
      +

      Delivers an email without checking perform_deliveries and raise_delivery_errors, so use with caution.

      Notifier.welcome(User.first).deliver_now!
       
      -
      - +
      @@ -300,17 +276,11 @@

      -

      - - message() - -

      +

      message()

      - -
      -

      Returns the resulting Mail::Message

      -
      - +
      +

      Returns the resulting Mail::Message

      +
      @@ -335,17 +305,11 @@

      -

      - - processed?() - -

      +

      processed?()

      - -
      -

      Was the delegate loaded, causing the mailer action to be processed?

      -
      - +
      +

      Was the delegate loaded, causing the mailer action to be processed?

      +
      diff --git a/src/classes/ActionMailer/NonInferrableMailerError.html b/src/classes/ActionMailer/NonInferrableMailerError.html index 929e5228da..a70250f764 100644 --- a/src/classes/ActionMailer/NonInferrableMailerError.html +++ b/src/classes/ActionMailer/NonInferrableMailerError.html @@ -63,17 +63,9 @@

      Methods

      Class Public methods

      -

      - - new(name) - -

      +

      new(name)

      -
      - -
      - diff --git a/src/classes/ActionMailer/Parameterized.html b/src/classes/ActionMailer/Parameterized.html index 219ac10394..e844c26e85 100644 --- a/src/classes/ActionMailer/Parameterized.html +++ b/src/classes/ActionMailer/Parameterized.html @@ -178,17 +178,9 @@

      Attributes

      Instance Public methods

      -

      - - params() - -

      +

      params()

      -
      - -
      - diff --git a/src/classes/ActionMailer/Parameterized/ClassMethods.html b/src/classes/ActionMailer/Parameterized/ClassMethods.html index b57c6b17dc..d54797775c 100644 --- a/src/classes/ActionMailer/Parameterized/ClassMethods.html +++ b/src/classes/ActionMailer/Parameterized/ClassMethods.html @@ -58,22 +58,16 @@

      Methods

      Instance Public methods

      -

      - - with(params) - -

      +

      with(params)

      - -
      -

      Provide the parameters to the mailer in order to use them in the instance methods and callbacks.

      +
      +

      Provide the parameters to the mailer in order to use them in the instance methods and callbacks.

      InvitationsMailer.with(inviter: person_a, invitee: person_b).account_invitation.deliver_later
       

      See Parameterized documentation for full example.

      -
      - +
      diff --git a/src/classes/ActionMailer/Preview.html b/src/classes/ActionMailer/Preview.html index b360c5c9ab..51365f7e05 100644 --- a/src/classes/ActionMailer/Preview.html +++ b/src/classes/ActionMailer/Preview.html @@ -105,17 +105,11 @@

      Attributes

      Class Public methods

      -

      - - all() - -

      +

      all()

      - -
      -

      Returns all mailer preview classes.

      -
      - +
      +

      Returns all mailer preview classes.

      +
      @@ -141,17 +135,11 @@

      -

      - - call(email, params = {}) - -

      +

      call(email, params = {})

      - -
      -

      Returns the mail object for the given email name. The registered preview interceptors will be informed so that they can transform the message as they would if the mail was actually being delivered.

      -
      - +
      +

      Returns the mail object for the given email name. The registered preview interceptors will be informed so that they can transform the message as they would if the mail was actually being delivered.

      +
      @@ -179,17 +167,11 @@

      -

      - - email_exists?(email) - -

      +

      email_exists?(email)

      - -
      -

      Returns true if the email exists.

      -
      - +
      +

      Returns true if the email exists.

      +
      @@ -214,17 +196,11 @@

      -

      - - emails() - -

      +

      emails()

      - -
      -

      Returns all of the available email previews.

      -
      - +
      +

      Returns all of the available email previews.

      +
      @@ -249,17 +225,11 @@

      -

      - - exists?(preview) - -

      +

      exists?(preview)

      - -
      -

      Returns true if the preview exists.

      -
      - +
      +

      Returns true if the preview exists.

      +
      @@ -284,17 +254,11 @@

      -

      - - find(preview) - -

      +

      find(preview)

      - -
      -

      Find a mailer preview by its underscored class name.

      -
      - +
      +

      Find a mailer preview by its underscored class name.

      +
      @@ -319,17 +283,9 @@

      -

      - - new(params = {}) - -

      +

      new(params = {})

      -
      - -
      - @@ -354,17 +310,11 @@

      -

      - - preview_name() - -

      +

      preview_name()

      - -
      -

      Returns the underscored name of the mailer preview without the suffix.

      -
      - +
      +

      Returns the underscored name of the mailer preview without the suffix.

      +
      diff --git a/src/classes/ActionMailer/Previews/ClassMethods.html b/src/classes/ActionMailer/Previews/ClassMethods.html index 4dd8136cec..6abe55ddc4 100644 --- a/src/classes/ActionMailer/Previews/ClassMethods.html +++ b/src/classes/ActionMailer/Previews/ClassMethods.html @@ -70,17 +70,11 @@

      Methods

      Instance Public methods

      -

      - - register_preview_interceptor(interceptor) - -

      +

      register_preview_interceptor(interceptor)

      - -
      -

      Register an Interceptor which will be called before mail is previewed. Either a class or a string can be passed in as the Interceptor. If a string is passed in it will be constantized.

      -
      - +
      +

      Register an Interceptor which will be called before mail is previewed. Either a class or a string can be passed in as the Interceptor. If a string is passed in it will be constantized.

      +
      @@ -109,17 +103,11 @@

      -

      - - register_preview_interceptors(*interceptors) - -

      +

      register_preview_interceptors(*interceptors)

      - -
      -

      Register one or more Interceptors which will be called before mail is previewed.

      -
      - +
      +

      Register one or more Interceptors which will be called before mail is previewed.

      +
      @@ -144,17 +132,11 @@

      -

      - - unregister_preview_interceptor(interceptor) - -

      +

      unregister_preview_interceptor(interceptor)

      - -
      -

      Unregister a previously registered Interceptor. Either a class or a string can be passed in as the Interceptor. If a string is passed in it will be constantized.

      -
      - +
      +

      Unregister a previously registered Interceptor. Either a class or a string can be passed in as the Interceptor. If a string is passed in it will be constantized.

      +
      @@ -179,17 +161,11 @@

      -

      - - unregister_preview_interceptors(*interceptors) - -

      +

      unregister_preview_interceptors(*interceptors)

      - -
      -

      Unregister one or more previously registered Interceptors.

      -
      - +
      +

      Unregister one or more previously registered Interceptors.

      +
      diff --git a/src/classes/ActionMailer/TestCase/Behavior.html b/src/classes/ActionMailer/TestCase/Behavior.html index f4adfb37bd..e3474373d4 100644 --- a/src/classes/ActionMailer/TestCase/Behavior.html +++ b/src/classes/ActionMailer/TestCase/Behavior.html @@ -105,19 +105,13 @@

      Included Modules

      Instance Public methods

      -

      - - read_fixture(action) - -

      +

      read_fixture(action)

      - -
      -

      Reads the fixture file for the given mailer.

      +
      +

      Reads the fixture file for the given mailer.

      This is useful when testing mailers by being able to write the body of an email inside a fixture. See the testing guide for a concrete example: guides.rubyonrails.org/testing.html#revenge-of-the-fixtures

      -
      - +
      diff --git a/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html b/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html index dd2117d99c..c8969afd26 100644 --- a/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionMailer/TestCase/Behavior/ClassMethods.html @@ -66,17 +66,9 @@

      Methods

      Instance Public methods

      -

      - - determine_default_mailer(name) - -

      +

      determine_default_mailer(name)

      -
      - -
      - @@ -105,17 +97,9 @@

      -

      - - mailer_class() - -

      +

      mailer_class()

      -
      - -
      - @@ -144,17 +128,9 @@

      -

      - - tests(mailer) - -

      +

      tests(mailer)

      -
      - -
      - diff --git a/src/classes/ActionMailer/TestHelper.html b/src/classes/ActionMailer/TestHelper.html index 0e8cf8165f..667447c738 100644 --- a/src/classes/ActionMailer/TestHelper.html +++ b/src/classes/ActionMailer/TestHelper.html @@ -102,15 +102,10 @@

      Included Modules

      Instance Public methods

      -

      - - assert_emails(number, &block) - -

      +

      assert_emails(number, &block)

      - -
      -

      Asserts that the number of emails sent matches the given number.

      +
      +

      Asserts that the number of emails sent matches the given number.

      def test_emails
         assert_emails 0
      @@ -134,8 +129,7 @@ 

      end end

      -
      - +
      @@ -165,15 +159,10 @@

      -

      - - assert_enqueued_email_with(mailer, method, params: nil, args: nil, queue: nil, &block) - -

      +

      assert_enqueued_email_with(mailer, method, params: nil, args: nil, queue: nil, &block)

      - -
      -

      Asserts that a specific email has been enqueued, optionally matching arguments and/or params.

      +
      +

      Asserts that a specific email has been enqueued, optionally matching arguments and/or params.

      def test_email
         ContactMailer.welcome.deliver_later
      @@ -236,8 +225,7 @@ 

      end end

      -
      - +
      @@ -277,15 +265,10 @@

      -

      - - assert_enqueued_emails(number, &block) - -

      +

      assert_enqueued_emails(number, &block)

      - -
      -

      Asserts that the number of emails enqueued for later delivery matches the given number.

      +
      +

      Asserts that the number of emails enqueued for later delivery matches the given number.

      def test_emails
         assert_enqueued_emails 0
      @@ -309,8 +292,7 @@ 

      end end

      -
      - +
      @@ -335,15 +317,10 @@

      -

      - - assert_no_emails(&block) - -

      +

      assert_no_emails(&block)

      - -
      -

      Asserts that no emails have been sent.

      +
      +

      Asserts that no emails have been sent.

      def test_emails
         assert_no_emails
      @@ -365,8 +342,7 @@ 

      assert_emails 0, &block
       
      -

      - +
      @@ -391,15 +367,10 @@

      -

      - - assert_no_enqueued_emails(&block) - -

      +

      assert_no_enqueued_emails(&block)

      - -
      -

      Asserts that no emails are enqueued for later delivery.

      +
      +

      Asserts that no emails are enqueued for later delivery.

      def test_no_emails
         assert_no_enqueued_emails
      @@ -416,8 +387,7 @@ 

      end end

      -
      - +
      @@ -442,15 +412,10 @@

      -

      - - capture_emails(&block) - -

      +

      capture_emails(&block)

      - -
      -

      Returns any emails that are sent in the block.

      +
      +

      Returns any emails that are sent in the block.

      def test_emails
         emails = capture_emails do
      @@ -465,8 +430,7 @@ 

      assert_equal "Hi there", emails.first.subject end

      -
      - +
      @@ -495,15 +459,10 @@

      -

      - - deliver_enqueued_emails(queue: nil, at: nil, &block) - -

      +

      deliver_enqueued_emails(queue: nil, at: nil, &block)

      - -
      -

      Delivers all enqueued emails. If a block is given, delivers all of the emails that were enqueued throughout the duration of the block. If a block is not given, delivers all the enqueued emails up to this point in the test.

      +
      +

      Delivers all enqueued emails. If a block is given, delivers all of the emails that were enqueued throughout the duration of the block. If a block is not given, delivers all the enqueued emails up to this point in the test.

      def test_deliver_enqueued_emails
         deliver_enqueued_emails do
      @@ -537,8 +496,7 @@ 

      If the :at option is specified, then only delivers emails enqueued to deliver immediately or before the given time.

      -
      - +
      diff --git a/src/classes/ActionText.html b/src/classes/ActionText.html index 60b31d1e08..dcbb0b6328 100644 --- a/src/classes/ActionText.html +++ b/src/classes/ActionText.html @@ -205,17 +205,11 @@

      Methods

      Class Public methods

      -

      - - gem_version() - -

      +

      gem_version()

      - -
      -

      Returns the currently loaded version of Action Text as a Gem::Version.

      -
      - +
      +

      Returns the currently loaded version of Action Text as a Gem::Version.

      +
      @@ -240,17 +234,9 @@

      -

      - - html_document_class() - -

      +

      html_document_class()

      -
      - -
      - @@ -277,17 +263,9 @@

      -

      - - html_document_fragment_class() - -

      +

      html_document_fragment_class()

      -
      - -
      - @@ -314,17 +292,11 @@

      -

      - - version() - -

      +

      version()

      - -
      -

      Returns the currently loaded version of Action Text as a Gem::Version.

      -
      - +
      +

      Returns the currently loaded version of Action Text as a Gem::Version.

      +
      diff --git a/src/classes/ActionText/Attachable.html b/src/classes/ActionText/Attachable.html index f03dc75389..907b4a2929 100644 --- a/src/classes/ActionText/Attachable.html +++ b/src/classes/ActionText/Attachable.html @@ -140,17 +140,9 @@

      Constants

      Class Public methods

      -

      - - from_attachable_sgid(sgid, options = {}) - -

      +

      from_attachable_sgid(sgid, options = {})

      -
      - -
      - @@ -177,15 +169,10 @@

      -

      - - from_node(node) - -

      +

      from_node(node)

      - -
      -

      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>)
      @@ -193,8 +180,7 @@ 

      attachment_node = fragment.find_all(ActionText::Attachment.tag_name).first ActionText::Attachable.from_node(attachment_node) # => person

      -
      - +
      @@ -231,17 +217,9 @@

      Instance Public methods

      -

      - - attachable_content_type() - -

      +

      attachable_content_type()

      -
      - -
      - @@ -266,17 +244,9 @@

      -

      - - attachable_filename() - -

      +

      attachable_filename()

      -
      - -
      - @@ -301,17 +271,9 @@

      -

      - - attachable_filesize() - -

      +

      attachable_filesize()

      -
      - -
      - @@ -336,17 +298,9 @@

      -

      - - attachable_metadata() - -

      +

      attachable_metadata()

      -
      - -
      - @@ -371,17 +325,11 @@

      -

      - - attachable_sgid() - -

      +

      attachable_sgid()

      - -
      -

      Returns the Signed Global ID for the attachable. The purpose of the ID is set to ‘attachable’ so it can’t be reused for other purposes.

      -
      - +
      +

      Returns the Signed Global ID for the attachable. The purpose of the ID is set to ‘attachable’ so it can’t be reused for other purposes.

      +
      @@ -406,17 +354,9 @@

      -

      - - from_attachable_sgid(sgid) - -

      +

      from_attachable_sgid(sgid)

      -
      - -
      - @@ -441,17 +381,9 @@

      -

      - - previewable_attachable?() - -

      +

      previewable_attachable?()

      -
      - -
      - @@ -476,15 +408,10 @@

      -

      - - to_attachable_partial_path() - -

      +

      to_attachable_partial_path()

      - -
      -

      Returns the path to the partial that is used for rendering the attachable. Defaults to to_partial_path.

      +
      +

      Returns the path to the partial that is used for rendering the attachable. Defaults to to_partial_path.

      Override to render a different partial:

      @@ -494,8 +421,7 @@

      end end -

      - +
      @@ -520,15 +446,10 @@

      -

      - - to_missing_attachable_partial_path() - -

      +

      to_missing_attachable_partial_path()

      - -
      -

      Returns the path to the partial that is used for rendering missing attachables. Defaults to “action_text/attachables/missing_attachable”.

      +
      +

      Returns the path to the partial that is used for rendering missing attachables. Defaults to “action_text/attachables/missing_attachable”.

      Override to render a different partial:

      @@ -538,8 +459,7 @@

      end end -

      - +
      @@ -564,17 +484,9 @@

      -

      - - to_rich_text_attributes(attributes = {}) - -

      +

      to_rich_text_attributes(attributes = {})

      -
      - -
      - @@ -607,15 +519,10 @@

      -

      - - to_trix_content_attachment_partial_path() - -

      +

      to_trix_content_attachment_partial_path()

      - -
      -

      Returns the path to the partial that is used for rendering the attachable in Trix. Defaults to to_partial_path.

      +
      +

      Returns the path to the partial that is used for rendering the attachable in Trix. Defaults to to_partial_path.

      Override to render a different partial:

      @@ -625,8 +532,7 @@

      end end -

      - +
      diff --git a/src/classes/ActionText/Attachables/MissingAttachable.html b/src/classes/ActionText/Attachables/MissingAttachable.html index b55cfc4083..1bf80cc4df 100644 --- a/src/classes/ActionText/Attachables/MissingAttachable.html +++ b/src/classes/ActionText/Attachables/MissingAttachable.html @@ -84,17 +84,9 @@

      Constants

      Class Public methods

      -

      - - new(sgid) - -

      +

      new(sgid)

      -
      - -
      - @@ -123,17 +115,9 @@

      Instance Public methods

      -

      - - model() - -

      +

      model()

      -
      - -
      - @@ -158,17 +142,9 @@

      -

      - - to_partial_path() - -

      +

      to_partial_path()

      -
      - -
      - diff --git a/src/classes/ActionText/Attachables/RemoteImage.html b/src/classes/ActionText/Attachables/RemoteImage.html index 30de0b741a..b7c19879e7 100644 --- a/src/classes/ActionText/Attachables/RemoteImage.html +++ b/src/classes/ActionText/Attachables/RemoteImage.html @@ -113,17 +113,9 @@

      Attributes

      Class Public methods

      -

      - - from_node(node) - -

      +

      from_node(node)

      -
      - -
      - @@ -150,17 +142,9 @@

      -

      - - new(attributes = {}) - -

      +

      new(attributes = {})

      -
      - -
      - @@ -192,17 +176,9 @@

      Instance Public methods

      -

      - - attachable_plain_text_representation(caption) - -

      +

      attachable_plain_text_representation(caption)

      -
      - -
      - @@ -227,17 +203,9 @@

      -

      - - to_partial_path() - -

      +

      to_partial_path()

      -
      - -
      - diff --git a/src/classes/ActionText/Attachment.html b/src/classes/ActionText/Attachment.html index fedab3f48c..d0fc4810fd 100644 --- a/src/classes/ActionText/Attachment.html +++ b/src/classes/ActionText/Attachment.html @@ -163,17 +163,9 @@

      Attributes

      Class Public methods

      -

      - - fragment_by_canonicalizing_attachments(content) - -

      +

      fragment_by_canonicalizing_attachments(content)

      -
      - -
      - @@ -198,17 +190,9 @@

      -

      - - from_attachable(attachable, attributes = {}) - -

      +

      from_attachable(attachable, attributes = {})

      -
      - -
      - @@ -235,17 +219,9 @@

      -

      - - from_attachables(attachables) - -

      +

      from_attachables(attachables)

      -
      - -
      - @@ -270,17 +246,9 @@

      -

      - - from_attributes(attributes, attachable = nil) - -

      +

      from_attributes(attributes, attachable = nil)

      -
      - -
      - @@ -307,17 +275,9 @@

      -

      - - from_node(node, attachable = nil) - -

      +

      from_node(node, attachable = nil)

      -
      - -
      - @@ -342,17 +302,9 @@

      -

      - - new(node, attachable) - -

      +

      new(node, attachable)

      -
      - -
      - @@ -382,17 +334,9 @@

      Instance Public methods

      -

      - - caption() - -

      +

      caption()

      -
      - -
      - @@ -417,17 +361,9 @@

      -

      - - full_attributes() - -

      +

      full_attributes()

      -
      - -
      - @@ -452,17 +388,9 @@

      -

      - - inspect() - -

      +

      inspect()

      -
      - -
      - @@ -487,22 +415,16 @@

      -

      - - to_html() - -

      +

      to_html()

      - -
      -

      Converts the attachment to HTML.

      +
      +

      Converts the attachment to HTML.

      attachable = Person.create! name: "Javan"
       attachment = ActionText::Attachment.from_attachable(attachable)
       attachment.to_html # => "<action-text-attachment sgid=\"BAh7CEk...
       
      -
      - +
      @@ -527,15 +449,10 @@

      -

      - - to_plain_text() - -

      +

      to_plain_text()

      - -
      -

      Converts the attachment to plain text.

      +
      +

      Converts the attachment to plain text.

      attachable = ActiveStorage::Blob.find_by filename: "racecar.jpg"
       attachment = ActionText::Attachment.from_attachable(attachable)
      @@ -562,8 +479,7 @@ 

      attachment = ActionText::Attachment.from_attachable(attachable) attachment.to_plain_text # => "[Javan]"

      -
      - +
      @@ -592,17 +508,9 @@

      -

      - - to_s() - -

      +

      to_s()

      -
      - -
      - @@ -627,17 +535,9 @@

      -

      - - with_full_attributes() - -

      +

      with_full_attributes()

      -
      - -
      - diff --git a/src/classes/ActionText/AttachmentGallery.html b/src/classes/ActionText/AttachmentGallery.html index d6f736ae62..8b44371a6d 100644 --- a/src/classes/ActionText/AttachmentGallery.html +++ b/src/classes/ActionText/AttachmentGallery.html @@ -127,17 +127,9 @@

      Attributes

      Class Public methods

      -

      - - attachment_selector() - -

      +

      attachment_selector()

      -
      - -
      - @@ -162,17 +154,9 @@

      - + -
      - -
      - @@ -205,17 +189,9 @@
      -

      - - fragment_by_canonicalizing_attachment_galleries(content) - -

      +

      fragment_by_canonicalizing_attachment_galleries(content)

      -
      - -
      - @@ -242,17 +218,9 @@

      - + -
      - -
      - @@ -281,17 +249,9 @@
      -

      - - from_node(node) - -

      +

      from_node(node)

      -
      - -
      - @@ -316,17 +276,9 @@

      -

      - - new(node) - -

      +

      new(node)

      -
      - -
      - @@ -351,17 +303,9 @@

      -

      - - selector() - -

      +

      selector()

      -
      - -
      - @@ -390,17 +334,9 @@

      Instance Public methods

      -

      - - attachments() - -

      +

      attachments()

      -
      - -
      - @@ -427,17 +363,9 @@

      -

      - - inspect() - -

      +

      inspect()

      -
      - -
      - @@ -462,17 +390,9 @@

      -

      - - size() - -

      +

      size()

      -
      - -
      - diff --git a/src/classes/ActionText/Attachments/Caching.html b/src/classes/ActionText/Attachments/Caching.html index a4e8296e99..f7e7443fac 100644 --- a/src/classes/ActionText/Attachments/Caching.html +++ b/src/classes/ActionText/Attachments/Caching.html @@ -58,17 +58,9 @@

      Methods

      Instance Public methods

      -

      - - cache_key(*args) - -

      +

      cache_key(*args)

      -
      - -
      - diff --git a/src/classes/ActionText/Attachments/Minification.html b/src/classes/ActionText/Attachments/Minification.html index dbaa7d4933..f922182f75 100644 --- a/src/classes/ActionText/Attachments/Minification.html +++ b/src/classes/ActionText/Attachments/Minification.html @@ -58,17 +58,9 @@

      Methods

      Instance Public methods

      -

      - - fragment_by_minifying_attachments(content) - -

      +

      fragment_by_minifying_attachments(content)

      -
      - -
      - diff --git a/src/classes/ActionText/Attachments/TrixConversion.html b/src/classes/ActionText/Attachments/TrixConversion.html index a3aec75f23..46a69c5989 100644 --- a/src/classes/ActionText/Attachments/TrixConversion.html +++ b/src/classes/ActionText/Attachments/TrixConversion.html @@ -66,17 +66,9 @@

      Methods

      Instance Public methods

      -

      - - fragment_by_converting_trix_attachments(content) - -

      +

      fragment_by_converting_trix_attachments(content)

      -
      - -
      - @@ -103,17 +95,9 @@

      -

      - - from_trix_attachment(trix_attachment) - -

      +

      from_trix_attachment(trix_attachment)

      -
      - -
      - @@ -138,17 +122,9 @@

      -

      - - to_trix_attachment(content = trix_attachment_content) - -

      +

      to_trix_attachment(content = trix_attachment_content)

      -
      - -
      - diff --git a/src/classes/ActionText/Attribute.html b/src/classes/ActionText/Attribute.html index 80cc7d8826..eab0b8b3c3 100644 --- a/src/classes/ActionText/Attribute.html +++ b/src/classes/ActionText/Attribute.html @@ -66,15 +66,10 @@

      Methods

      Instance Public methods

      -

      - - has_rich_text(name, encrypted: false, strict_loading: strict_loading_by_default, store_if_blank: true) - -

      +

      has_rich_text(name, encrypted: false, strict_loading: strict_loading_by_default, store_if_blank: true)

      - -
      -

      Provides access to a dependent RichText model that holds the body and attachments for a single named rich text attribute. This dependent attribute is lazily instantiated and will be auto-saved when it’s been changed. Example:

      +
      +

      Provides access to a dependent RichText model that holds the body and attachments for a single named rich text attribute. This dependent attribute is lazily instantiated and will be auto-saved when it’s been changed. Example:

      class Message < ActiveRecord::Base
         has_rich_text :content
      @@ -105,8 +100,7 @@ 

      Options

    Note: Action Text relies on polymorphic associations, which in turn store class names in the database. When renaming classes that use has_rich_text, make sure to also update the class names in the action_text_rich_texts.record_type polymorphic type column of the corresponding rows.

    -
    - +
    @@ -168,17 +162,11 @@

    Options

    -

    - - rich_text_association_names() - -

    +

    rich_text_association_names()

    - -
    -

    Returns the names of all rich text associations.

    -
    - +
    +

    Returns the names of all rich text associations.

    +
    @@ -203,17 +191,11 @@

    -

    - - with_all_rich_text() - -

    +

    with_all_rich_text()

    - -
    -

    Eager load all dependent RichText models in bulk.

    -
    - +
    +

    Eager load all dependent RichText models in bulk.

    +
    diff --git a/src/classes/ActionText/Content.html b/src/classes/ActionText/Content.html index 139bc102a3..40d94f336d 100644 --- a/src/classes/ActionText/Content.html +++ b/src/classes/ActionText/Content.html @@ -169,17 +169,9 @@

    Attributes

    Class Public methods

    -

    - - fragment_by_canonicalizing_content(content) - -

    +

    fragment_by_canonicalizing_content(content)

    -
    - -
    - @@ -206,17 +198,9 @@

    -

    - - new(content = nil, options = {}) - -

    +

    new(content = nil, options = {})

    -
    - -
    - @@ -251,17 +235,9 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    -
    - -
    - @@ -290,17 +266,9 @@

    -

    - - append_attachables(attachables) - -

    +

    append_attachables(attachables)

    -
    - -
    - @@ -326,17 +294,9 @@

    -

    - - as_json(*) - -

    +

    as_json(*)

    -
    - -
    - @@ -361,23 +321,17 @@

    -

    - - attachables() - -

    +

    attachables()

    - -
    -

    Extracts ActionText::Attachable objects from the HTML fragment:

    +
    +

    Extracts ActionText::Attachable objects from the HTML fragment:

    attachable = ActiveStorage::Blob.first
     html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
     content = ActionText::Content.new(html)
     content.attachables # => [attachable]
     
    -
    - +
    @@ -404,17 +358,9 @@

    -

    - - attachment_galleries() - -

    +

    attachment_galleries()

    -
    - -
    - @@ -441,23 +387,17 @@

    -

    - - attachments() - -

    +

    attachments()

    - -
    -

    Extracts ActionText::Attachment objects from the HTML fragment:

    +
    +

    Extracts ActionText::Attachment objects from the HTML fragment:

    attachable = ActiveStorage::Blob.first
     html = %Q(<action-text-attachment sgid="#{attachable.attachable_sgid}" caption="Captioned"></action-text-attachment>)
     content = ActionText::Content.new(html)
     content.attachments # => [#<ActionText::Attachment attachable=#<ActiveStorage::Blob...
     
    -
    - +
    @@ -484,17 +424,9 @@

    - + -
    - -
    - @@ -519,17 +451,9 @@
    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -554,22 +478,16 @@

    - + - -
    -

    Extracts links from the HTML fragment:

    +
    +

    Extracts links from the HTML fragment:

    html = '<a href="http://example.com/">Example</a>'
     content = ActionText::Content.new(html)
     content.links # => ["http://example.com/"]
     
    -
    - +
    @@ -594,17 +512,9 @@
    -

    - - render_attachment_galleries(&block) - -

    +

    render_attachment_galleries(&block)

    -
    - -
    - @@ -632,17 +542,9 @@

    -

    - - render_attachments(**options, &block) - -

    +

    render_attachments(**options, &block)

    -
    - -
    - @@ -674,17 +576,9 @@

    -

    - - to_html() - -

    +

    to_html()

    -
    - -
    - @@ -709,17 +603,9 @@

    -

    - - to_partial_path() - -

    +

    to_partial_path()

    -
    - -
    - @@ -744,15 +630,10 @@

    -

    - - to_plain_text() - -

    +

    to_plain_text()

    - -
    -

    Returns a plain-text version of the markup contained by the content, with tags removed but HTML entities encoded.

    +
    +

    Returns a plain-text version of the markup contained by the content, with tags removed but HTML entities encoded.

    content = ActionText::Content.new("<h1>Funny times!</h1>")
     content.to_plain_text # => "Funny times!"
    @@ -767,8 +648,7 @@ 

    content.to_plain_text # => "<script>alert()</script>" ActionText::ContentHelper.sanitizer.sanitize(content.to_plain_text) # => ""

    -
    - +
    @@ -793,17 +673,9 @@

    -

    - - to_rendered_html_with_layout() - -

    +

    to_rendered_html_with_layout()

    -
    - -
    - @@ -828,15 +700,10 @@

    -

    - - to_s() - -

    +

    to_s()

    - -
    -

    Safely transforms Content into an HTML String.

    +
    +

    Safely transforms Content into an HTML String.

    content = ActionText::Content.new(content: "<h1>Funny times!</h1>")
     content.to_s # => "<h1>Funny times!</h1>"
    @@ -844,8 +711,7 @@ 

    content = ActionText::Content.new("<div onclick='action()'>safe<script>unsafe</script></div>") content.to_s # => "<div>safeunsafe</div>"

    -
    - +
    @@ -870,17 +736,9 @@

    -

    - - to_trix_html() - -

    +

    to_trix_html()

    -
    - -
    - diff --git a/src/classes/ActionText/ContentHelper.html b/src/classes/ActionText/ContentHelper.html index e8fea2b93c..35481b3708 100644 --- a/src/classes/ActionText/ContentHelper.html +++ b/src/classes/ActionText/ContentHelper.html @@ -78,17 +78,9 @@

    Methods

    Instance Public methods

    -

    - - render_action_text_attachments(content) - -

    +

    render_action_text_attachments(content)

    -
    - -
    - @@ -126,17 +118,9 @@

    -

    - - render_action_text_content(content) - -

    +

    render_action_text_content(content)

    -
    - -
    - @@ -162,17 +146,9 @@

    -

    - - sanitize_action_text_content(content) - -

    +

    sanitize_action_text_content(content)

    -
    - -
    - @@ -202,17 +178,9 @@

    -

    - - sanitize_content_attachment(content_attachment) - -

    +

    sanitize_content_attachment(content_attachment)

    -
    - -
    - @@ -242,17 +210,9 @@

    -

    - - sanitizer_allowed_attributes() - -

    +

    sanitizer_allowed_attributes()

    -
    - -
    - @@ -277,17 +237,9 @@

    -

    - - sanitizer_allowed_tags() - -

    +

    sanitizer_allowed_tags()

    -
    - -
    - diff --git a/src/classes/ActionText/Encryption.html b/src/classes/ActionText/Encryption.html index f06653f9d4..30821dae02 100644 --- a/src/classes/ActionText/Encryption.html +++ b/src/classes/ActionText/Encryption.html @@ -62,17 +62,9 @@

    Methods

    Instance Public methods

    -

    - - decrypt() - -

    +

    decrypt()

    -
    - -
    - @@ -100,17 +92,9 @@

    -

    - - encrypt() - -

    +

    encrypt()

    -
    - -
    - diff --git a/src/classes/ActionText/Engine.html b/src/classes/ActionText/Engine.html index 172b4cbbb0..8042ac1443 100644 --- a/src/classes/ActionText/Engine.html +++ b/src/classes/ActionText/Engine.html @@ -102,17 +102,9 @@

    Included Modules

    Instance Public methods

    -

    - - attachable_plain_text_representation(caption = nil) - -

    +

    attachable_plain_text_representation(caption = nil)

    -
    - -
    - @@ -137,17 +129,9 @@

    -

    - - previewable_attachable?() - -

    +

    previewable_attachable?()

    -
    - -
    - @@ -172,17 +156,9 @@

    -

    - - to_trix_content_attachment_partial_path() - -

    +

    to_trix_content_attachment_partial_path()

    -
    - -
    - diff --git a/src/classes/ActionText/FixtureSet.html b/src/classes/ActionText/FixtureSet.html index a472322749..3a4b65f4c8 100644 --- a/src/classes/ActionText/FixtureSet.html +++ b/src/classes/ActionText/FixtureSet.html @@ -100,15 +100,10 @@

    Methods

    Class Public methods

    -

    - - attachment(fixture_set_name, label, column_type: :integer) - -

    +

    attachment(fixture_set_name, label, column_type: :integer)

    - -
    -

    Fixtures support Action Text attachments as part of their body HTML.

    +
    +

    Fixtures support Action Text attachments as part of their body HTML.

    Examples

    @@ -125,8 +120,7 @@

    Examples

    name: content body: <div>Hello, <%= ActionText::FixtureSet.attachment("articles", :first) %></div> -
    - +
    diff --git a/src/classes/ActionText/Fragment.html b/src/classes/ActionText/Fragment.html index 332c33c0e2..4bc7c8ef68 100644 --- a/src/classes/ActionText/Fragment.html +++ b/src/classes/ActionText/Fragment.html @@ -109,17 +109,9 @@

    Attributes

    Class Public methods

    -

    - - from_html(html) - -

    +

    from_html(html)

    -
    - -
    - @@ -144,17 +136,9 @@

    -

    - - new(source) - -

    +

    new(source)

    -
    - -
    - @@ -179,17 +163,9 @@

    -

    - - wrap(fragment_or_html) - -

    +

    wrap(fragment_or_html)

    -
    - -
    - @@ -225,17 +201,9 @@

    Instance Public methods

    -

    - - find_all(selector) - -

    +

    find_all(selector)

    -
    - -
    - @@ -260,17 +228,9 @@

    -

    - - replace(selector) - -

    +

    replace(selector)

    -
    - -
    - @@ -300,17 +260,9 @@

    -

    - - to_html() - -

    +

    to_html()

    -
    - -
    - @@ -335,17 +287,9 @@

    -

    - - to_plain_text() - -

    +

    to_plain_text()

    -
    - -
    - @@ -370,17 +314,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - @@ -405,17 +341,9 @@

    -

    - - update() - -

    +

    update()

    -
    - -
    - diff --git a/src/classes/ActionText/HtmlConversion.html b/src/classes/ActionText/HtmlConversion.html index b2c6ec0fbc..2ecd8caef1 100644 --- a/src/classes/ActionText/HtmlConversion.html +++ b/src/classes/ActionText/HtmlConversion.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - create_element(tag_name, attributes = {}) - -

    +

    create_element(tag_name, attributes = {})

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - fragment_for_html(html) - -

    +

    fragment_for_html(html)

    -
    - -
    - @@ -136,17 +120,9 @@

    -

    - - node_to_html(node) - -

    +

    node_to_html(node)

    -
    - -
    - diff --git a/src/classes/ActionText/PlainTextConversion.html b/src/classes/ActionText/PlainTextConversion.html index ca20b98289..f5e7142725 100644 --- a/src/classes/ActionText/PlainTextConversion.html +++ b/src/classes/ActionText/PlainTextConversion.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - node_to_plain_text(node) - -

    +

    node_to_plain_text(node)

    -
    - -
    - diff --git a/src/classes/ActionText/RichText.html b/src/classes/ActionText/RichText.html index 70edb65915..561600720d 100644 --- a/src/classes/ActionText/RichText.html +++ b/src/classes/ActionText/RichText.html @@ -103,19 +103,13 @@

    Methods

    Instance Public methods

    -

    - - embeds - -

    +

    embeds

    - -
    -

    Returns the ActiveStorage::Attachment records from the embedded files.

    +
    +

    Returns the ActiveStorage::Attachment records from the embedded files.

    Attached ActiveStorage::Blob records are extracted from the body in a before_validation callback.

    -
    - +
    @@ -139,17 +133,11 @@

    -

    - - record - -

    +

    record

    - -
    -

    Returns the associated record.

    -
    - +
    +

    Returns the associated record.

    +
    @@ -173,15 +161,10 @@

    -

    - - to_plain_text() - -

    +

    to_plain_text()

    - -
    -

    Returns a plain-text version of the markup contained by the body attribute, with tags removed but HTML entities encoded.

    +
    +

    Returns a plain-text version of the markup contained by the body attribute, with tags removed but HTML entities encoded.

    message = Message.create!(content: "<h1>Funny times!</h1>")
     message.content.to_plain_text # => "Funny times!"
    @@ -192,8 +175,7 @@ 

    message = Message.create!(content: "&lt;script&gt;alert()&lt;/script&gt;")
     message.content.to_plain_text # => "<script>alert()</script>"
     
    -

    - +
    @@ -218,15 +200,10 @@

    -

    - - to_s - -

    +

    to_s

    - -
    -

    Safely transforms RichText into an HTML String.

    +
    +

    Safely transforms RichText into an HTML String.

    message = Message.create!(content: "<h1>Funny times!</h1>")
     message.content.to_s # => "<h1>Funny times!</h1>"
    @@ -234,8 +211,7 @@ 

    message = Message.create!(content: "<div onclick='action()'>safe<script>unsafe</script></div>") message.content.to_s # => "<div>safeunsafe</div>"

    -
    - +
    @@ -259,15 +235,10 @@

    -

    - - to_trix_html() - -

    +

    to_trix_html()

    - -
    -

    Returns the body attribute in a format that makes it editable in the Trix editor. Previews of attachments are rendered inline.

    +
    +

    Returns the body attribute in a format that makes it editable in the Trix editor. Previews of attachments are rendered inline.

    content = "<h1>Funny Times!</h1><figure data-trix-attachment='{\"sgid\":\"..."\}'></figure>"
     message = Message.create!(content: content)
    @@ -279,8 +250,7 @@ 

    # </figure> # </div>

    -
    - +
    diff --git a/src/classes/ActionText/Serialization.html b/src/classes/ActionText/Serialization.html index 0f661073c4..fad0f7a1a4 100644 --- a/src/classes/ActionText/Serialization.html +++ b/src/classes/ActionText/Serialization.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - _dump(*) - -

    +

    _dump(*)

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - dump(content) - -

    +

    dump(content)

    -
    - -
    - @@ -145,17 +129,9 @@

    -

    - - load(content) - -

    +

    load(content)

    -
    - -
    - diff --git a/src/classes/ActionText/SystemTestHelper.html b/src/classes/ActionText/SystemTestHelper.html index a7a12aadba..d939c08e8a 100644 --- a/src/classes/ActionText/SystemTestHelper.html +++ b/src/classes/ActionText/SystemTestHelper.html @@ -62,24 +62,17 @@

    Methods

    Instance Public methods

    -

    - - fill_in_rich_text_area(locator = nil, with:, **) - -

    +

    fill_in_rich_text_area(locator = nil, with:, **)

    -
    - -
    - -
    - Alias for: fill_in_rich_textarea -
    +

    + Alias for: + fill_in_rich_textarea. +

    @@ -87,15 +80,10 @@

    -

    - - fill_in_rich_textarea(locator = nil, with:, **) - -

    +

    fill_in_rich_textarea(locator = nil, with:, **)

    - -
    -

    Locates a Trix editor and fills it in with the given HTML.

    +
    +

    Locates a Trix editor and fills it in with the given HTML.

    The editor can be found by:

    • @@ -131,13 +119,14 @@

      # <trix-editor input="trix_input_1"></trix-editor> fill_in_rich_textarea "message[content]", with: "Hello <em>world!</em>" -

    - +
    -
    - Also aliased as: fill_in_rich_text_area -
    +

    + Also aliased as: + + fill_in_rich_text_area. +

    diff --git a/src/classes/ActionText/TagHelper.html b/src/classes/ActionText/TagHelper.html index 8cc8ef8244..956c8803ed 100644 --- a/src/classes/ActionText/TagHelper.html +++ b/src/classes/ActionText/TagHelper.html @@ -62,24 +62,17 @@

    Methods

    Instance Public methods

    -

    - - rich_text_area_tag(name, value = nil, options = {}, &block) - -

    +

    rich_text_area_tag(name, value = nil, options = {}, &block)

    -
    - -
    - -
    - Alias for: rich_textarea_tag -
    +

    + Alias for: + rich_textarea_tag. +

    @@ -87,15 +80,10 @@

    -

    - - rich_textarea_tag(name, value = nil, options = {}, &block) - -

    +

    rich_textarea_tag(name, value = nil, options = {}, &block)

    - -
    -

    Returns a trix-editor tag that instantiates the Trix JavaScript editor as well as a hidden field that Trix will write to on changes, so the content will be sent on form submissions.

    +
    +

    Returns a trix-editor tag that instantiates the Trix JavaScript editor as well as a hidden field that Trix will write to on changes, so the content will be sent on form submissions.

    Options

    • @@ -118,13 +106,14 @@

      Example

      # <input type="hidden" name="content" id="trix_input_post_1" value="&lt;h1&gt;Default content&lt;/h1&gt;"> # <trix-editor id="content" input="trix_input_post_1" class="trix-content" ...></trix-editor>
      -
    - +
    -
    - Also aliased as: rich_text_area_tag -
    +

    + Also aliased as: + + rich_text_area_tag. +

    diff --git a/src/classes/ActionText/TrixAttachment.html b/src/classes/ActionText/TrixAttachment.html index 7b35b3cdc8..0f4b79b2d3 100644 --- a/src/classes/ActionText/TrixAttachment.html +++ b/src/classes/ActionText/TrixAttachment.html @@ -140,17 +140,9 @@

    Attributes

    Class Public methods

    -

    - - from_attributes(attributes) - -

    +

    from_attributes(attributes)

    -
    - -
    - @@ -184,17 +176,9 @@

    -

    - - new(node) - -

    +

    new(node)

    -
    - -
    - @@ -223,17 +207,9 @@

    Instance Public methods

    -

    - - attributes() - -

    +

    attributes()

    -
    - -
    - @@ -258,17 +234,9 @@

    -

    - - to_html() - -

    +

    to_html()

    -
    - -
    - @@ -293,17 +261,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActionView.html b/src/classes/ActionView.html index a9a18cb3f9..c81338c0d3 100644 --- a/src/classes/ActionView.html +++ b/src/classes/ActionView.html @@ -459,17 +459,9 @@

    Attributes

    Class Public methods

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - @@ -496,17 +488,11 @@

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Action View as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Action View as a Gem::Version.

    +
    @@ -531,17 +517,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Action View as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Action View as a Gem::Version.

    +
    diff --git a/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html b/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html index 069971fd1f..94fd592441 100644 --- a/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html +++ b/src/classes/ActionView/AbstractRenderer/RenderedCollection/EmptyCollection.html @@ -81,17 +81,9 @@

    Attributes

    Class Public methods

    -

    - - new(format) - -

    +

    new(format)

    -
    - -
    - @@ -120,17 +112,9 @@

    Instance Public methods

    -

    - - body() - -

    +

    body()

    -
    - -
    - diff --git a/src/classes/ActionView/Base.html b/src/classes/ActionView/Base.html index 760b112572..f4b9e47557 100644 --- a/src/classes/ActionView/Base.html +++ b/src/classes/ActionView/Base.html @@ -253,17 +253,9 @@

    Attributes

    Class Public methods

    -

    - - cache_template_loading() - -

    +

    cache_template_loading()

    -
    - -
    - @@ -288,17 +280,9 @@

    -

    - - cache_template_loading=(value) - -

    +

    cache_template_loading=(value)

    -
    - -
    - @@ -323,17 +307,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -362,17 +338,9 @@

    Instance Public methods

    -

    - - _run(method, template, locals, buffer, add_to_stack: true, has_strict_locals: false, &block) - -

    +

    _run(method, template, locals, buffer, add_to_stack: true, has_strict_locals: false, &block)

    -
    - -
    - @@ -416,17 +384,9 @@

    -

    - - compiled_method_container() - -

    +

    compiled_method_container()

    -
    - -
    - @@ -455,17 +415,9 @@

    -

    - - in_rendering_context(options) - -

    +

    in_rendering_context(options)

    -
    - -
    - diff --git a/src/classes/ActionView/Context.html b/src/classes/ActionView/Context.html index aa93d438ab..e42e9ebeff 100644 --- a/src/classes/ActionView/Context.html +++ b/src/classes/ActionView/Context.html @@ -94,17 +94,11 @@

    Attributes

    Instance Public methods

    -

    - - _layout_for(name = nil) - -

    +

    _layout_for(name = nil)

    - -
    -

    Encapsulates the interaction with the view flow so it returns the correct buffer on yield. This is usually overwritten by helpers to add more behavior.

    -
    - +
    +

    Encapsulates the interaction with the view flow so it returns the correct buffer on yield. This is usually overwritten by helpers to add more behavior.

    +
    @@ -130,17 +124,11 @@

    -

    - - _prepare_context() - -

    +

    _prepare_context()

    - -
    -

    Prepares the context by setting the appropriate instance variables.

    -
    - +
    +

    Prepares the context by setting the appropriate instance variables.

    +
    diff --git a/src/classes/ActionView/Digestor.html b/src/classes/ActionView/Digestor.html index bdfaee965f..720aef3602 100644 --- a/src/classes/ActionView/Digestor.html +++ b/src/classes/ActionView/Digestor.html @@ -92,15 +92,10 @@

    Methods

    Class Public methods

    -

    - - digest(name:, format: nil, finder:, dependencies: nil) - -

    +

    digest(name:, format: nil, finder:, dependencies: nil)

    - -
    -

    Supported options:

    +
    +

    Supported options:

    • name - Template name

    • @@ -110,8 +105,7 @@

    • dependencies - An array of dependent views

    -
    - +
    @@ -154,17 +148,9 @@

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -189,17 +175,11 @@

    -

    - - tree(name, finder, partial = false, seen = {}) - -

    +

    tree(name, finder, partial = false, seen = {})

    - -
    -

    Create a dependency tree for template named name.

    -
    - +
    +

    Create a dependency tree for template named name.

    +
    diff --git a/src/classes/ActionView/Digestor/Injected.html b/src/classes/ActionView/Digestor/Injected.html index ee493e4858..451ecc38bd 100644 --- a/src/classes/ActionView/Digestor/Injected.html +++ b/src/classes/ActionView/Digestor/Injected.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - digest(finder, _ = []) - -

    +

    digest(finder, _ = [])

    -
    - -
    - diff --git a/src/classes/ActionView/Digestor/Missing.html b/src/classes/ActionView/Digestor/Missing.html index 367bb7d7d1..1a393b3c5b 100644 --- a/src/classes/ActionView/Digestor/Missing.html +++ b/src/classes/ActionView/Digestor/Missing.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - digest(finder, _ = []) - -

    +

    digest(finder, _ = [])

    -
    - -
    - diff --git a/src/classes/ActionView/Digestor/Node.html b/src/classes/ActionView/Digestor/Node.html index d772fadfd3..d3be64260a 100644 --- a/src/classes/ActionView/Digestor/Node.html +++ b/src/classes/ActionView/Digestor/Node.html @@ -117,17 +117,9 @@

    Attributes

    Class Public methods

    -

    - - create(name, logical_name, template, partial) - -

    +

    create(name, logical_name, template, partial)

    -
    - -
    - @@ -153,17 +145,9 @@

    -

    - - new(name, logical_name, template, children = []) - -

    +

    new(name, logical_name, template, children = [])

    -
    - -
    - @@ -195,17 +179,9 @@

    Instance Public methods

    -

    - - dependency_digest(finder, stack) - -

    +

    dependency_digest(finder, stack)

    -
    - -
    - @@ -239,17 +215,9 @@

    -

    - - digest(finder, stack = []) - -

    +

    digest(finder, stack = [])

    -
    - -
    - @@ -274,17 +242,9 @@

    -

    - - to_dep_map(seen = Set.new.compare_by_identity) - -

    +

    to_dep_map(seen = Set.new.compare_by_identity)

    -
    - -
    - diff --git a/src/classes/ActionView/Digestor/NullLogger.html b/src/classes/ActionView/Digestor/NullLogger.html index c8e4cbbc55..0469314e3b 100644 --- a/src/classes/ActionView/Digestor/NullLogger.html +++ b/src/classes/ActionView/Digestor/NullLogger.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - debug(_) - -

    +

    debug(_)

    -
    - -
    - @@ -100,17 +92,9 @@

    -

    - - error(_) - -

    +

    error(_)

    -
    - -
    - diff --git a/src/classes/ActionView/FileSystemResolver.html b/src/classes/ActionView/FileSystemResolver.html index 6e068fdd17..ae5193fafa 100644 --- a/src/classes/ActionView/FileSystemResolver.html +++ b/src/classes/ActionView/FileSystemResolver.html @@ -103,17 +103,9 @@

    Attributes

    Class Public methods

    -

    - - new(path) - -

    +

    new(path)

    -
    - -
    - @@ -146,24 +138,17 @@

    Instance Public methods

    -

    - - ==(resolver) - -

    +

    ==(resolver)

    -
    - -
    - -
    - Alias for: eql? -
    +

    + Alias for: + eql?. +

    @@ -171,17 +156,9 @@

    -

    - - clear_cache() - -

    +

    clear_cache()

    -
    - -
    - @@ -208,22 +185,16 @@

    -

    - - eql?(resolver) - -

    +

    eql?(resolver)

    -
    - -
    - -
    - Also aliased as: == -
    +

    + Also aliased as: + + ==. +

    @@ -247,24 +218,17 @@

    -

    - - to_path() - -

    +

    to_path()

    -
    - -
    - -
    - Alias for: to_s -
    +

    + Alias for: + to_s. +

    @@ -272,22 +236,16 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - -
    - Also aliased as: to_path -
    +

    + Also aliased as: + + to_path. +

    diff --git a/src/classes/ActionView/FixtureResolver.html b/src/classes/ActionView/FixtureResolver.html index ba2332bef9..2807485e2a 100644 --- a/src/classes/ActionView/FixtureResolver.html +++ b/src/classes/ActionView/FixtureResolver.html @@ -77,17 +77,9 @@

    Methods

    Class Public methods

    -

    - - new(hash = {}) - -

    +

    new(hash = {})

    -
    - -
    - @@ -118,17 +110,9 @@

    Instance Public methods

    -

    - - data() - -

    +

    data()

    -
    - -
    - @@ -153,17 +137,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html b/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html index b3597b6ef2..3e8c1e15a9 100644 --- a/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html +++ b/src/classes/ActionView/Helpers/ActiveModelInstanceTag.html @@ -80,17 +80,9 @@

    Methods

    Instance Public methods

    -

    - - content_tag(type, options, *) - -

    +

    content_tag(type, options, *)

    -
    - -
    - @@ -115,17 +107,9 @@

    -

    - - error_message() - -

    +

    error_message()

    -
    - -
    - @@ -150,17 +134,9 @@

    -

    - - error_wrapping(html_tag) - -

    +

    error_wrapping(html_tag)

    -
    - -
    - @@ -189,17 +165,9 @@

    -

    - - object() - -

    +

    object()

    -
    - -
    - @@ -227,17 +195,9 @@

    -

    - - tag(type, options, *) - -

    +

    tag(type, options, *)

    -
    - -
    - diff --git a/src/classes/ActionView/Helpers/AssetTagHelper.html b/src/classes/ActionView/Helpers/AssetTagHelper.html index c86f909b54..7506a41286 100644 --- a/src/classes/ActionView/Helpers/AssetTagHelper.html +++ b/src/classes/ActionView/Helpers/AssetTagHelper.html @@ -126,15 +126,10 @@

    Included Modules

    Instance Public methods

    -

    - - audio_tag(*sources) - -

    +

    audio_tag(*sources)

    - -
    -

    Returns an HTML audio tag for the sources. If sources is a string, a single audio tag will be returned. If sources is an array, an audio tag with nested source tags for each source will be returned. The sources can be full paths, files that exist in your public audios directory, or Active Storage attachments.

    +
    +

    Returns an HTML audio tag for the sources. If sources is a string, a single audio tag will be returned. If sources is an array, an audio tag with nested source tags for each source will be returned. The sources can be full paths, files that exist in your public audios directory, or Active Storage attachments.

    When the last parameter is a hash you can add HTML attributes using that parameter.

    @@ -153,8 +148,7 @@

    audio_tag(user.name_pronunciation_audio)
     # => <audio src="/rails/active_storage/blobs/.../name_pronunciation_audio.mp3"></audio>
     
    -

    - +
    @@ -179,15 +173,10 @@

    - + - -
    -

    Returns a link tag that browsers and feed readers can use to auto-detect an RSS, Atom, or JSON feed. The type can be :rss (default), :atom, or :json. Control the link options in url_for format using the url_options. You can modify the LINK tag itself in tag_options.

    +
    +

    Returns a link tag that browsers and feed readers can use to auto-detect an RSS, Atom, or JSON feed. The type can be :rss (default), :atom, or :json. Control the link options in url_for format using the url_options. You can modify the LINK tag itself in tag_options.

    • @@ -215,8 +204,7 @@ auto_discovery_link_tag(:rss, "http://www.example.com/feed.rss", {title: "Example RSS"}) # => <link rel="alternate" type="application/rss+xml" title="Example RSS" href="http://www.example.com/feed.rss" /> -
    - +
    @@ -251,15 +239,10 @@
    - + - -
    -

    Returns a link tag for a favicon managed by the asset pipeline.

    +
    +

    Returns a link tag for a favicon managed by the asset pipeline.

    If a page has no link like the one generated by this helper, browsers ask for /favicon.ico automatically, and cache the file if the request succeeds. If the favicon changes it is hard to get it updated.

    @@ -279,8 +262,7 @@
    - +
    @@ -309,15 +291,10 @@
    -

    - - image_tag(source, options = {}) - -

    +

    image_tag(source, options = {})

    - -
    -

    Returns an HTML image tag for the source. The source can be a full path, a file, or an Active Storage attachment.

    +
    +

    Returns an HTML image tag for the source. The source can be a full path, a file, or an Active Storage attachment.

    Options

    @@ -361,8 +338,7 @@

    Examples

    image_tag(user.avatar.variant(resize_to_limit: [100, 100]), size: '100') # => <img width="100" height="100" src="/rails/active_storage/representations/.../tiger.jpg" /> -
    - +
    @@ -405,15 +381,10 @@

    Examples

    -

    - - javascript_include_tag(*sources) - -

    +

    javascript_include_tag(*sources)

    - -
    -

    Returns an HTML script tag for each of the sources provided.

    +
    +

    Returns an HTML script tag for each of the sources provided.

    Sources may be paths to JavaScript files. Relative paths are assumed to be relative to assets/javascripts, full paths are assumed to be relative to the document root. Relative paths are idiomatic, use absolute paths only when needed.

    @@ -483,8 +454,7 @@

    Examples

    javascript_include_tag "http://www.example.com/xmlhr.js", defer: true # => <script src="http://www.example.com/xmlhr.js" defer="defer"></script> -
    - +
    @@ -545,15 +515,10 @@

    Examples

    -

    - - picture_tag(*sources, &block) - -

    +

    picture_tag(*sources, &block)

    - -
    -

    Returns an HTML picture tag for the sources. If sources is a string, a single picture tag will be returned. If sources is an array, a picture tag with nested source tags for each source will be returned. The sources can be full paths, files that exist in your public images directory, or Active Storage attachments. Since the picture tag requires an img tag, the last element you provide will be used for the img tag. For complete control over the picture tag, a block can be passed, which will populate the contents of the tag accordingly.

    +
    +

    Returns an HTML picture tag for the sources. If sources is a string, a single picture tag will be returned. If sources is an array, a picture tag with nested source tags for each source will be returned. The sources can be full paths, files that exist in your public images directory, or Active Storage attachments. Since the picture tag requires an img tag, the last element you provide will be used for the img tag. For complete control over the picture tag, a block can be passed, which will populate the contents of the tag accordingly.

    Options

    @@ -587,8 +552,7 @@

    Examples

    picture_tag(user.profile_picture)
     # => <picture><img src="/rails/active_storage/blobs/.../profile_picture.webp" /></picture>
     
    -
    - +
    @@ -631,15 +595,10 @@

    Examples

    - + - -
    -

    Returns a link tag that browsers can use to preload the source. The source can be the path of a resource managed by asset pipeline, a full path, or an URI.

    +
    +

    Returns a link tag that browsers can use to preload the source. The source can be the path of a resource managed by asset pipeline, a full path, or an URI.

    • @@ -677,8 +636,7 @@ preload_link_tag("/media/audio.ogg", nopush: true) # => <link rel="preload" href="/media/audio.ogg" as="audio" type="audio/ogg" /> -
    - +
    @@ -740,15 +698,10 @@
    - + - -
    -

    Returns a stylesheet link tag for the sources specified as arguments.

    +
    +

    Returns a stylesheet link tag for the sources specified as arguments.

    When passing paths, the .css extension is optional. If you don’t specify an extension, .css will be appended automatically. If you do not want .css appended to the path, set extname: false in the options. You can modify the link attributes by passing a hash as the last argument.

    @@ -796,8 +749,7 @@ stylesheet_link_tag "style", nonce: true # => <link href="/assets/style.css" rel="stylesheet" nonce="..." />
    -
    - +
    @@ -863,15 +815,10 @@
    -

    - - video_tag(*sources) - -

    +

    video_tag(*sources)

    - -
    -

    Returns an HTML video tag for the sources. If sources is a string, a single video tag will be returned. If sources is an array, a video tag with nested source tags for each source will be returned. The sources can be full paths, files that exist in your public videos directory, or Active Storage attachments.

    +
    +

    Returns an HTML video tag for the sources. If sources is a string, a single video tag will be returned. If sources is an array, a video tag with nested source tags for each source will be returned. The sources can be full paths, files that exist in your public videos directory, or Active Storage attachments.

    Options

    @@ -915,8 +862,7 @@

    Examples

    video_tag(user.intro_video)
     # => <video src="/rails/active_storage/blobs/.../intro_video.mp4"></video>
     
    -
    - +
    diff --git a/src/classes/ActionView/Helpers/AssetUrlHelper.html b/src/classes/ActionView/Helpers/AssetUrlHelper.html index c59a70123a..4f4193b4f7 100644 --- a/src/classes/ActionView/Helpers/AssetUrlHelper.html +++ b/src/classes/ActionView/Helpers/AssetUrlHelper.html @@ -314,15 +314,10 @@

    Constants

    Instance Public methods

    -

    - - asset_path(source, options = {}) - -

    +

    asset_path(source, options = {})

    - -
    -

    This is the entry point for all assets. When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the behavior is “enhanced”. You can bypass the asset pipeline by passing in skip_pipeline: true to the options.

    +
    +

    This is the entry point for all assets. When using an asset pipeline gem (e.g. propshaft or sprockets-rails), the behavior is “enhanced”. You can bypass the asset pipeline by passing in skip_pipeline: true to the options.

    All other asset *_path helpers delegate through this method.

    @@ -382,13 +377,14 @@

    Options applyi asset_path("foo.css", skip_pipeline: true, extname: ".js") # => "/foo.css.js" -

    - +
    -
    - Also aliased as: path_to_asset -
    +

    + Also aliased as: + + path_to_asset. +

    @@ -441,28 +437,24 @@

    Options applyi

    -

    - - asset_url(source, options = {}) - -

    +

    asset_url(source, options = {})

    - -
    -

    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.

    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
     
    -
    - +
    -
    - Also aliased as: url_to_asset -
    +

    + Also aliased as: + + url_to_asset. +

    @@ -486,15 +478,10 @@

    -

    - - audio_path(source, options = {}) - -

    +

    audio_path(source, options = {})

    - -
    -

    Computes the path to an audio asset in the public audios directory. Full paths from the document root will be passed through. Used internally by audio_tag to build the audio path.

    +
    +

    Computes the path to an audio asset in the public audios directory. Full paths from the document root will be passed through. Used internally by audio_tag to build the audio path.

    audio_path("horse")                                            # => /audios/horse
     audio_path("horse.wav")                                        # => /audios/horse.wav
    @@ -502,13 +489,14 @@ 

    audio_path("/sounds/horse.wav") # => /sounds/horse.wav audio_path("http://www.example.com/sounds/horse.wav") # => http://www.example.com/sounds/horse.wav

    -
    - +
    -
    - Also aliased as: path_to_audio -
    +

    + Also aliased as: + + path_to_audio. +

    @@ -532,25 +520,21 @@

    -

    - - audio_url(source, options = {}) - -

    +

    audio_url(source, options = {})

    - -
    -

    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
     
    -
    - +
    -
    - Also aliased as: url_to_audio -
    +

    + Also aliased as: + + url_to_audio. +

    @@ -574,17 +558,11 @@

    -

    - - compute_asset_extname(source, options = {}) - -

    +

    compute_asset_extname(source, options = {})

    - -
    -

    Compute extname to append to asset path. Returns nil if nothing should be added.

    -
    - +
    +

    Compute extname to append to asset path. Returns nil if nothing should be added.

    +
    @@ -615,17 +593,11 @@

    -

    - - compute_asset_host(source = "", options = {}) - -

    +

    compute_asset_host(source = "", options = {})

    - -
    -

    Pick an asset host for this source. Returns nil if no host is set, the host if no wildcard is set, the host interpolated with the numbers 0-3 if it contains %d (the number is the source hash mod 4), or the value returned from invoking call on an object responding to call (proc or otherwise).

    -
    - +
    +

    Pick an asset host for this source. Returns nil if no host is set, the host if no wildcard is set, the host interpolated with the numbers 0-3 if it contains %d (the number is the source hash mod 4), or the value returned from invoking call on an object responding to call (proc or otherwise).

    +
    @@ -680,22 +652,18 @@

    -

    - - compute_asset_path(source, options = {}) - -

    +

    compute_asset_path(source, options = {})

    - -
    -

    Computes asset path to public directory. Plugins and extensions can override this method to point to custom assets or generate digested paths or query strings.

    -
    - +
    +

    Computes asset path to public directory. Plugins and extensions can override this method to point to custom assets or generate digested paths or query strings.

    +
    -
    - Also aliased as: public_compute_asset_path -
    +

    + Also aliased as: + + public_compute_asset_path. +

    @@ -720,15 +688,10 @@

    -

    - - font_path(source, options = {}) - -

    +

    font_path(source, options = {})

    - -
    -

    Computes the path to a font asset. Full paths from the document root will be passed through.

    +
    +

    Computes the path to a font asset. Full paths from the document root will be passed through.

    font_path("font")                                           # => /fonts/font
     font_path("font.ttf")                                       # => /fonts/font.ttf
    @@ -736,13 +699,14 @@ 

    font_path("/dir/font.ttf") # => /dir/font.ttf font_path("http://www.example.com/dir/font.ttf") # => http://www.example.com/dir/font.ttf

    -
    - +
    -
    - Also aliased as: path_to_font -
    +

    + Also aliased as: + + path_to_font. +

    @@ -766,25 +730,21 @@

    -

    - - font_url(source, options = {}) - -

    +

    font_url(source, options = {})

    - -
    -

    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
     
    -
    - +
    -
    - Also aliased as: url_to_font -
    +

    + Also aliased as: + + url_to_font. +

    @@ -808,15 +768,10 @@

    -

    - - image_path(source, options = {}) - -

    +

    image_path(source, options = {})

    - -
    -

    Computes the path to an image asset. Full paths from the document root will be passed through. Used internally by image_tag to build the image path:

    +
    +

    Computes the path to an image asset. Full paths from the document root will be passed through. Used internally by image_tag to build the image path:

    image_path("edit")                                         # => "/assets/edit"
     image_path("edit.png")                                     # => "/assets/edit.png"
    @@ -826,13 +781,14 @@ 

    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.

    -
    - +
    -
    - Also aliased as: path_to_image -
    +

    + Also aliased as: + + path_to_image. +

    @@ -856,25 +812,21 @@

    -

    - - image_url(source, options = {}) - -

    +

    image_url(source, options = {})

    - -
    -

    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
     
    -
    - +
    -
    - Also aliased as: url_to_image -
    +

    + Also aliased as: + + url_to_image. +

    @@ -898,15 +850,10 @@

    -

    - - javascript_path(source, options = {}) - -

    +

    javascript_path(source, options = {})

    - -
    -

    Computes the path to a JavaScript asset in the public javascripts directory. If the source filename has no extension, .js will be appended (except for explicit URIs) Full paths from the document root will be passed through. Used internally by javascript_include_tag to build the script path.

    +
    +

    Computes the path to a JavaScript asset in the public javascripts directory. If the source filename has no extension, .js will be appended (except for explicit URIs) Full paths from the document root will be passed through. Used internally by javascript_include_tag to build the script path.

    javascript_path "xmlhr"                              # => /assets/xmlhr.js
     javascript_path "dir/xmlhr.js"                       # => /assets/dir/xmlhr.js
    @@ -914,13 +861,14 @@ 

    javascript_path "http://www.example.com/js/xmlhr" # => http://www.example.com/js/xmlhr javascript_path "http://www.example.com/js/xmlhr.js" # => http://www.example.com/js/xmlhr.js

    -
    - +
    -
    - Also aliased as: path_to_javascript -
    +

    + Also aliased as: + + path_to_javascript. +

    @@ -944,25 +892,21 @@

    -

    - - javascript_url(source, options = {}) - -

    +

    javascript_url(source, options = {})

    - -
    -

    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
     
    -
    - +
    -
    - Also aliased as: url_to_javascript -
    +

    + Also aliased as: + + url_to_javascript. +

    @@ -986,24 +930,17 @@

    -

    - - path_to_asset(source, options = {}) - -

    +

    path_to_asset(source, options = {})

    -
    - -
    - -
    - Alias for: asset_path -
    +

    + Alias for: + asset_path. +

    @@ -1011,24 +948,17 @@

    -

    - - path_to_audio(source, options = {}) - -

    +

    path_to_audio(source, options = {})

    -
    - -
    - -
    - Alias for: audio_path -
    +

    + Alias for: + audio_path. +

    @@ -1036,24 +966,17 @@

    -

    - - path_to_font(source, options = {}) - -

    +

    path_to_font(source, options = {})

    -
    - -
    - -
    - Alias for: font_path -
    +

    + Alias for: + font_path. +

    @@ -1061,24 +984,17 @@

    -

    - - path_to_image(source, options = {}) - -

    +

    path_to_image(source, options = {})

    -
    - -
    - -
    - Alias for: image_path -
    +

    + Alias for: + image_path. +

    @@ -1086,24 +1002,17 @@

    -

    - - path_to_javascript(source, options = {}) - -

    +

    path_to_javascript(source, options = {})

    -
    - -
    - -
    - Alias for: javascript_path -
    +

    + Alias for: + javascript_path. +

    @@ -1111,24 +1020,17 @@

    -

    - - path_to_stylesheet(source, options = {}) - -

    +

    path_to_stylesheet(source, options = {})

    -
    - -
    - -
    - Alias for: stylesheet_path -
    +

    + Alias for: + stylesheet_path. +

    @@ -1136,24 +1038,17 @@

    -

    - - path_to_video(source, options = {}) - -

    +

    path_to_video(source, options = {})

    -
    - -
    - -
    - Alias for: video_path -
    +

    + Alias for: + video_path. +

    @@ -1161,24 +1056,17 @@

    -

    - - public_compute_asset_path(source, options = {}) - -

    +

    public_compute_asset_path(source, options = {})

    -
    - -
    - -
    - Alias for: compute_asset_path -
    +

    + Alias for: + compute_asset_path. +

    @@ -1186,15 +1074,10 @@

    -

    - - stylesheet_path(source, options = {}) - -

    +

    stylesheet_path(source, options = {})

    - -
    -

    Computes the path to a stylesheet asset in the public stylesheets directory. If the source filename has no extension, .css will be appended (except for explicit URIs). Full paths from the document root will be passed through. Used internally by stylesheet_link_tag to build the stylesheet path.

    +
    +

    Computes the path to a stylesheet asset in the public stylesheets directory. If the source filename has no extension, .css will be appended (except for explicit URIs). Full paths from the document root will be passed through. Used internally by stylesheet_link_tag to build the stylesheet path.

    stylesheet_path "style"                                  # => /assets/style.css
     stylesheet_path "dir/style.css"                          # => /assets/dir/style.css
    @@ -1202,13 +1085,14 @@ 

    stylesheet_path "http://www.example.com/css/style" # => http://www.example.com/css/style stylesheet_path "http://www.example.com/css/style.css" # => http://www.example.com/css/style.css

    -
    - +
    -
    - Also aliased as: path_to_stylesheet -
    +

    + Also aliased as: + + path_to_stylesheet. +

    @@ -1232,25 +1116,21 @@

    -

    - - stylesheet_url(source, options = {}) - -

    +

    stylesheet_url(source, options = {})

    - -
    -

    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
     
    -
    - +
    -
    - Also aliased as: url_to_stylesheet -
    +

    + Also aliased as: + + url_to_stylesheet. +

    @@ -1274,24 +1154,17 @@

    -

    - - url_to_asset(source, options = {}) - -

    +

    url_to_asset(source, options = {})

    -
    - -
    - -
    - Alias for: asset_url -
    +

    + Alias for: + asset_url. +

    @@ -1299,24 +1172,17 @@

    -

    - - url_to_audio(source, options = {}) - -

    +

    url_to_audio(source, options = {})

    -
    - -
    - -
    - Alias for: audio_url -
    +

    + Alias for: + audio_url. +

    @@ -1324,24 +1190,17 @@

    -

    - - url_to_font(source, options = {}) - -

    +

    url_to_font(source, options = {})

    -
    - -
    - -
    - Alias for: font_url -
    +

    + Alias for: + font_url. +

    @@ -1349,24 +1208,17 @@

    -

    - - url_to_image(source, options = {}) - -

    +

    url_to_image(source, options = {})

    -
    - -
    - -
    - Alias for: image_url -
    +

    + Alias for: + image_url. +

    @@ -1374,24 +1226,17 @@

    -

    - - url_to_javascript(source, options = {}) - -

    +

    url_to_javascript(source, options = {})

    -
    - -
    - -
    - Alias for: javascript_url -
    +

    + Alias for: + javascript_url. +

    @@ -1399,24 +1244,17 @@

    -

    - - url_to_stylesheet(source, options = {}) - -

    +

    url_to_stylesheet(source, options = {})

    -
    - -
    - -
    - Alias for: stylesheet_url -
    +

    + Alias for: + stylesheet_url. +

    @@ -1424,24 +1262,17 @@

    -

    - - url_to_video(source, options = {}) - -

    +

    url_to_video(source, options = {})

    -
    - -
    - -
    - Alias for: video_url -
    +

    + Alias for: + video_url. +

    @@ -1449,15 +1280,10 @@

    -

    - - video_path(source, options = {}) - -

    +

    video_path(source, options = {})

    - -
    -

    Computes the path to a video asset in the public videos directory. Full paths from the document root will be passed through. Used internally by video_tag to build the video path.

    +
    +

    Computes the path to a video asset in the public videos directory. Full paths from the document root will be passed through. Used internally by video_tag to build the video path.

    video_path("hd")                                            # => /videos/hd
     video_path("hd.avi")                                        # => /videos/hd.avi
    @@ -1465,13 +1291,14 @@ 

    video_path("/trailers/hd.avi") # => /trailers/hd.avi video_path("http://www.example.com/vid/hd.avi") # => http://www.example.com/vid/hd.avi

    -
    - +
    -
    - Also aliased as: path_to_video -
    +

    + Also aliased as: + + path_to_video. +

    @@ -1495,25 +1322,21 @@

    -

    - - video_url(source, options = {}) - -

    +

    video_url(source, options = {})

    - -
    -

    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
     
    -
    - +
    -
    - Also aliased as: url_to_video -
    +

    + Also aliased as: + + url_to_video. +

    diff --git a/src/classes/ActionView/Helpers/AtomFeedHelper.html b/src/classes/ActionView/Helpers/AtomFeedHelper.html index 24d1c3cafa..07da416549 100644 --- a/src/classes/ActionView/Helpers/AtomFeedHelper.html +++ b/src/classes/ActionView/Helpers/AtomFeedHelper.html @@ -64,15 +64,10 @@

    Methods

    Instance Public methods

    -

    - - atom_feed(options = {}, &block) - -

    +

    atom_feed(options = {}, &block)

    - -
    -

    Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other template languages).

    +
    +

    Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other template languages).

    Full usage example:

    @@ -162,8 +157,7 @@

    atom_feed yields an AtomFeedBuilder instance. Nested elements yield an AtomBuilder instance.

    -

    - +
    diff --git a/src/classes/ActionView/Helpers/CacheHelper.html b/src/classes/ActionView/Helpers/CacheHelper.html index 555857334a..f6b36a4a33 100644 --- a/src/classes/ActionView/Helpers/CacheHelper.html +++ b/src/classes/ActionView/Helpers/CacheHelper.html @@ -97,15 +97,10 @@

    Methods

    Instance Public methods

    -

    - - cache(name = {}, options = {}, &block) - -

    +

    cache(name = {}, options = {}, &block)

    - -
    -

    This helper exposes a method for caching fragments of a view rather than an entire action or page. This technique is useful caching pieces like menus, lists of new topics, static HTML fragments, and so on. This method takes a block that contains the content you wish to cache.

    +
    +

    This helper exposes a method for caching fragments of a view rather than an entire action or page. This technique is useful caching pieces like menus, lists of new topics, static HTML fragments, and so on. This method takes a block that contains the content you wish to cache.

    The best way to use this is by doing recyclable key-based cache expiration on top of a cache store like Memcached or Redis that’ll automatically kick out old entries.

    @@ -248,8 +243,7 @@

    Collection Caching

    This will include both records as part of the cache key and updating either of them will expire the cache.

    -
    - +
    @@ -283,17 +277,11 @@

    Collection Caching

    -

    - - cache_fragment_name(name = {}, skip_digest: nil, digest_path: nil) - -

    +

    cache_fragment_name(name = {}, skip_digest: nil, digest_path: nil)

    - -
    -

    This helper returns the name of a cache key for a given fragment cache call. By supplying skip_digest: true to cache, the digestion of cache fragments can be manually bypassed. This is useful when cache fragments cannot be manually expired unless you know the exact key which is the case when using memcached.

    -
    - +
    +

    This helper returns the name of a cache key for a given fragment cache call. By supplying skip_digest: true to cache, the digestion of cache fragments can be manually bypassed. This is useful when cache fragments cannot be manually expired unless you know the exact key which is the case when using memcached.

    +
    @@ -322,23 +310,17 @@

    -

    - - cache_if(condition, name = {}, options = {}, &block) - -

    +

    cache_if(condition, name = {}, options = {}, &block)

    - -
    -

    Cache fragments of a view if condition is true

    +
    +

    Cache fragments of a view if condition is true

    <% cache_if admin?, project do %>
       <b>All the topics on this project</b>
       <%= render project.topics %>
     <% end %>
     
    -
    - +
    @@ -369,23 +351,17 @@

    -

    - - cache_unless(condition, name = {}, options = {}, &block) - -

    +

    cache_unless(condition, name = {}, options = {}, &block)

    - -
    -

    Cache fragments of a view unless condition is true

    +
    +

    Cache fragments of a view unless condition is true

    <% cache_unless admin?, project do %>
       <b>All the topics on this project</b>
       <%= render project.topics %>
     <% end %>
     
    -
    - +
    @@ -410,15 +386,10 @@

    -

    - - caching?() - -

    +

    caching?()

    - -
    -

    Returns whether the current view fragment is within a cache block.

    +
    +

    Returns whether the current view fragment is within a cache block.

    Useful when certain fragments aren’t cacheable:

    @@ -426,8 +397,7 @@

    <% raise StandardError, "Caching private data!" if caching? %> <% end %> -

    - +
    @@ -452,15 +422,10 @@

    -

    - - uncacheable!() - -

    +

    uncacheable!()

    - -
    -

    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:

    @@ -474,8 +439,7 @@

    <%= project_name_with_time(project) %> <% end %> -

    - +
    diff --git a/src/classes/ActionView/Helpers/CaptureHelper.html b/src/classes/ActionView/Helpers/CaptureHelper.html index d15479f4d3..271f69fd5e 100644 --- a/src/classes/ActionView/Helpers/CaptureHelper.html +++ b/src/classes/ActionView/Helpers/CaptureHelper.html @@ -82,15 +82,10 @@

    Methods

    Instance Public methods

    -

    - - capture(*, **, &block) - -

    +

    capture(*, **, &block)

    - -
    -

    The capture method extracts part of a template as a string object. You can then use this object anywhere in your templates, layout, or helpers.

    +
    +

    The capture method extracts part of a template as a string object. You can then use this object anywhere in your templates, layout, or helpers.

    The capture method can be used in ERB templates…

    @@ -121,8 +116,7 @@

    @greeting # => "Welcome to my shiny new web page! The date and time is 2018-09-06 11:09:16 -0500"
     
    -

    - +
    @@ -164,15 +158,10 @@

    -

    - - content_for(name, content = nil, options = {}, &block) - -

    +

    content_for(name, content = nil, options = {}, &block)

    - -
    -

    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.

    @@ -283,8 +272,7 @@

    WARNING: content_for is ignored in caches. So you shouldn’t use it for elements that will be fragment cached.

    -

    - +
    @@ -320,15 +308,10 @@

    -

    - - content_for?(name) - -

    +

    content_for?(name)

    - -
    -

    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.

    @@ -344,8 +327,7 @@

    </body> </html> -

    - +
    @@ -370,19 +352,13 @@

    -

    - - provide(name, content = nil, &block) - -

    +

    provide(name, content = nil, &block)

    - -
    -

    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/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html b/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html index 5364479135..2d89b2df52 100644 --- a/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html +++ b/src/classes/ActionView/Helpers/ContentExfiltrationPreventionHelper.html @@ -147,17 +147,9 @@

    Constants

    Instance Public methods

    -

    - - prevent_content_exfiltration(html) - -

    +

    prevent_content_exfiltration(html)

    -
    - -
    - diff --git a/src/classes/ActionView/Helpers/CspHelper.html b/src/classes/ActionView/Helpers/CspHelper.html index 1a0d344f31..d3c17a28f9 100644 --- a/src/classes/ActionView/Helpers/CspHelper.html +++ b/src/classes/ActionView/Helpers/CspHelper.html @@ -64,15 +64,10 @@

    Methods

    Instance Public methods

    -

    - - csp_meta_tag(**options) - -

    +

    csp_meta_tag(**options)

    - -
    -

    Returns a meta tag “csp-nonce” with the per-session nonce value for allowing inline <script> tags.

    +
    +

    Returns a meta tag “csp-nonce” with the per-session nonce value for allowing inline <script> tags.

    <head>
       <%= csp_meta_tag %>
    @@ -80,8 +75,7 @@ 

    This is used by the Rails UJS helper to create dynamically loaded inline <script> elements.

    -
    - +
    diff --git a/src/classes/ActionView/Helpers/CsrfHelper.html b/src/classes/ActionView/Helpers/CsrfHelper.html index 0d824d9fbe..15769b0af6 100644 --- a/src/classes/ActionView/Helpers/CsrfHelper.html +++ b/src/classes/ActionView/Helpers/CsrfHelper.html @@ -68,24 +68,19 @@

    Methods

    Instance Public methods

    -

    - - csrf_meta_tag() - -

    +

    csrf_meta_tag()

    - -
    -

    For backwards compatibility.

    -
    - +
    +

    For backwards compatibility.

    +
    -
    - Alias for: csrf_meta_tags -
    +

    + Alias for: + csrf_meta_tags. +

    @@ -93,15 +88,10 @@

    -

    - - csrf_meta_tags() - -

    +

    csrf_meta_tags()

    - -
    -

    Returns meta tags “csrf-param” and “csrf-token” with the name of the cross-site request forgery protection parameter and token, respectively.

    +
    +

    Returns meta tags “csrf-param” and “csrf-token” with the name of the cross-site request forgery protection parameter and token, respectively.

    <head>
       <%= csrf_meta_tags %>
    @@ -113,13 +103,14 @@ 

    You don’t need to use these tags for regular forms as they generate their own hidden fields.

    For Ajax requests other than GETs, extract the “csrf-token” from the meta-tag and send as the X-CSRF-Token HTTP header.

    -

    - +
    -
    - Also aliased as: csrf_meta_tag -
    +

    + Also aliased as: + + csrf_meta_tag. +

    diff --git a/src/classes/ActionView/Helpers/DateHelper.html b/src/classes/ActionView/Helpers/DateHelper.html index a0380495ee..d3eea43e3b 100644 --- a/src/classes/ActionView/Helpers/DateHelper.html +++ b/src/classes/ActionView/Helpers/DateHelper.html @@ -164,15 +164,10 @@

    Constants

    Instance Public methods

    -

    - - date_select(object_name, method, options = {}, html_options = {}) - -

    +

    date_select(object_name, method, options = {}, html_options = {})

    - -
    -

    Returns a set of select tags (one for year, month, and day) pre-selected for accessing a specified date-based attribute (identified by method) on an object assigned to the template (identified by object).

    +
    +

    Returns a set of select tags (one for year, month, and day) pre-selected for accessing a specified date-based attribute (identified by method) on an object assigned to the template (identified by object).

    Options

    • @@ -279,8 +274,7 @@

      Options

      The selects are prepared for multi-parameter assignment to an Active Record object.

      Note: If the day is not included as an option but the month is, the day will be set to the 1st to ensure that all month choices are valid.

      -
    - +
    @@ -305,15 +299,10 @@

    Options

    -

    - - datetime_select(object_name, method, options = {}, html_options = {}) - -

    +

    datetime_select(object_name, method, options = {}, html_options = {})

    - -
    -

    Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a specified datetime-based attribute (identified by method) on an object assigned to the template (identified by object).

    +
    +

    Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a specified datetime-based attribute (identified by method) on an object assigned to the template (identified by object).

    If anything is passed in the html_options hash it will be applied to every select tag in the set.

    @@ -343,8 +332,7 @@

    The selects are prepared for multi-parameter assignment to an Active Record object.

    -

    - +
    @@ -369,15 +357,10 @@

    -

    - - distance_of_time_in_words(from_time, to_time = 0, options = {}) - -

    +

    distance_of_time_in_words(from_time, to_time = 0, options = {})

    - -
    -

    Reports the approximate distance in time between two Time, Date, or DateTime objects or integers as seconds. Pass include_seconds: true if you want more detailed approximations when distance < 1 min, 29 secs. Distances are reported based on the following table:

    +
    +

    Reports the approximate distance in time between two Time, Date, or DateTime objects or integers as seconds. Pass include_seconds: true if you want more detailed approximations when distance < 1 min, 29 secs. Distances are reported based on the following table:

    0 <-> 29 secs                                                             # => less than a minute
     30 secs <-> 1 min, 29 secs                                                # => 1 minute
    @@ -444,8 +427,7 @@ 

    distance_of_time_in_words(from_time, from_time + 50.minutes, scope: 'datetime.distance_in_words.short') # => "an hour" distance_of_time_in_words(from_time, from_time + 3.hours, scope: 'datetime.distance_in_words.short') # => "3 hours"

    -
    - +
    @@ -538,24 +520,17 @@

    -

    - - distance_of_time_in_words_to_now(from_time, options = {}) - -

    +

    distance_of_time_in_words_to_now(from_time, options = {})

    -
    - -
    - -
    - Alias for: time_ago_in_words -
    +

    + Alias for: + time_ago_in_words. +

    @@ -563,15 +538,10 @@

    -

    - - relative_time_in_words(from_time, options = {}) - -

    +

    relative_time_in_words(from_time, options = {})

    - -
    -

    Like time_ago_in_words, but adds a prefix/suffix depending on whether the time is in the past or future. You can use the scope option to customize the translation scope. All other options are forwarded to time_ago_in_words.

    +
    +

    Like time_ago_in_words, but adds a prefix/suffix depending on whether the time is in the past or future. You can use the scope option to customize the translation scope. All other options are forwarded to time_ago_in_words.

    relative_time_in_words(3.minutes.from_now) # => "in 3 minutes"
     relative_time_in_words(3.minutes.ago) # => "3 minutes ago"
    @@ -579,8 +549,7 @@ 

    See also time_ago_in_words

    -
    - +
    @@ -609,15 +578,10 @@

    -

    - - select_date(date = Date.current, options = {}, html_options = {}) - -

    +

    select_date(date = Date.current, options = {}, html_options = {})

    - -
    -

    Returns a set of HTML select-tags (one for year, month, and day) pre-selected with the date. It’s possible to explicitly set the order of the tags using the :order option with an array of symbols :year, :month and :day in the desired order. If the array passed to the :order option does not contain all the three symbols, all tags will be hidden.

    +
    +

    Returns a set of HTML select-tags (one for year, month, and day) pre-selected with the date. It’s possible to explicitly set the order of the tags using the :order option with an array of symbols :year, :month and :day in the desired order. If the array passed to the :order option does not contain all the three symbols, all tags will be hidden.

    If anything is passed in the html_options hash it will be applied to every select tag in the set.

    @@ -650,8 +614,7 @@

    select_date(my_date, prompt: { hour: true }) # generic prompt for hours select_date(my_date, prompt: true) # generic prompts for all -

    - +
    @@ -676,15 +639,10 @@

    -

    - - select_datetime(datetime = Time.current, options = {}, html_options = {}) - -

    +

    select_datetime(datetime = Time.current, options = {}, html_options = {})

    - -
    -

    Returns a set of HTML select-tags (one for year, month, day, hour, minute, and second) pre-selected with the datetime. It’s also possible to explicitly set the order of the tags using the :order option with an array of symbols :year, :month and :day in the desired order. If you do not supply a Symbol, it will be appended onto the :order passed in. You can also add :date_separator, :datetime_separator and :time_separator keys to the options to control visual display of the elements.

    +
    +

    Returns a set of HTML select-tags (one for year, month, day, hour, minute, and second) pre-selected with the datetime. It’s also possible to explicitly set the order of the tags using the :order option with an array of symbols :year, :month and :day in the desired order. If you do not supply a Symbol, it will be appended onto the :order passed in. You can also add :date_separator, :datetime_separator and :time_separator keys to the options to control visual display of the elements.

    If anything is passed in the html_options hash it will be applied to every select tag in the set.

    @@ -725,8 +683,7 @@

    select_datetime(my_date_time, prompt: { hour: true }) # generic prompt for hours select_datetime(my_date_time, prompt: true) # generic prompts for all -

    - +
    @@ -751,15 +708,10 @@

    -

    - - select_day(date, options = {}, html_options = {}) - -

    +

    select_day(date, options = {}, html_options = {})

    - -
    -

    Returns a select tag with options for each of the days 1 through 31 with the current day selected. The date can also be substituted for a day number. If you want to display days with a leading zero set the :use_two_digit_numbers key in options to true. Override the field name using the :field_name option, ‘day’ by default.

    +
    +

    Returns a select tag with options for each of the days 1 through 31 with the current day selected. The date can also be substituted for a day number. If you want to display days with a leading zero set the :use_two_digit_numbers key in options to true. Override the field name using the :field_name option, ‘day’ by default.

    my_date = Time.now + 2.days
     
    @@ -780,8 +732,7 @@ 

    # generic prompt. select_day(5, prompt: 'Choose day')

    -
    - +
    @@ -806,15 +757,10 @@

    -

    - - select_hour(datetime, options = {}, html_options = {}) - -

    +

    select_hour(datetime, options = {}, html_options = {})

    - -
    -

    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
     
    @@ -838,8 +784,7 @@ 

    # Generates a select field that includes options for hours from 2 to 14. select_hour(my_time, start_hour: 2, end_hour: 14)

    -
    - +
    @@ -864,15 +809,10 @@

    -

    - - select_minute(datetime, options = {}, html_options = {}) - -

    +

    select_minute(datetime, options = {}, html_options = {})

    - -
    -

    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
     
    @@ -890,8 +830,7 @@ 

    # generic prompt. select_minute(14, prompt: 'Choose minutes')

    -
    - +
    @@ -916,15 +855,10 @@

    -

    - - select_month(date, options = {}, html_options = {}) - -

    +

    select_month(date, options = {}, html_options = {})

    - -
    -

    Returns a select tag with options for each of the months January through December with the current month selected. The month names are presented as keys (what’s shown to the user) and the month numbers (1-12) are used as values (what’s submitted to the server). It’s also possible to use month numbers for the presentation instead of names – set the :use_month_numbers key in options to true for this to happen. If you want both numbers and names, set the :add_month_numbers key in options to true. If you would prefer to show month names as abbreviations, set the :use_short_month key in options to true. If you want to use your own month names, set the :use_month_names key in options to an array of 12 month names. If you want to display months with a leading zero set the :use_two_digit_numbers key in options to true. Override the field name using the :field_name option, ‘month’ by default.

    +
    +

    Returns a select tag with options for each of the months January through December with the current month selected. The month names are presented as keys (what’s shown to the user) and the month numbers (1-12) are used as values (what’s submitted to the server). It’s also possible to use month numbers for the presentation instead of names – set the :use_month_numbers key in options to true for this to happen. If you want both numbers and names, set the :add_month_numbers key in options to true. If you would prefer to show month names as abbreviations, set the :use_short_month key in options to true. If you want to use your own month names, set the :use_month_names key in options to an array of 12 month names. If you want to display months with a leading zero set the :use_two_digit_numbers key in options to true. Override the field name using the :field_name option, ‘month’ by default.

    # Generates a select field for months that defaults to the current month that
     # will use keys like "January", "March".
    @@ -958,8 +892,7 @@ 

    # generic prompt. select_month(14, prompt: 'Choose month')

    -
    - +
    @@ -984,15 +917,10 @@

    -

    - - select_second(datetime, options = {}, html_options = {}) - -

    +

    select_second(datetime, options = {}, html_options = {})

    - -
    -

    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
     
    @@ -1010,8 +938,7 @@ 

    # generic prompt. select_second(14, prompt: 'Choose seconds')

    -
    - +
    @@ -1036,15 +963,10 @@

    -

    - - select_time(datetime = Time.current, options = {}, html_options = {}) - -

    +

    select_time(datetime = Time.current, options = {}, html_options = {})

    - -
    -

    Returns a set of HTML select-tags (one for hour and minute). You can set :time_separator key to format the output, and the :include_seconds option to include an input for seconds.

    +
    +

    Returns a set of HTML select-tags (one for hour and minute). You can set :time_separator key to format the output, and the :include_seconds option to include an input for seconds.

    If anything is passed in the html_options hash it will be applied to every select tag in the set.

    @@ -1079,8 +1001,7 @@

    select_time(my_time, prompt: { hour: true }) # generic prompt for hours select_time(my_time, prompt: true) # generic prompts for all -

    - +
    @@ -1105,15 +1026,10 @@

    -

    - - select_year(date, options = {}, html_options = {}) - -

    +

    select_year(date, options = {}, html_options = {})

    - -
    -

    Returns a select tag with options for each of the five years on each side of the current, which is selected. The five year radius can be changed using the :start_year and :end_year keys in the options. Both ascending and descending year lists are supported by making :start_year less than or greater than :end_year. The date can also be substituted for a year given as a number. Override the field name using the :field_name option, ‘year’ by default.

    +
    +

    Returns a select tag with options for each of the five years on each side of the current, which is selected. The five year radius can be changed using the :start_year and :end_year keys in the options. Both ascending and descending year lists are supported by making :start_year less than or greater than :end_year. The date can also be substituted for a year given as a number. Override the field name using the :field_name option, ‘year’ by default.

    # Generates a select field for years that defaults to the current year that
     # has ascending year values.
    @@ -1135,8 +1051,7 @@ 

    # generic prompt. select_year(14, prompt: 'Choose year')

    -
    - +
    @@ -1161,15 +1076,10 @@

    -

    - - time_ago_in_words(from_time, options = {}) - -

    +

    time_ago_in_words(from_time, options = {})

    - -
    -

    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
    @@ -1185,13 +1095,14 @@ 

    Note that you cannot pass a Numeric value to time_ago_in_words.

    -
    - +
    -
    - Also aliased as: distance_of_time_in_words_to_now -
    +

    + Also aliased as: + + distance_of_time_in_words_to_now. +

    @@ -1215,15 +1126,10 @@

    -

    - - time_select(object_name, method, options = {}, html_options = {}) - -

    +

    time_select(object_name, method, options = {}, html_options = {})

    - -
    -

    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.

    +
    +

    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.

    @@ -1255,8 +1161,7 @@

    The selects are prepared for multi-parameter assignment to an Active Record object.

    Note: If the day is not included as an option but the month is, the day will be set to the 1st to ensure that all month choices are valid.

    -

    - +
    @@ -1281,15 +1186,10 @@

    -

    - - time_tag(date_or_time, *args, &block) - -

    +

    time_tag(date_or_time, *args, &block)

    - -
    -

    Returns an HTML time tag for the given date or time.

    +
    +

    Returns an HTML time tag for the given date or time.

    time_tag Date.today  # =>
       <time datetime="2010-11-04">November 04, 2010</time>
    @@ -1305,8 +1205,7 @@ 

    <% end %> # => <time datetime="2010-11-04T17:55:45+01:00"><span>Right now</span></time>

    -
    - +
    diff --git a/src/classes/ActionView/Helpers/DebugHelper.html b/src/classes/ActionView/Helpers/DebugHelper.html index 3f5a37ad93..2b340558da 100644 --- a/src/classes/ActionView/Helpers/DebugHelper.html +++ b/src/classes/ActionView/Helpers/DebugHelper.html @@ -80,15 +80,10 @@

    Included Modules

    Instance Public methods

    -

    - - debug(object) - -

    +

    debug(object)

    - -
    -

    Returns a YAML representation of object wrapped with <pre> and </pre>. If the object cannot be converted to YAML using to_yaml, inspect will be called instead. Useful for inspecting an object at the time of rendering.

    +
    +

    Returns a YAML representation of object wrapped with <pre> and </pre>. If the object cannot be converted to YAML using to_yaml, inspect will be called instead. Useful for inspecting an object at the time of rendering.

    @user = User.new({ username: 'testing', password: 'xyz', age: 42})
     debug(@user)
    @@ -102,8 +97,7 @@ 

    created_at: </pre>

    -
    - +
    diff --git a/src/classes/ActionView/Helpers/FormBuilder.html b/src/classes/ActionView/Helpers/FormBuilder.html index 7e564faddc..13383548e2 100644 --- a/src/classes/ActionView/Helpers/FormBuilder.html +++ b/src/classes/ActionView/Helpers/FormBuilder.html @@ -358,17 +358,9 @@

    Attributes

    Class Public methods

    -

    - - _to_partial_path() - -

    +

    _to_partial_path()

    -
    - -
    - @@ -393,17 +385,9 @@

    -

    - - new(object_name, object, template, options) - -

    +

    new(object_name, object, template, options)

    -
    - -
    - @@ -448,15 +432,10 @@

    Instance Public methods

    -

    - - button(value = nil, options = {}, &block) - -

    +

    button(value = nil, options = {}, &block)

    - -
    -

    Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label:

    +
    +

    Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label:

    <%= form_with model: @article do |f| %>
       <%= f.button %>
    @@ -512,8 +491,7 @@ 

    Examples

    # <strong>Save as draft</strong> # </button>
    -
    - +
    @@ -555,24 +533,17 @@

    Examples

    -

    - - check_box(method, options = {}, checked_value = "1", unchecked_value = "0") - -

    +

    check_box(method, options = {}, checked_value = "1", unchecked_value = "0")

    -
    - -
    - -
    - Alias for: checkbox -
    +

    + Alias for: + checkbox. +

    @@ -580,15 +551,10 @@

    -

    - - checkbox(method, options = {}, checked_value = "1", unchecked_value = "0") - -

    +

    checkbox(method, options = {}, checked_value = "1", unchecked_value = "0")

    - -
    -

    Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This object must be an instance object (@object) and not a local object. It’s intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values.

    +
    +

    Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This object must be an instance object (@object) and not a local object. It’s intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values.

    Options

    • @@ -641,13 +607,14 @@

      Examples

      # => <input name="eula[accepted]" type="hidden" value="no" /> # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" /> -
    - +
    -
    - Also aliased as: check_box -
    +

    + Also aliased as: + + check_box. +

    @@ -671,24 +638,17 @@

    Examples

    -

    - - collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block) - -

    +

    collection_check_boxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)

    -
    - -
    - -
    - Alias for: collection_checkboxes -
    +

    + Alias for: + collection_checkboxes. +

    @@ -696,15 +656,10 @@

    -

    - - collection_checkboxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block) - -

    +

    collection_checkboxes(method, collection, value_method, text_method, options = {}, html_options = {}, &block)

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#collection_checkboxes for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#collection_checkboxes for form builders:

    <%= form_with model: @post do |f| %>
       <%= f.collection_checkboxes :author_ids, Author.all, :id, :name_with_initial %>
    @@ -713,13 +668,14 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    -
    - Also aliased as: collection_check_boxes -
    +

    + Also aliased as: + + collection_check_boxes. +

    @@ -743,15 +699,10 @@

    -

    - - collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block) - -

    +

    collection_radio_buttons(method, collection, value_method, text_method, options = {}, html_options = {}, &block)

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#collection_radio_buttons for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#collection_radio_buttons for form builders:

    <%= form_with model: @post do |f| %>
       <%= f.collection_radio_buttons :author_id, Author.all, :id, :name_with_initial %>
    @@ -760,8 +711,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -786,15 +736,10 @@

    -

    - - collection_select(method, collection, value_method, text_method, options = {}, html_options = {}) - -

    +

    collection_select(method, collection, value_method, text_method, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#collection_select for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#collection_select for form builders:

    <%= form_with model: @post do |f| %>
       <%= f.collection_select :person_id, Author.all, :id, :name_with_initial, prompt: true %>
    @@ -803,8 +748,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -829,16 +773,11 @@

    -

    - - color_field(method, options = {}) +

    color_field(method, options = {}) +

    - -

    - - -
    -

    Wraps ActionView::Helpers::FormHelper#color_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#color_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.color_field :favorite_color %>
    @@ -846,8 +785,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -860,16 +798,11 @@

    -

    - - date_field(method, options = {}) - - -

    +

    date_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#date_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#date_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.date_field :born_on %>
    @@ -877,8 +810,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -891,15 +823,10 @@

    -

    - - date_select(method, options = {}, html_options = {}) - -

    +

    date_select(method, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::DateHelper#date_select for form builders:

    +
    +

    Wraps ActionView::Helpers::DateHelper#date_select for form builders:

    <%= form_with model: @person do |f| %>
       <%= f.date_select :birth_date %>
    @@ -908,8 +835,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -934,16 +860,11 @@

    -

    - - datetime_field(method, options = {}) - - -

    +

    datetime_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#datetime_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#datetime_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.datetime_field :graduation_day %>
    @@ -951,8 +872,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -965,16 +885,11 @@

    -

    - - datetime_local_field(method, options = {}) - - -

    +

    datetime_local_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#datetime_local_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#datetime_local_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.datetime_local_field :graduation_day %>
    @@ -982,8 +897,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -996,15 +910,10 @@

    -

    - - datetime_select(method, options = {}, html_options = {}) - -

    +

    datetime_select(method, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::DateHelper#datetime_select for form builders:

    +
    +

    Wraps ActionView::Helpers::DateHelper#datetime_select for form builders:

    <%= form_with model: @person do |f| %>
       <%= f.datetime_select :last_request_at %>
    @@ -1013,8 +922,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1039,16 +947,11 @@

    -

    - - email_field(method, options = {}) - - -

    +

    email_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#email_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#email_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.email_field :address %>
    @@ -1056,8 +959,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1070,15 +972,10 @@

    -

    - - field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index]) - -

    +

    field_id(method, *suffixes, namespace: @options[:namespace], index: @options[:index])

    - -
    -

    Generate an HTML id attribute value for the given field

    +
    +

    Generate an HTML id attribute value for the given field

    Return the value generated by the FormBuilder for the given attribute name.

    @@ -1090,8 +987,7 @@

    In the example above, the <input type="text"> element built by the call to text_field declares an aria-describedby attribute referencing the <span> element, sharing a common id root (article_title, in this case).

    -

    - +
    @@ -1116,15 +1012,10 @@

    -

    - - field_name(method, *methods, multiple: false, index: @options[:index]) - -

    +

    field_name(method, *methods, multiple: false, index: @options[:index])

    - -
    -

    Generate an HTML name attribute value for the given name and field combination

    +
    +

    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.

    @@ -1138,8 +1029,7 @@

    <%# => <input type="text" name="article[tag][]"> %> <% end %> -

    - +
    @@ -1166,17 +1056,11 @@

    -

    - - fields(scope = nil, model: nil, **options, &block) - -

    +

    fields(scope = nil, model: nil, **options, &block)

    - -
    -

    See the docs for the ActionView::Helpers::FormHelper#fields helper method.

    -
    - +
    +

    See the docs for the ActionView::Helpers::FormHelper#fields helper method.

    +
    @@ -1206,15 +1090,10 @@

    -

    - - fields_for(record_name, record_object = nil, fields_options = nil, &block) - -

    +

    fields_for(record_name, record_object = nil, fields_options = nil, &block)

    - -
    -

    Creates a scope around a specific model object like form_with, but doesn’t create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form.

    +
    +

    Creates a scope around a specific model object like form_with, 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_with’s, its method signature is slightly different. Like form_with, 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 fields are 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 -

    @@ -1422,8 +1301,7 @@

    One-to-many

    Note that fields_for will automatically generate a hidden field to store the ID of the record. There are circumstances where this hidden field is not needed and you can pass include_id: false to prevent fields_for from rendering it automatically.

    -
    - +
    @@ -1481,15 +1359,10 @@

    One-to-many

    -

    - - file_field(method, options = {}) - -

    +

    file_field(method, options = {})

    - -
    -

    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.

    +
    +

    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_with block will set the enclosing form’s encoding to multipart/form-data.

    @@ -1528,8 +1401,7 @@

    Examples

    file_field(:file, class: 'file_input') # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" /> -
    - +
    @@ -1555,15 +1427,10 @@

    Examples

    -

    - - grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {}) - -

    +

    grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#grouped_collection_select for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#grouped_collection_select for form builders:

    <%= form_with model: @city do |f| %>
       <%= f.grouped_collection_select :country_id, @continents, :countries, :name, :id, :name %>
    @@ -1572,8 +1439,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1598,15 +1464,10 @@

    -

    - - hidden_field(method, options = {}) - -

    +

    hidden_field(method, options = {})

    - -
    -

    Returns a hidden 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.

    +
    +

    Returns a hidden 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.

    Examples

    @@ -1622,8 +1483,7 @@

    Examples

    hidden_field(:token) # => <input type="hidden" id="user_token" name="user[token]" value="abcde" /> -
    - +
    @@ -1649,15 +1509,10 @@

    Examples

    -

    - - id() - -

    +

    id()

    - -
    -

    Generate an HTML id attribute value.

    +
    +

    Generate an HTML id attribute value.

    return the <form> element’s id attribute.

    @@ -1671,8 +1526,7 @@

    In the example above, the :sticky_footer content area will exist outside of the <form> element. By declaring the form HTML attribute, we hint to the browser that the generated <button> element should be treated as the <form> element’s submit button, regardless of where it exists in the DOM.

    -

    - +
    @@ -1697,15 +1551,10 @@

    -

    - - label(method, text = nil, options = {}, &block) - -

    +

    label(method, text = nil, options = {}, &block)

    - -
    -

    Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label 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, except for the :value option, which is designed to target labels for radio_button tags (where the value is used in the ID of the input tag).

    +
    +

    Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label 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, except for the :value option, which is designed to target labels for radio_button tags (where the value is used in the ID of the input tag).

    Examples

    @@ -1772,8 +1621,7 @@

    Examples

    end # => <label for="article_terms">Accept <a href="/terms">Terms</a>.</label> -
    - +
    @@ -1798,16 +1646,11 @@

    Examples

    -

    - - month_field(method, options = {}) - - -

    +

    month_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#month_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#month_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.month_field :birthday_month %>
    @@ -1815,8 +1658,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1829,17 +1671,9 @@

    -

    - - multipart=(multipart) - -

    +

    multipart=(multipart)

    -
    - -
    - @@ -1868,16 +1702,11 @@

    -

    - - number_field(method, options = {}) - - -

    +

    number_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#number_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#number_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.number_field :age %>
    @@ -1885,8 +1714,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1899,16 +1727,11 @@

    -

    - - password_field(method, options = {}) - - -

    +

    password_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#password_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#password_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.password_field :password %>
    @@ -1916,8 +1739,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1930,16 +1752,11 @@

    -

    - - phone_field(method, options = {}) - - -

    +

    phone_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#phone_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#phone_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.phone_field :phone %>
    @@ -1947,8 +1764,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -1961,15 +1777,10 @@

    -

    - - radio_button(method, tag_value, options = {}) - -

    +

    radio_button(method, tag_value, options = {})

    - -
    -

    Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked.

    +
    +

    Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked.

    To force the radio button to be checked pass checked: true in the options hash. You may pass HTML options there as well.

    @@ -1985,8 +1796,7 @@

    # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" /> # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" /> -

    - +
    @@ -2011,16 +1821,11 @@

    -

    - - range_field(method, options = {}) - - -

    +

    range_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#range_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#range_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.range_field :age %>
    @@ -2028,8 +1833,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2042,24 +1846,17 @@

    -

    - - rich_text_area(method, options = {}, &block) - -

    +

    rich_text_area(method, options = {}, &block)

    -
    - -
    - -
    - Alias for: rich_textarea -
    +

    + Alias for: + rich_textarea. +

    @@ -2067,15 +1864,10 @@

    -

    - - rich_textarea(method, options = {}, &block) - -

    +

    rich_textarea(method, options = {}, &block)

    - -
    -

    Wraps ActionView::Helpers::FormHelper#rich_textarea for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#rich_textarea for form builders:

    <%= form_with model: @message do |f| %>
       <%= f.rich_textarea :content %>
    @@ -2083,13 +1875,14 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    -
    - Also aliased as: rich_text_area -
    +

    + Also aliased as: + + rich_text_area. +

    @@ -2113,16 +1906,11 @@

    -

    - - search_field(method, options = {}) - - -

    +

    search_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#search_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#search_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.search_field :name %>
    @@ -2130,8 +1918,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2144,15 +1931,10 @@

    -

    - - select(method, choices = nil, options = {}, html_options = {}, &block) - -

    +

    select(method, choices = nil, options = {}, html_options = {}, &block)

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#select for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#select for form builders:

    <%= form_with model: @post do |f| %>
       <%= f.select :person_id, Person.all.collect { |p| [ p.name, p.id ] }, include_blank: true %>
    @@ -2161,8 +1943,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2187,15 +1968,10 @@

    -

    - - submit(value = nil, options = {}) - -

    +

    submit(value = nil, options = {})

    - -
    -

    Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label:

    +
    +

    Add the submit button for the given form. When no value is given, it checks if the object is a new resource or not to create the proper label:

    <%= form_with model: @article do |f| %>
       <%= f.submit %>
    @@ -2221,8 +1997,7 @@ 

    article: create: "Add %{model}"

    -
    - +
    @@ -2249,16 +2024,11 @@

    -

    - - telephone_field(method, options = {}) - - -

    +

    telephone_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#telephone_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#telephone_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.telephone_field :phone %>
    @@ -2266,8 +2036,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2280,24 +2049,17 @@

    -

    - - text_area - -

    +

    text_area

    -
    - -
    - -
    - Alias for: textarea -
    +

    + Alias for: + textarea. +

    @@ -2305,16 +2067,11 @@

    -

    - - text_field(method, options = {}) +

    text_field(method, options = {}) +

    - - - - -
    -

    Wraps ActionView::Helpers::FormHelper#text_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#text_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.text_field :name %>
    @@ -2322,8 +2079,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2336,15 +2092,10 @@

    -

    - - textarea(method, options = {}) - -

    +

    textarea(method, options = {})

    - -
    -

    Wraps ActionView::Helpers::FormHelper#textarea for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#textarea for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.textarea :detail %>
    @@ -2352,13 +2103,14 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    -
    - Also aliased as: text_area -
    +

    + Also aliased as: + + text_area. +

    @@ -2370,16 +2122,11 @@

    -

    - - time_field(method, options = {}) +

    time_field(method, options = {}) +

    - - - - -
    -

    Wraps ActionView::Helpers::FormHelper#time_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#time_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.time_field :born_at %>
    @@ -2387,8 +2134,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2401,15 +2147,10 @@

    -

    - - time_select(method, options = {}, html_options = {}) - -

    +

    time_select(method, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::DateHelper#time_select for form builders:

    +
    +

    Wraps ActionView::Helpers::DateHelper#time_select for form builders:

    <%= form_with model: @race do |f| %>
       <%= f.time_select :average_lap %>
    @@ -2418,8 +2159,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2444,15 +2184,10 @@

    -

    - - time_zone_select(method, priority_zones = nil, options = {}, html_options = {}) - -

    +

    time_zone_select(method, priority_zones = nil, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#time_zone_select for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#time_zone_select for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.time_zone_select :time_zone, nil, include_blank: true %>
    @@ -2461,8 +2196,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2487,17 +2221,9 @@

    -

    - - to_model() - -

    +

    to_model()

    -
    - -
    - @@ -2522,17 +2248,9 @@

    -

    - - to_partial_path() - -

    +

    to_partial_path()

    -
    - -
    - @@ -2557,16 +2275,11 @@

    -

    - - url_field(method, options = {}) +

    url_field(method, options = {}) +

    - - - - -
    -

    Wraps ActionView::Helpers::FormHelper#url_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#url_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.url_field :homepage %>
    @@ -2574,8 +2287,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2588,16 +2300,11 @@

    -

    - - week_field(method, options = {}) - - -

    +

    week_field(method, options = {}) +

    - -
    -

    Wraps ActionView::Helpers::FormHelper#week_field for form builders:

    +
    +

    Wraps ActionView::Helpers::FormHelper#week_field for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.week_field :birthday_week %>
    @@ -2605,8 +2312,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    @@ -2619,15 +2325,10 @@

    -

    - - weekday_select(method, options = {}, html_options = {}) - -

    +

    weekday_select(method, options = {}, html_options = {})

    - -
    -

    Wraps ActionView::Helpers::FormOptionsHelper#weekday_select for form builders:

    +
    +

    Wraps ActionView::Helpers::FormOptionsHelper#weekday_select for form builders:

    <%= form_with model: @user do |f| %>
       <%= f.weekday_select :weekday, include_blank: true %>
    @@ -2636,8 +2337,7 @@ 

    Please refer to the documentation of the base helper for details.

    -
    - +
    diff --git a/src/classes/ActionView/Helpers/FormHelper.html b/src/classes/ActionView/Helpers/FormHelper.html index 4d51e82082..6d422adce6 100644 --- a/src/classes/ActionView/Helpers/FormHelper.html +++ b/src/classes/ActionView/Helpers/FormHelper.html @@ -285,24 +285,17 @@

    Included Modules

    Instance Public methods

    -

    - - check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") - -

    +

    check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")

    -
    - -
    - -
    - Alias for: checkbox -
    +

    + Alias for: + checkbox. +

    @@ -310,15 +303,10 @@

    -

    - - checkbox(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") - -

    +

    checkbox(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")

    - -
    -

    Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This object must be an instance object (@object) and not a local object. It’s intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values.

    +
    +

    Returns a checkbox tag tailored for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). This object must be an instance object (@object) and not a local object. It’s intended that method returns an integer and if that integer is above zero, then the checkbox is checked. Additional options on the input tag can be passed as a hash with options. The checked_value defaults to 1 while the default unchecked_value is set to 0 which is convenient for boolean values.

    Options

    • @@ -370,13 +358,14 @@

      Examples

      # => <input name="eula[accepted]" type="hidden" value="no" /> # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" /> -
    - +
    -
    - Also aliased as: check_box -
    +

    + Also aliased as: + + check_box. +

    @@ -400,21 +389,15 @@

    Examples

    -

    - - color_field(object_name, method, options = {}) - -

    +

    color_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “color”.

    +
    +

    Returns a text_field of type “color”.

    color_field("car", "color")
     # => <input id="car_color" name="car[color]" type="color" value="#000000" />
     
    -
    - +
    @@ -439,15 +422,10 @@

    -

    - - date_field(object_name, method, options = {}) - -

    +

    date_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “date”.

    +
    +

    Returns a text_field of type “date”.

    date_field("user", "born_on")
     # => <input id="user_born_on" name="user[born_on]" type="date" />
    @@ -471,8 +449,7 @@ 

    date_field("user", "born_on", min: "2014-05-20")
     # => <input id="user_born_on" name="user[born_on]" type="date" min="2014-05-20" />
     
    -

    - +
    @@ -497,15 +474,10 @@

    -

    - - datetime_field(object_name, method, options = {}) - -

    +

    datetime_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “datetime-local”.

    +
    +

    Returns a text_field of type “datetime-local”.

    datetime_field("user", "born_on")
     # => <input id="user_born_on" name="user[born_on]" type="datetime-local" />
    @@ -536,13 +508,14 @@ 

    datetime_field("user", "born_on", include_seconds: false) # => <input id="user_born_on" name="user[born_on]" type="datetime-local" value="2014-05-20T14:35" />

    -
    - +
    -
    - Also aliased as: datetime_local_field -
    +

    + Also aliased as: + + datetime_local_field. +

    @@ -566,24 +539,17 @@

    -

    - - datetime_local_field(object_name, method, options = {}) - -

    +

    datetime_local_field(object_name, method, options = {})

    -
    - -
    - -
    - Alias for: datetime_field -
    +

    + Alias for: + datetime_field. +

    @@ -591,21 +557,15 @@

    -

    - - email_field(object_name, method, options = {}) - -

    +

    email_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “email”.

    +
    +

    Returns a text_field of type “email”.

    email_field("user", "address")
     # => <input id="user_address" name="user[address]" type="email" />
     
    -
    - +
    @@ -630,15 +590,10 @@

    -

    - - fields(scope = nil, model: nil, **options, &block) - -

    +

    fields(scope = nil, model: nil, **options, &block)

    - -
    -

    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| %>
    @@ -677,8 +632,7 @@ 

    Mixing with other

    Same goes for the methods in FormOptionsHelper and DateHelper designed to work with an object as a base, like FormOptionsHelper#collection_select and DateHelper#datetime_select.

    -
    - +
    @@ -711,15 +665,10 @@

    Mixing with other

    -

    - - fields_for(record_name, record_object = nil, options = {}, &block) - -

    +

    fields_for(record_name, record_object = nil, options = {}, &block)

    - -
    -

    Creates a scope around a specific model object like form_with, but doesn’t create the form tags themselves. This makes fields_for suitable for specifying additional model objects in the same form.

    +
    +

    Creates a scope around a specific model object like form_with, 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_with‘s, its method signature is slightly different. Like form_with, 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 fields are 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 -

    @@ -916,8 +865,7 @@

    One-to-many

    Note that fields_for will automatically generate a hidden field to store the ID of the record if it responds to persisted?. There are circumstances where this hidden field is not needed and you can pass include_id: false to prevent fields_for from rendering it automatically.

    -
    - +
    @@ -944,15 +892,10 @@

    One-to-many

    -

    - - file_field(object_name, method, options = {}) - -

    +

    file_field(object_name, method, options = {})

    - -
    -

    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.

    +
    +

    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_with block will set the enclosing form’s encoding to multipart/form-data.

    @@ -986,8 +929,7 @@

    Examples

    file_field(:attachment, :file, class: 'file_input') # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" /> -
    - +
    @@ -1014,15 +956,10 @@

    Examples

    -

    - - form_for(record, options = {}, &block) - -

    +

    form_for(record, options = {}, &block)

    - -
    -

    Creates a form that allows the user to create or update the attributes of a specific model object.

    +
    +

    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:

    @@ -1287,8 +1224,7 @@

    Form to external res ... <% end %> -

    - +
    @@ -1339,15 +1275,10 @@

    Form to external res

    -

    - - form_with(model: false, scope: nil, url: nil, format: nil, **options, &block) - -

    +

    form_with(model: false, scope: nil, url: nil, format: nil, **options, &block)

    - -
    -

    Creates a form tag based on mixing URLs, scopes, or models.

    +
    +

    Creates a form tag based on mixing URLs, scopes, or models.

    # Using just a URL:
     <%= form_with url: articles_path do |form| %>
    @@ -1583,8 +1514,7 @@ 

    Customized form build form_with(**options.merge(builder: LabellingFormBuilder), &block) end

    -
    - +
    @@ -1636,15 +1566,10 @@

    Customized form build

    -

    - - hidden_field(object_name, method, options = {}) - -

    +

    hidden_field(object_name, method, options = {})

    - -
    -

    Returns a hidden 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.

    +
    +

    Returns a hidden 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.

    Examples

    @@ -1657,8 +1582,7 @@

    Examples

    hidden_field(:user, :token) # => <input type="hidden" id="user_token" name="user[token]" value="#{@user.token}" /> -
    - +
    @@ -1683,15 +1607,10 @@

    Examples

    -

    - - label(object_name, method, content_or_options = nil, options = nil, &block) - -

    +

    label(object_name, method, content_or_options = nil, options = nil, &block)

    - -
    -

    Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label 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, except for the :value option, which is designed to target labels for radio_button tags (where the value is used in the ID of the input tag).

    +
    +

    Returns a label tag tailored for labelling an input field for a specified attribute (identified by method) on an object assigned to the template (identified by object). The text of label will default to the attribute name unless a translation is found in the current I18n locale (through helpers.label.<modelname>.<attribute>) or you specify it explicitly. Additional options on the label 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, except for the :value option, which is designed to target labels for radio_button tags (where the value is used in the ID of the input tag).

    Examples

    @@ -1750,8 +1669,7 @@

    Examples

    end # => <label for="article_terms">Accept <a href="/terms">Terms</a>.</label> -
    - +
    @@ -1776,15 +1694,10 @@

    Examples

    -

    - - month_field(object_name, method, options = {}) - -

    +

    month_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “month”.

    +
    +

    Returns a text_field of type “month”.

    month_field("user", "born_on")
     # => <input id="user_born_on" name="user[born_on]" type="month" />
    @@ -1796,8 +1709,7 @@ 

    month_field("user", "born_on") # => <input id="user_born_on" name="user[born_on]" type="date" value="1984-01" />

    -
    - +
    @@ -1822,21 +1734,15 @@

    -

    - - number_field(object_name, method, options = {}) - -

    +

    number_field(object_name, method, options = {})

    - -
    -

    Returns an input tag of type “number”.

    +
    +

    Returns an input tag of type “number”.

    Options

    Supports the same options as FormTagHelper#number_field_tag.

    -
    - +
    @@ -1861,15 +1767,10 @@

    Options

    -

    - - password_field(object_name, method, options = {}) - -

    +

    password_field(object_name, method, options = {})

    - -
    -

    Returns an input tag of the “password” type 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. For security reasons this field is blank by default; pass in a value via options if this is not desired.

    +
    +

    Returns an input tag of the “password” type 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. For security reasons this field is blank by default; pass in a value via options if this is not desired.

    Examples

    @@ -1885,8 +1786,7 @@

    Examples

    password_field(:account, :pin, size: 20, class: 'form_input') # => <input type="password" id="account_pin" name="account[pin]" size="20" class="form_input" /> -
    - +
    @@ -1911,24 +1811,19 @@

    Examples

    -

    - - phone_field(object_name, method, options = {}) - -

    +

    phone_field(object_name, method, options = {})

    - -
    -

    aliases telephone_field

    -
    - +
    +

    aliases telephone_field

    +
    -
    - Alias for: telephone_field -
    +

    + Alias for: + telephone_field. +

    @@ -1936,15 +1831,10 @@

    -

    - - radio_button(object_name, method, tag_value, options = {}) - -

    +

    radio_button(object_name, method, tag_value, options = {})

    - -
    -

    Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked.

    +
    +

    Returns a radio button tag for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object). If the current value of method is tag_value the radio button will be checked.

    To force the radio button to be checked pass checked: true in the options hash. You may pass HTML options there as well.

    @@ -1960,8 +1850,7 @@

    # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" /> # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" /> -

    - +
    @@ -1986,21 +1875,15 @@

    -

    - - range_field(object_name, method, options = {}) - -

    +

    range_field(object_name, method, options = {})

    - -
    -

    Returns an input tag of type “range”.

    +
    +

    Returns an input tag of type “range”.

    Options

    Supports the same options as FormTagHelper#range_field_tag.

    -
    - +
    @@ -2025,24 +1908,17 @@

    Options

    -

    - - rich_text_area(object_name, method, options = {}, &block) - -

    +

    rich_text_area(object_name, method, options = {}, &block)

    -
    - -
    - -
    - Alias for: rich_textarea -
    +

    + Alias for: + rich_textarea. +

    @@ -2050,15 +1926,10 @@

    -

    - - rich_textarea(object_name, method, options = {}, &block) - -

    +

    rich_textarea(object_name, method, options = {}, &block)

    - -
    -

    Returns a trix-editor tag that instantiates the Trix JavaScript editor as well as a hidden field that Trix will write to on changes, so the content will be sent on form submissions.

    +
    +

    Returns a trix-editor tag that instantiates the Trix JavaScript editor as well as a hidden field that Trix will write to on changes, so the content will be sent on form submissions.

    Options

    • @@ -2087,13 +1958,14 @@

      Example

      # <input type="hidden" name="message[content]" id="message_content_trix_input_message_1" value="&lt;h1&gt;Default message&lt;/h1&gt;"> # <trix-editor id="content" input="message_content_trix_input_message_1" class="trix-content" ...></trix-editor> -
    - +
    -
    - Also aliased as: rich_text_area -
    +

    + Also aliased as: + + rich_text_area. +

    @@ -2117,15 +1989,10 @@

    Example

    -

    - - search_field(object_name, method, options = {}) - -

    +

    search_field(object_name, method, options = {})

    - -
    -

    Returns an input of type “search” for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object_name). Inputs of type “search” may be styled differently by some browsers.

    +
    +

    Returns an input of type “search” for accessing a specified attribute (identified by method) on an object assigned to the template (identified by object_name). Inputs of type “search” may be styled differently by some browsers.

    search_field(:user, :name)
     # => <input id="user_name" name="user[name]" type="search" />
    @@ -2143,8 +2010,7 @@ 

    search_field(:user, :name, autosave: true, onsearch: true) # => <input autosave="com.example.www" id="user_name" incremental="true" name="user[name]" onsearch="true" results="10" type="search" />

    -
    - +
    @@ -2169,26 +2035,22 @@

    -

    - - telephone_field(object_name, method, options = {}) - -

    +

    telephone_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “tel”.

    +
    +

    Returns a text_field of type “tel”.

    telephone_field("user", "phone")
     # => <input id="user_phone" name="user[phone]" type="tel" />
     
    -
    - +
    -
    - Also aliased as: phone_field -
    +

    + Also aliased as: + + phone_field. +

    @@ -2212,24 +2074,17 @@

    -

    - - text_area(object_name, method, options = {}) - -

    +

    text_area(object_name, method, options = {})

    -
    - -
    - -
    - Alias for: textarea -
    +

    + Alias for: + textarea. +

    @@ -2237,15 +2092,10 @@

    -

    - - text_field(object_name, method, options = {}) - -

    +

    text_field(object_name, method, options = {})

    - -
    -

    Returns an input tag of the “text” type 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.

    +
    +

    Returns an input tag of the “text” type 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.

    Examples

    @@ -2264,8 +2114,7 @@

    Examples

    text_field(:snippet, :code, size: 20, class: 'code_input') # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" /> -
    - +
    @@ -2290,15 +2139,10 @@

    Examples

    -

    - - textarea(object_name, method, options = {}) - -

    +

    textarea(object_name, method, options = {})

    - -
    -

    Returns a textarea opening and closing tag set 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.

    +
    +

    Returns a textarea opening and closing tag set 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.

    Examples

    @@ -2322,13 +2166,14 @@

    Examples

    # #{@entry.body} # </textarea> -
    - +
    -
    - Also aliased as: text_area -
    +

    + Also aliased as: + + text_area. +

    @@ -2352,15 +2197,10 @@

    Examples

    -

    - - time_field(object_name, method, options = {}) - -

    +

    time_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “time”.

    +
    +

    Returns a text_field of type “time”.

    The default value is generated by trying to call strftime with “%T.%L” on the object’s value. If you pass include_seconds: false, it will be formatted by trying to call strftime with “%H:%M” on the object’s value. It is also possible to override this by passing the “value” option.

    @@ -2391,8 +2231,7 @@

    Examples

    time_field("task", "started_at", value: Time.now, include_seconds: false)
     # => <input id="task_started_at" name="task[started_at]" type="time" value="01:00" />
     
    -
    - +
    @@ -2417,21 +2256,15 @@

    Examples

    -

    - - url_field(object_name, method, options = {}) - -

    +

    url_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “url”.

    +
    +

    Returns a text_field of type “url”.

    url_field("user", "homepage")
     # => <input id="user_homepage" name="user[homepage]" type="url" />
     
    -
    - +
    @@ -2456,15 +2289,10 @@

    -

    - - week_field(object_name, method, options = {}) - -

    +

    week_field(object_name, method, options = {})

    - -
    -

    Returns a text_field of type “week”.

    +
    +

    Returns a text_field of type “week”.

    week_field("user", "born_on")
     # => <input id="user_born_on" name="user[born_on]" type="week" />
    @@ -2476,8 +2304,7 @@ 

    week_field("user", "born_on") # => <input id="user_born_on" name="user[born_on]" type="date" value="1984-W19" />

    -
    - +
    diff --git a/src/classes/ActionView/Helpers/FormOptionsHelper.html b/src/classes/ActionView/Helpers/FormOptionsHelper.html index bf56124345..30f2e21da0 100644 --- a/src/classes/ActionView/Helpers/FormOptionsHelper.html +++ b/src/classes/ActionView/Helpers/FormOptionsHelper.html @@ -224,24 +224,17 @@

    Included Modules

    Instance Public methods

    -

    - - collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) - -

    +

    collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)

    -
    - -
    - -
    - Alias for: collection_checkboxes -
    +

    + Alias for: + collection_checkboxes. +

    @@ -249,15 +242,10 @@

    -

    - - collection_checkboxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) - -

    +

    collection_checkboxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)

    - -
    -

    Returns check box tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made.

    +
    +

    Returns check box tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made.

    The :value_method and :text_method parameters are methods to be called on each member of collection. The return values are used as the value attribute and contents of each check box tag, respectively. They can also be any object that responds to call, such as a proc, that will be called for each member of the collection to retrieve the value/text.

    @@ -327,13 +315,14 @@

    Gotcha

    This is possible thanks to a hidden field generated by the helper method for every collection of checkboxes. This hidden field is given the same field name as the checkboxes with a blank value.

    In the rare case you don’t want this hidden field, you can pass the include_hidden: false option to the helper method.

    -
    - +
    -
    - Also aliased as: collection_check_boxes -
    +

    + Also aliased as: + + collection_check_boxes. +

    @@ -357,15 +346,10 @@

    Gotcha

    -

    - - collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block) - -

    +

    collection_radio_buttons(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)

    - -
    -

    Returns radio button tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made.

    +
    +

    Returns radio button tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made.

    The :value_method and :text_method parameters are methods to be called on each member of collection. The return values are used as the value attribute and contents of each radio button tag, respectively. They can also be any object that responds to call, such as a proc, that will be called for each member of the collection to retrieve the value/text.

    @@ -434,8 +418,7 @@

    Gotcha

    To prevent this the helper generates an auxiliary hidden field before every collection of radio buttons. The hidden field has the same name as collection radio button and blank value.

    In case if you don’t want the helper to generate this hidden field you can specify include_hidden: false option.

    -
    - +
    @@ -460,15 +443,10 @@

    Gotcha

    -

    - - collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {}) - -

    +

    collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {})

    - -
    -

    Returns <select> and <option> tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made without including :prompt or :include_blank in the options hash.

    +
    +

    Returns <select> and <option> tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made without including :prompt or :include_blank in the options hash.

    The :value_method and :text_method parameters are methods to be called on each member of collection. The return values are used as the value attribute and contents of each <option> tag, respectively. They can also be any object that responds to call, such as a proc, that will be called for each member of the collection to retrieve the value/text.

    @@ -501,8 +479,7 @@

    <option value="3">M. Clark</option> </select> -

    - +
    @@ -527,15 +504,10 @@

    -

    - - grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {}) - -

    +

    grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})

    - -
    -

    Returns <select>, <optgroup> and <option> tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made without including :prompt or :include_blank in the options hash.

    +
    +

    Returns <select>, <optgroup> and <option> tags for the collection of existing return values of method for object‘s class. The value returned from calling method on the instance object will be selected. If calling method returns nil, no selection is made without including :prompt or :include_blank in the options hash.

    Parameters:

    • @@ -590,8 +562,7 @@

      </optgroup> </select> -

    - +
    @@ -616,15 +587,10 @@

    -

    - - grouped_options_for_select(grouped_options, selected_key = nil, options = {}) - -

    +

    grouped_options_for_select(grouped_options, selected_key = nil, options = {})

    - -
    -

    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',
    @@ -697,8 +663,7 @@ 

    Options

    Note: Only the <optgroup> and <option> tags are returned, so you still have to wrap the output in an appropriate <select> tag.

    -
    - +
    @@ -745,15 +710,10 @@

    Options

    -

    - - option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil) - -

    +

    option_groups_from_collection_for_select(collection, group_method, group_label_method, option_key_method, option_value_method, selected_key = nil)

    - -
    -

    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:

    • @@ -804,8 +764,7 @@

      Note: Only the <optgroup> and <option> tags are returned, so you still have to wrap the output in an appropriate <select> tag.

      -

    - +
    @@ -835,15 +794,10 @@

    -

    - - options_for_select(container, selected = nil) - -

    +

    options_for_select(container, selected = nil)

    - -
    -

    Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container where the elements respond to first and last (such as a two-element array), the “lasts” serve as option values and the “firsts” as option text. Hashes are turned into this form automatically, so the keys become “firsts” and values become lasts. If selected is specified, the matching “last” or element will get the selected option-tag. selected may also be an array of values to be selected when using a multiple select.

    +
    +

    Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container where the elements respond to first and last (such as a two-element array), the “lasts” serve as option values and the “firsts” as option text. Hashes are turned into this form automatically, so the keys become “firsts” and values become lasts. If selected is specified, the matching “last” or element will get the selected option-tag. selected may also be an array of values to be selected when using a multiple select.

    options_for_select([["Dollar", "$"], ["Kroner", "DKK"]])
     # => <option value="$">Dollar</option>
    @@ -897,8 +851,7 @@ 

    NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.

    -
    - +
    @@ -938,15 +891,10 @@

    -

    - - options_from_collection_for_select(collection, value_method, text_method, selected = nil) - -

    +

    options_from_collection_for_select(collection, value_method, text_method, selected = nil)

    - -
    -

    Returns a string of option tags that have been compiled by iterating over the collection and assigning the result of a call to the value_method as the option value and the text_method as the option text.

    +
    +

    Returns a string of option tags that have been compiled by iterating over the collection and assigning the result of a call to the value_method as the option value and the text_method as the option text.

    options_from_collection_for_select(@people, 'id', 'name')
     # => <option value="#{person.id}">#{person.name}</option>
    @@ -974,8 +922,7 @@ 

    should produce the desired results.

    -
    - +
    @@ -1009,15 +956,10 @@

    -

    - - select(object, method, choices = nil, options = {}, html_options = {}, &block) - -

    +

    select(object, method, choices = nil, options = {}, html_options = {}, &block)

    - -
    -

    Create a select tag and a series of contained option tags for the provided object and method. The option currently held by the object will be selected, provided that the object is available.

    +
    +

    Create a select tag and a series of contained option tags for the provided object and method. The option currently held by the object will be selected, provided that the object is available.

    There are two possible formats for the choices parameter, corresponding to other helpers’ output:

    • @@ -1068,8 +1010,7 @@

      Gotcha

      Note: The client either sends only the hidden field (representing the deselected multiple select box), or both fields. This means that the resulting array always contains a blank string.

      In case if you don’t want the helper to generate this hidden field you can specify include_hidden: false option.

      -
    - +
    @@ -1094,23 +1035,17 @@

    Gotcha

    -

    - - time_zone_options_for_select(selected = nil, priority_zones = nil, model = ::ActiveSupport::TimeZone) - -

    +

    time_zone_options_for_select(selected = nil, priority_zones = nil, model = ::ActiveSupport::TimeZone)

    - -
    -

    Returns a string of option tags for pretty much any time zone in the world. Supply an ActiveSupport::TimeZone name as selected to have it marked as the selected option tag. 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 as a convenience for obtaining a list of the US time zones, or a Regexp to select the zones of your choice)

    +
    +

    Returns a string of option tags for pretty much any time zone in the world. Supply an ActiveSupport::TimeZone name as selected to have it marked as the selected option tag. 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 as a convenience for obtaining a list of the US time zones, or a Regexp to select the zones of your choice)

    The selected parameter must be either nil, or a string that names an ActiveSupport::TimeZone.

    By default, model is the ActiveSupport::TimeZone constant (which can be obtained in Active Record as a value object). The model parameter must respond to all and return an array of objects that represent time zones; each object must respond to name. If a Regexp is given it will attempt to match the zones using match? method.

    NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.

    -
    - +
    @@ -1152,15 +1087,10 @@

    -

    - - time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {}) - -

    +

    time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})

    - -
    -

    Returns select and option tags for the given object and method, using time_zone_options_for_select to generate the list of option tags.

    +
    +

    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.)

    @@ -1180,8 +1110,7 @@

    time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone) -

    - +
    @@ -1206,15 +1135,10 @@

    -

    - - weekday_options_for_select(selected = nil, index_as_value: false, day_format: :day_names, beginning_of_week: Date.beginning_of_week) - -

    +

    weekday_options_for_select(selected = nil, index_as_value: false, day_format: :day_names, beginning_of_week: Date.beginning_of_week)

    - -
    -

    Returns a string of option tags for the days of the week.

    +
    +

    Returns a string of option tags for the days of the week.

    Options

    • @@ -1226,8 +1150,7 @@

      Options

    NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.

    -
    - +
    @@ -1256,17 +1179,11 @@

    Options

    -

    - - weekday_select(object, method, options = {}, html_options = {}, &block) - -

    +

    weekday_select(object, method, options = {}, html_options = {}, &block)

    - -
    -

    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/classes/ActionView/Helpers/FormTagHelper.html b/src/classes/ActionView/Helpers/FormTagHelper.html index 8abfe03f3b..5c23ed5841 100644 --- a/src/classes/ActionView/Helpers/FormTagHelper.html +++ b/src/classes/ActionView/Helpers/FormTagHelper.html @@ -230,15 +230,10 @@

    Included Modules

    Instance Public methods

    -

    - - button_tag(content_or_options = nil, options = nil, &block) - -

    +

    button_tag(content_or_options = nil, options = nil, &block)

    - -
    -

    Creates a button element that defines a submit button, reset button or a generic button which can be used in JavaScript, for example. You can use the button tag as a regular submit tag but it isn’t supported in legacy browsers. However, the button tag does allow for richer labels such as images and emphasis, so this helper will also accept a block. By default, it will create a button tag with type submit, if type is not given.

    +
    +

    Creates a button element that defines a submit button, reset button or a generic button which can be used in JavaScript, for example. You can use the button tag as a regular submit tag but it isn’t supported in legacy browsers. However, the button tag does allow for richer labels such as images and emphasis, so this helper will also accept a block. By default, it will create a button tag with type submit, if type is not given.

    Options

    • @@ -270,8 +265,7 @@

      Examples

      # <strong>Ask me!</strong> # </button> -
    - +
    @@ -308,24 +302,17 @@

    Examples

    -

    - - check_box_tag(name, *args) - -

    +

    check_box_tag(name, *args)

    -
    - -
    - -
    - Alias for: checkbox_tag -
    +

    + Alias for: + checkbox_tag. +

    @@ -333,15 +320,12 @@

    -

    - - checkbox_tag(name, options = {})
    checkbox_tag(name, value, options = {})
    checkbox_tag(name, value, checked, options = {}) - -

    +

    checkbox_tag(name, options = {}) +checkbox_tag(name, value, options = {}) +checkbox_tag(name, value, checked, options = {})

    - -
    -

    Creates a check box form input tag.

    +
    +

    Creates a check box form input tag.

    Options

    • @@ -371,13 +355,14 @@

      Examples

      checkbox_tag 'eula', 'accepted', false, disabled: true # => <input disabled="disabled" id="eula" name="eula" type="checkbox" value="accepted" /> -
    - +
    -
    - Also aliased as: check_box_tag -
    +

    + Also aliased as: + + check_box_tag. +

    @@ -408,15 +393,10 @@

    Examples

    -

    - - color_field_tag(name, value = nil, options = {}) - -

    +

    color_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “color”.

    +
    +

    Creates a text field of type “color”.

    Options

    @@ -436,8 +416,7 @@

    Examples

    color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="color" name="color" type="color" value="#DEF726" /> -
    - +
    @@ -462,15 +441,10 @@

    Examples

    -

    - - date_field_tag(name, value = nil, options = {}) - -

    +

    date_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “date”.

    +
    +

    Creates a text field of type “date”.

    Options

    @@ -490,8 +464,7 @@

    Examples

    date_field_tag 'date', '2014-12-31', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="date" name="date" type="date" value="2014-12-31" /> -
    - +
    @@ -516,15 +489,10 @@

    Examples

    -

    - - datetime_field_tag(name, value = nil, options = {}) - -

    +

    datetime_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “datetime-local”.

    +
    +

    Creates a text field of type “datetime-local”.

    Options

    @@ -553,13 +521,14 @@

    Examples

    datetime_field_tag 'datetime', '2014-01-01T01:01', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="datetime" name="datetime" type="datetime-local" value="2014-01-01T01:01" /> -
    - +
    -
    - Also aliased as: datetime_local_field_tag -
    +

    + Also aliased as: + + datetime_local_field_tag. +

    @@ -583,24 +552,17 @@

    Examples

    -

    - - datetime_local_field_tag(name, value = nil, options = {}) - -

    +

    datetime_local_field_tag(name, value = nil, options = {})

    -
    - -
    - -
    - Alias for: datetime_field_tag -
    +

    + Alias for: + datetime_field_tag. +

    @@ -608,15 +570,10 @@

    -

    - - email_field_tag(name, value = nil, options = {}) - -

    +

    email_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “email”.

    +
    +

    Creates a text field of type “email”.

    Options

    @@ -636,8 +593,7 @@

    Examples

    email_field_tag 'email', 'email@example.com', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="email" name="email" type="email" value="email@example.com" /> -
    - +
    @@ -662,15 +618,10 @@

    Examples

    -

    - - field_id(object_name, method_name, *suffixes, index: nil, namespace: nil) - -

    +

    field_id(object_name, method_name, *suffixes, index: nil, namespace: nil)

    - -
    -

    Generate an HTML id attribute value for the given name and field combination

    +
    +

    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.

    @@ -680,8 +631,7 @@

    In the example above, the <input type="text"> element built by the call to text_field declares an aria-describedby attribute referencing the <span> element, sharing a common id root (post_title, in this case).

    -

    - +
    @@ -720,15 +670,10 @@

    -

    - - field_name(object_name, method_name, *method_names, multiple: false, index: nil) - -

    +

    field_name(object_name, method_name, *method_names, multiple: false, index: nil)

    - -
    -

    Generate an HTML name attribute value for the given name and field combination

    +
    +

    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.

    @@ -738,8 +683,7 @@

    <%= text_field :post, :tag, name: field_name(:post, :tag, multiple: true) %> <%# => <input type="text" name="post[tag][]"> %> -

    - +
    @@ -774,15 +718,10 @@

    -

    - - field_set_tag(legend = nil, options = nil, &block) - -

    +

    field_set_tag(legend = nil, options = nil, &block)

    - -
    -

    Creates a field set for grouping HTML form elements.

    +
    +

    Creates a field set for grouping HTML form elements.

    legend will become the fieldset’s title (optional as per W3C). options accept the same values as tag.

    @@ -803,13 +742,14 @@

    Examples

    <% end %> # => <fieldset class="format"><p><input id="name" name="name" type="text" /></p></fieldset> -
    - +
    -
    - Also aliased as: fieldset_tag -
    +

    + Also aliased as: + + fieldset_tag. +

    @@ -837,24 +777,17 @@

    Examples

    -

    - - fieldset_tag(legend = nil, options = nil, &block) - -

    +

    fieldset_tag(legend = nil, options = nil, &block)

    -
    - -
    - -
    - Alias for: field_set_tag -
    +

    + Alias for: + field_set_tag. +

    @@ -862,15 +795,10 @@

    -

    - - file_field_tag(name, options = {}) - -

    +

    file_field_tag(name, options = {})

    - -
    -

    Creates a file upload field. If you are using file uploads then you will also need to set the multipart option for the form tag:

    +
    +

    Creates a file upload field. If you are using file uploads then you will also need to set the multipart option for the form tag:

    <%= form_tag '/upload', multipart: true do %>
       <label for="file">File to Upload</label> <%= file_field_tag "file" %>
    @@ -911,8 +839,7 @@ 

    Examples

    file_field_tag 'file', accept: 'text/html', class: 'upload', value: 'index.html' # => <input accept="text/html" class="upload" id="file" name="file" type="file" value="index.html" />
    -
    - +
    @@ -937,15 +864,10 @@

    Examples

    -

    - - form_tag(url_for_options = {}, options = {}, &block) - -

    +

    form_tag(url_for_options = {}, options = {}, &block)

    - -
    -

    Starts a form tag that points the action to a URL configured with url_for_options just like ActionController::Base#url_for. The method for the form defaults to POST.

    +
    +

    Starts a form tag that points the action to a URL configured with url_for_options just like ActionController::Base#url_for. The method for the form defaults to POST.

    Options

    • @@ -990,8 +912,7 @@

      Examples

      form_tag('http://far.away.com/form', authenticity_token: "cf50faa3fe97702ca1ae") # form with custom authenticity token -
    - +
    @@ -1021,15 +942,10 @@

    Examples

    -

    - - hidden_field_tag(name, value = nil, options = {}) - -

    +

    hidden_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a hidden form input field used to transmit data that would be lost due to HTTP’s statelessness or data that should be hidden from the user.

    +
    +

    Creates a hidden form input field used to transmit data that would be lost due to HTTP’s statelessness or data that should be hidden from the user.

    Options

    • @@ -1048,8 +964,7 @@

      Examples

      # => <input type="hidden" name="collected_input" id="collected_input" value="" onchange="alert(&#39;Input collected!&#39;)" autocomplete="off" /> -
    - +
    @@ -1078,15 +993,10 @@

    Examples

    -

    - - image_submit_tag(source, options = {}) - -

    +

    image_submit_tag(source, options = {})

    - -
    -

    Displays an image which when clicked will submit the form.

    +
    +

    Displays an image which when clicked will submit the form.

    source is passed to AssetTagHelper#path_to_image

    @@ -1121,8 +1031,7 @@

    Examples

    image_submit_tag("save.png", data: { confirm: "Are you sure?" }) # => <input src="/assets/save.png" data-confirm="Are you sure?" type="image" /> -
    - +
    @@ -1149,15 +1058,10 @@

    Examples

    -

    - - label_tag(name = nil, content_or_options = nil, options = nil, &block) - -

    +

    label_tag(name = nil, content_or_options = nil, options = nil, &block)

    - -
    -

    Creates a label element. Accepts a block.

    +
    +

    Creates a label element. Accepts a block.

    Options

    • @@ -1175,8 +1079,7 @@

      Examples

      label_tag 'name', nil, class: 'small_label' # => <label for="name" class="small_label">Name</label> -
    - +
    @@ -1208,15 +1111,10 @@

    Examples

    -

    - - month_field_tag(name, value = nil, options = {}) - -

    +

    month_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “month”.

    +
    +

    Creates a text field of type “month”.

    Options

    @@ -1243,8 +1141,7 @@

    Examples

    month_field_tag 'month', '2014-01', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="month" name="month" type="month" value="2014-01" /> -
    - +
    @@ -1269,15 +1166,10 @@

    Examples

    -

    - - number_field_tag(name, value = nil, options = {}) - -

    +

    number_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a number field.

    +
    +

    Creates a number field.

    Options

    @@ -1326,8 +1218,7 @@

    Examples

    number_field_tag 'quantity', '1', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="quantity" name="quantity" type="number" value="1" /> -
    - +
    @@ -1357,15 +1248,10 @@

    Examples

    -

    - - password_field_tag(name = "password", value = nil, options = {}) - -

    +

    password_field_tag(name = "password", value = nil, options = {})

    - -
    -

    Creates a password field, a masked text field that will hide the users input behind a mask character.

    +
    +

    Creates a password field, a masked text field that will hide the users input behind a mask character.

    Options

    • @@ -1401,8 +1287,7 @@

      Examples

      password_field_tag 'pin', '1234', maxlength: 4, size: 6, class: "pin_input" # => <input class="pin_input" id="pin" maxlength="4" name="pin" size="6" type="password" value="1234" /> -
    - +
    @@ -1427,24 +1312,17 @@

    Examples

    -

    - - phone_field_tag(name, value = nil, options = {}) - -

    +

    phone_field_tag(name, value = nil, options = {})

    -
    - -
    - -
    - Alias for: telephone_field_tag -
    +

    + Alias for: + telephone_field_tag. +

    @@ -1452,16 +1330,12 @@

    -

    - - radio_button_tag(name, value, options = {})
    radio_button_tag(name, value, checked, options = {}) +

    radio_button_tag(name, value, options = {}) +radio_button_tag(name, value, checked, options = {}) +

    - - - - -
    -

    Creates a radio button; use groups of radio buttons named the same to allow users to select from a group of options.

    +
    +

    Creates a radio button; use groups of radio buttons named the same to allow users to select from a group of options.

    Options

    • @@ -1486,8 +1360,7 @@

      Examples

      radio_button_tag 'color', "green", true, class: "color_input" # => <input checked="checked" class="color_input" id="color_green" name="color" type="radio" value="green" /> -
    - +
    @@ -1519,15 +1392,10 @@

    Examples

    -

    - - range_field_tag(name, value = nil, options = {}) - -

    +

    range_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a range form element.

    +
    +

    Creates a range form element.

    Options

    @@ -1544,8 +1412,7 @@

    Examples

    range_field_tag 'quantity', min: 1, max: 10, step: 2 # => <input id="quantity" name="quantity" min="1" max="10" step="2" type="range" -
    - +
    @@ -1570,15 +1437,10 @@

    Examples

    -

    - - search_field_tag(name, value = nil, options = {}) - -

    +

    search_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “search”.

    +
    +

    Creates a text field of type “search”.

    Options

    @@ -1598,8 +1460,7 @@

    Examples

    search_field_tag 'search', 'Enter your search query here', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="search" name="search" type="search" value="Enter your search query here" /> -
    - +
    @@ -1624,15 +1485,10 @@

    Examples

    -

    - - select_tag(name, option_tags = nil, options = {}) - -

    +

    select_tag(name, option_tags = nil, options = {})

    - -
    -

    Creates a dropdown selection box, or if the :multiple option is set to true, a multiple choice selection box.

    +
    +

    Creates a dropdown selection box, or if the :multiple option is set to true, a multiple choice selection box.

    Helpers::FormOptions can be used to create common select boxes such as countries, time zones, or associated records. option_tags is a string containing the option tags for the select box.

    @@ -1693,8 +1549,7 @@

    Examples

    # => <select id="credit_card" name="credit_card"><option>VISA</option> # <option selected="selected">MasterCard</option></select> -
    - +
    @@ -1741,15 +1596,10 @@

    Examples

    -

    - - submit_tag(value = "Save changes", options = {}) - -

    +

    submit_tag(value = "Save changes", options = {})

    - -
    -

    Creates a submit button with the text value as the caption.

    +
    +

    Creates a submit button with the text value as the caption.

    Options

    • @@ -1777,8 +1627,7 @@

      Examples

      submit_tag "Edit", class: "edit_button" # => <input class="edit_button" data-disable-with="Edit" name="commit" type="submit" value="Edit" /> -
    - +
    @@ -1806,15 +1655,10 @@

    Examples

    -

    - - telephone_field_tag(name, value = nil, options = {}) - -

    +

    telephone_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “tel”.

    +
    +

    Creates a text field of type “tel”.

    Options

    @@ -1834,13 +1678,14 @@

    Examples

    telephone_field_tag 'tel', '0123456789', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="tel" name="tel" type="tel" value="0123456789" /> -
    - +
    -
    - Also aliased as: phone_field_tag -
    +

    + Also aliased as: + + phone_field_tag. +

    @@ -1864,24 +1709,17 @@

    Examples

    -

    - - text_area_tag(name, content = nil, options = {}) - -

    +

    text_area_tag(name, content = nil, options = {})

    -
    - -
    - -
    - Alias for: textarea_tag -
    +

    + Alias for: + textarea_tag. +

    @@ -1889,15 +1727,10 @@

    -

    - - text_field_tag(name, value = nil, options = {}) - -

    +

    text_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a standard text field; use these text fields to input smaller chunks of text like a username or a search query.

    +
    +

    Creates a standard text field; use these text fields to input smaller chunks of text like a username or a search query.

    Options

    • @@ -1938,8 +1771,7 @@

      Examples

      text_field_tag 'ip', '0.0.0.0', maxlength: 15, size: 20, class: "ip-input" # => <input class="ip-input" id="ip" maxlength="15" name="ip" size="20" type="text" value="0.0.0.0" /> -
    - +
    @@ -1964,15 +1796,10 @@

    Examples

    -

    - - textarea_tag(name, content = nil, options = {}) - -

    +

    textarea_tag(name, content = nil, options = {})

    - -
    -

    Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions.

    +
    +

    Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions.

    Options

    • @@ -2009,13 +1836,14 @@

      Examples

      textarea_tag 'comment', nil, class: 'comment_input' # => <textarea class="comment_input" id="comment" name="comment"></textarea> -
    - +
    -
    - Also aliased as: text_area_tag -
    +

    + Also aliased as: + + text_area_tag. +

    @@ -2048,15 +1876,10 @@

    Examples

    -

    - - time_field_tag(name, value = nil, options = {}) - -

    +

    time_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “time”.

    +
    +

    Creates a text field of type “time”.

    Options

    @@ -2088,8 +1911,7 @@

    Examples

    time_field_tag 'time', '01:01', min: '00:00', max: '23:59', step: 1 # => <input id="time" max="23:59" min="00:00" name="time" step="1" type="time" value="01:01" /> -
    - +
    @@ -2114,15 +1936,10 @@

    Examples

    -

    - - url_field_tag(name, value = nil, options = {}) - -

    +

    url_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “url”.

    +
    +

    Creates a text field of type “url”.

    Options

    @@ -2142,8 +1959,7 @@

    Examples

    url_field_tag 'url', 'http://rubyonrails.org', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="url" name="url" type="url" value="http://rubyonrails.org" /> -
    - +
    @@ -2168,17 +1984,11 @@

    Examples

    -

    - - utf8_enforcer_tag() - -

    +

    utf8_enforcer_tag()

    - -
    -

    Creates the hidden UTF-8 enforcer tag. Override this method in a helper to customize the tag.

    -
    - +
    +

    Creates the hidden UTF-8 enforcer tag. Override this method in a helper to customize the tag.

    +
    @@ -2211,15 +2021,10 @@

    -

    - - week_field_tag(name, value = nil, options = {}) - -

    +

    week_field_tag(name, value = nil, options = {})

    - -
    -

    Creates a text field of type “week”.

    +
    +

    Creates a text field of type “week”.

    Options

    @@ -2246,8 +2051,7 @@

    Examples

    week_field_tag 'week', '2014-W01', class: 'special_input', disabled: true # => <input disabled="disabled" class="special_input" id="week" name="week" type="week" value="2014-W01" /> -
    - +
    diff --git a/src/classes/ActionView/Helpers/JavaScriptHelper.html b/src/classes/ActionView/Helpers/JavaScriptHelper.html index e248ec446a..dd30594250 100644 --- a/src/classes/ActionView/Helpers/JavaScriptHelper.html +++ b/src/classes/ActionView/Helpers/JavaScriptHelper.html @@ -95,27 +95,23 @@

    Constants

    Instance Public methods

    -

    - - escape_javascript(javascript) - -

    +

    escape_javascript(javascript)

    - -
    -

    Escapes carriage returns and single and double quotes for JavaScript segments.

    +
    +

    Escapes carriage returns and single and double quotes for JavaScript segments.

    Also available through the alias j(). This is particularly helpful in JavaScript responses, like:

    $('some_element').replaceWith('<%= j render 'some/element_template' %>');
     
    -
    - +
    -
    - Also aliased as: j -
    +

    + Also aliased as: + + j. +

    @@ -145,24 +141,17 @@

    -

    - - j(javascript) - -

    +

    j(javascript)

    -
    - -
    - -
    - Alias for: escape_javascript -
    +

    + Alias for: + escape_javascript. +

    @@ -170,15 +159,10 @@

    -

    - - javascript_tag(content_or_options_with_block = nil, html_options = {}, &block) - -

    +

    javascript_tag(content_or_options_with_block = nil, html_options = {}, &block)

    - -
    -

    Returns a JavaScript tag with the content inside. Example:

    +
    +

    Returns a JavaScript tag with the content inside. Example:

    javascript_tag "alert('All is good')"
     
    @@ -219,8 +203,7 @@

    alert('All is good') <% end -%> -

    - +
    diff --git a/src/classes/ActionView/Helpers/NumberHelper.html b/src/classes/ActionView/Helpers/NumberHelper.html index f95c5fa233..5e95191ffb 100644 --- a/src/classes/ActionView/Helpers/NumberHelper.html +++ b/src/classes/ActionView/Helpers/NumberHelper.html @@ -105,15 +105,10 @@

    Methods

    Instance Public methods

    -

    - - number_to_currency(number, options = {}) - -

    +

    number_to_currency(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_currency.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_currency.

    number_to_currency("1234")               # => "$1234.00"
     
    @@ -123,8 +118,7 @@

    number_to_currency("12x34")              # => "$12x34"
     number_to_currency("12x34", raise: true) # => InvalidNumberError
     
    -

    - +
    @@ -149,15 +143,10 @@

    -

    - - number_to_human(number, options = {}) - -

    +

    number_to_human(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_human.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_human.

    number_to_human("1234")               # => "1.23 Thousand"
     
    @@ -167,8 +156,7 @@

    number_to_human("12x34")              # => "12x34"
     number_to_human("12x34", raise: true) # => InvalidNumberError
     
    -

    - +
    @@ -193,15 +181,10 @@

    -

    - - number_to_human_size(number, options = {}) - -

    +

    number_to_human_size(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_human_size.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_human_size.

    number_to_human_size("1234")               # => "1.21 KB"
     
    @@ -211,8 +194,7 @@

    number_to_human_size("12x34")              # => "12x34"
     number_to_human_size("12x34", raise: true) # => InvalidNumberError
     
    -

    - +
    @@ -237,15 +219,10 @@

    -

    - - number_to_percentage(number, options = {}) - -

    +

    number_to_percentage(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_percentage.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_percentage.

    number_to_percentage("99")               # => "99.000%"
     
    @@ -255,8 +232,7 @@

    number_to_percentage("99x")              # => "99x%"
     number_to_percentage("99x", raise: true) # => InvalidNumberError
     
    -

    - +
    @@ -281,15 +257,10 @@

    -

    - - number_to_phone(number, options = {}) - -

    +

    number_to_phone(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_phone.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_phone.

    number_to_phone("1234567890")         # => "123-456-7890"
     
    @@ -299,8 +270,7 @@

    number_to_phone("12x34")              # => "12x34"
     number_to_phone("12x34", raise: true) # => InvalidNumberError
     
    -

    - +
    @@ -329,15 +299,10 @@

    -

    - - number_with_delimiter(number, options = {}) - -

    +

    number_with_delimiter(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_delimited.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_delimited.

    number_with_delimiter("1234")               # => "1,234"
     
    @@ -347,8 +312,7 @@

    number_with_delimiter("12x34")              # => "12x34"
     number_with_delimiter("12x34", raise: true) # => InvalidNumberError
     
    -

    - +
    @@ -373,15 +337,10 @@

    -

    - - number_with_precision(number, options = {}) - -

    +

    number_with_precision(number, options = {})

    - -
    -

    Delegates to ActiveSupport::NumberHelper#number_to_rounded.

    +
    +

    Delegates to ActiveSupport::NumberHelper#number_to_rounded.

    number_with_precision("1234")               # => "1234.000"
     
    @@ -391,8 +350,7 @@

    number_with_precision("12x34")              # => "12x34"
     number_with_precision("12x34", raise: true) # => InvalidNumberError
     
    -

    - +
    diff --git a/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html b/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html index b794bda2ae..4baf4bba34 100644 --- a/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html +++ b/src/classes/ActionView/Helpers/NumberHelper/InvalidNumberError.html @@ -83,17 +83,9 @@

    Attributes

    Class Public methods

    -

    - - new(number) - -

    +

    new(number)

    -
    - -
    - diff --git a/src/classes/ActionView/Helpers/OutputSafetyHelper.html b/src/classes/ActionView/Helpers/OutputSafetyHelper.html index d83b9f801f..a8a2c26e79 100644 --- a/src/classes/ActionView/Helpers/OutputSafetyHelper.html +++ b/src/classes/ActionView/Helpers/OutputSafetyHelper.html @@ -72,23 +72,17 @@

    Methods

    Instance Public methods

    -

    - - raw(stringish) - -

    +

    raw(stringish)

    - -
    -

    This method outputs without escaping a string. Since escaping tags is now default, this can be used when you don’t want Rails to automatically escape tags. This is not recommended if the data is coming from the user’s input.

    +
    +

    This method outputs without escaping a string. Since escaping tags is now default, this can be used when you don’t want Rails to automatically escape tags. This is not recommended if the data is coming from the user’s input.

    For example:

    raw @user.name
     # => 'Jimmy <alert>Tables</alert>'
     
    -
    - +
    @@ -113,15 +107,10 @@

    -

    - - safe_join(array, sep = $,) - -

    +

    safe_join(array, sep = $,)

    - -
    -

    This method returns an HTML safe string similar to what Array#join would return. The array is flattened, and all items, including the supplied separator, are HTML escaped unless they are HTML safe, and the returned string is marked as HTML safe.

    +
    +

    This method returns an HTML safe string similar to what Array#join would return. The array is flattened, and all items, including the supplied separator, are HTML escaped unless they are HTML safe, and the returned string is marked as HTML safe.

    safe_join([tag.p("foo"), "<p>bar</p>"], "<br>")
     # => "<p>foo</p>&lt;br&gt;&lt;p&gt;bar&lt;/p&gt;"
    @@ -129,8 +118,7 @@ 

    safe_join([tag.p("foo"), tag.p("bar")], tag.br) # => "<p>foo</p><br><p>bar</p>"

    -
    - +
    @@ -157,17 +145,11 @@

    -

    - - to_sentence(array, options = {}) - -

    +

    to_sentence(array, options = {})

    - -
    -

    Converts the array to a comma-separated sentence where the last element is joined by the connector word. This is the html_safe-aware version of ActiveSupport’s Array#to_sentence.

    -
    - +
    +

    Converts the array to a comma-separated sentence where the last element is joined by the connector word. This is the html_safe-aware version of ActiveSupport’s Array#to_sentence.

    +
    diff --git a/src/classes/ActionView/Helpers/RenderingHelper.html b/src/classes/ActionView/Helpers/RenderingHelper.html index 81c00980cc..c8e405ffca 100644 --- a/src/classes/ActionView/Helpers/RenderingHelper.html +++ b/src/classes/ActionView/Helpers/RenderingHelper.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - _layout_for(*args, &block) - -

    +

    _layout_for(*args, &block)

    - -
    -

    Overrides _layout_for in the context object so it supports the case a block is passed to a partial. Returns the contents that are yielded to a layout, given a name or a block.

    +
    +

    Overrides _layout_for in the context object so it supports the case a block is passed to a partial. Returns the contents that are yielded to a layout, given a name or a block.

    You can think of a layout as a method that is called with a block. If the user calls yield :some_name, the block, by default, returns content_for(:some_name). If the user calls simply yield, the default block returns content_for(:layout).

    @@ -121,8 +116,7 @@

    Hello David </html> -

    - +
    @@ -153,15 +147,10 @@

    -

    - - render(options = {}, locals = {}, &block) - -

    +

    render(options = {}, locals = {}, &block)

    - -
    -

    Renders a template and returns the result.

    +
    +

    Renders a template and returns the result.

    Pass the template to render as the first argument. This is shorthand syntax for partial rendering, so the template filename should be prefixed with an underscore. The partial renderer looks for the partial template in the directory of the calling template first.

    @@ -300,8 +289,7 @@

    Options

    <%= render template: "posts/content", handlers: [:builder] %> # => renders app/views/posts/content.html.builder -
    - +
    diff --git a/src/classes/ActionView/Helpers/SanitizeHelper.html b/src/classes/ActionView/Helpers/SanitizeHelper.html index dd04f93643..80fab1d94a 100644 --- a/src/classes/ActionView/Helpers/SanitizeHelper.html +++ b/src/classes/ActionView/Helpers/SanitizeHelper.html @@ -78,15 +78,10 @@

    Methods

    Instance Public methods

    -

    - - sanitize(html, options = {}) - -

    +

    sanitize(html, options = {})

    - -
    -

    Sanitizes HTML input, stripping all but known-safe tags and attributes.

    +
    +

    Sanitizes HTML input, stripping all but known-safe tags and attributes.

    It also strips href / src attributes with unsafe protocols like javascript:, while also protecting against attempts to use Unicode, ASCII, and hex character references to work around these protocol filters.

    @@ -180,8 +175,7 @@

    Global Configuration

    NOTE: Rails::HTML5::Sanitizer is not supported on JRuby, so on JRuby platforms Rails will fall back to using Rails::HTML4::Sanitizer.

    -
    - +
    @@ -206,17 +200,11 @@

    Global Configuration

    -

    - - sanitize_css(style) - -

    +

    sanitize_css(style)

    - -
    -

    Sanitizes a block of CSS code. Used by sanitize when it comes across a style attribute.

    -
    - +
    +

    Sanitizes a block of CSS code. Used by sanitize when it comes across a style attribute.

    +
    @@ -241,15 +229,10 @@

    - + - -
    -

    Strips all link tags from html leaving just the link text.

    +
    +

    Strips all link tags from html leaving just the link text.

    strip_links('<a href="http://www.rubyonrails.org">Ruby on Rails</a>')
     # => Ruby on Rails
    @@ -263,8 +246,7 @@ 
    -
    - +
    @@ -289,15 +271,10 @@
    -

    - - strip_tags(html) - -

    +

    strip_tags(html)

    - -
    -

    Strips all HTML tags from html, including comments and special characters.

    +
    +

    Strips all HTML tags from html, including comments and special characters.

    strip_tags("Strip <i>these</i> tags!")
     # => Strip these tags!
    @@ -311,8 +288,7 @@ 

    strip_tags("> A quote from Smith & Wesson") # => &gt; A quote from Smith &amp; Wesson

    -
    - +
    diff --git a/src/classes/ActionView/Helpers/TagHelper.html b/src/classes/ActionView/Helpers/TagHelper.html index 7ac1c37ad2..1112470fea 100644 --- a/src/classes/ActionView/Helpers/TagHelper.html +++ b/src/classes/ActionView/Helpers/TagHelper.html @@ -164,17 +164,9 @@

    Constants

    Class Public methods

    -

    - - build_tag_values(*args) - -

    +

    build_tag_values(*args)

    -
    - -
    - @@ -214,17 +206,9 @@

    -

    - - ensure_valid_html5_tag_name(name) - -

    +

    ensure_valid_html5_tag_name(name)

    -
    - -
    - @@ -253,15 +237,10 @@

    Instance Public methods

    -

    - - cdata_section(content) - -

    +

    cdata_section(content)

    - -
    -

    Returns a CDATA section with the given content. CDATA sections are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string <![CDATA[ and end with (and may not contain) the string ]]>.

    +
    +

    Returns a CDATA section with the given content. CDATA sections are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string <![CDATA[ and end with (and may not contain) the string ]]>.

    cdata_section("<hello world>")
     # => <![CDATA[<hello world>]]>
    @@ -272,8 +251,7 @@ 

    cdata_section("hello]]>world") # => <![CDATA[hello]]]]><![CDATA[>world]]>

    -
    - +
    @@ -299,24 +277,17 @@

    -

    - - class_names(*args) - -

    +

    class_names(*args)

    -
    - -
    - -
    - Alias for: token_list -
    +

    + Alias for: + token_list. +

    @@ -324,15 +295,10 @@

    -

    - - content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block) - -

    +

    content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &block)

    - -
    -

    Returns an HTML block tag of type name surrounding the content. Add HTML attributes by passing an attributes hash to options. Instead of passing the content as an argument, you can also use a block in which case, you pass your options as the second parameter. Set escape to false to disable escaping. Note: this is legacy syntax, see tag method description for details.

    +
    +

    Returns an HTML block tag of type name surrounding the content. Add HTML attributes by passing an attributes hash to options. Instead of passing the content as an argument, you can also use a block in which case, you pass your options as the second parameter. Set escape to false to disable escaping. Note: this is legacy syntax, see tag method description for details.

    Options

    @@ -356,8 +322,7 @@

    Examples

    <% end -%> # => <div class="strong">Hello world!</div> -
    - +
    @@ -389,15 +354,10 @@

    Examples

    -

    - - escape_once(html) - -

    +

    escape_once(html)

    - -
    -

    Returns an escaped version of html without affecting existing escaped entities.

    +
    +

    Returns an escaped version of html without affecting existing escaped entities.

    escape_once("1 < 2 &amp; 3")
     # => "1 &lt; 2 &amp; 3"
    @@ -405,8 +365,7 @@ 

    escape_once("&lt;&lt; Accept & Checkout") # => "&lt;&lt; Accept &amp; Checkout"

    -
    - +
    @@ -431,15 +390,10 @@

    -

    - - tag(name = nil, options = nil, open = false, escape = true) - -

    +

    tag(name = nil, options = nil, open = false, escape = true)

    - -
    -

    Returns an HTML tag.

    +
    +

    Returns an HTML tag.

    Building HTML tags

    @@ -580,8 +534,7 @@

    Examples

    tag("div", class: { highlight: current_user.admin? }) # => <div class="highlight" /> -
    - +
    @@ -611,15 +564,10 @@

    Examples

    -

    - - token_list(*args) - -

    +

    token_list(*args)

    - -
    -

    Returns a string of tokens built from args.

    +
    +

    Returns a string of tokens built from args.

    Examples

    @@ -632,13 +580,14 @@

    Examples

    token_list(nil, false, 123, "", "foo", { bar: true }) # => "123 foo bar" -
    - +
    -
    - Also aliased as: class_names -
    +

    + Also aliased as: + + class_names. +

    diff --git a/src/classes/ActionView/Helpers/Tags/ActionText.html b/src/classes/ActionView/Helpers/Tags/ActionText.html index b3a52afeca..48ed603f34 100644 --- a/src/classes/ActionView/Helpers/Tags/ActionText.html +++ b/src/classes/ActionView/Helpers/Tags/ActionText.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - render(&block) - -

    +

    render(&block)

    -
    - -
    - diff --git a/src/classes/ActionView/Helpers/TextHelper.html b/src/classes/ActionView/Helpers/TextHelper.html index 2be6fafa13..dd7c2bd973 100644 --- a/src/classes/ActionView/Helpers/TextHelper.html +++ b/src/classes/ActionView/Helpers/TextHelper.html @@ -153,15 +153,10 @@

    Included Modules

    Instance Public methods

    -

    - - concat(string) - -

    +

    concat(string)

    - -
    -

    The preferred method of outputting text in your views is to use the <%= "text" %> eRuby syntax. The regular puts and print methods do not operate as expected in an eRuby code block. If you absolutely must output text within a non-output code block (i.e., <% %>), you can use the concat method.

    +
    +

    The preferred method of outputting text in your views is to use the <%= "text" %> eRuby syntax. The regular puts and print methods do not operate as expected in an eRuby code block. If you absolutely must output text within a non-output code block (i.e., <% %>), you can use the concat method.

    <% concat "hello" %> is equivalent to <%= "hello" %>
     
    @@ -177,8 +172,7 @@ 

    <%= link_to "Sign In", action: :sign_in %> <% end %>

    -
    - +
    @@ -203,15 +197,10 @@

    -

    - - current_cycle(name = "default") - -

    +

    current_cycle(name = "default")

    - -
    -

    Returns the current cycle string after a cycle has been started. Useful for complex table highlighting or any other design need which requires the current cycle string in more than one place.

    +
    +

    Returns the current cycle string after a cycle has been started. Useful for complex table highlighting or any other design need which requires the current cycle string in more than one place.

    <%# Alternate background colors %>
     <% @items = [1,2,3,4] %>
    @@ -221,8 +210,7 @@ 

    </div> <% end %>

    -
    - +
    @@ -248,15 +236,10 @@

    -

    - - cycle(first_value, *values) - -

    +

    cycle(first_value, *values)

    - -
    -

    Creates a Cycle object whose to_s method cycles through elements of an array every time it is called. This can be used for example, to alternate classes for table rows. You can use named cycles to allow nesting in loops. Passing a Hash as the last parameter with a :name key will create a named cycle. The default name for a cycle without a :name key is "default". You can manually reset a cycle by calling reset_cycle and passing the name of the cycle. The current cycle string can be obtained anytime using the current_cycle method.

    +
    +

    Creates a Cycle object whose to_s method cycles through elements of an array every time it is called. This can be used for example, to alternate classes for table rows. You can use named cycles to allow nesting in loops. Passing a Hash as the last parameter with a :name key will create a named cycle. The default name for a cycle without a :name key is "default". You can manually reset a cycle by calling reset_cycle and passing the name of the cycle. The current cycle string can be obtained anytime using the current_cycle method.

     <%# Alternate CSS classes for even and odd numbers... %>
      <% @items = [1,2,3,4] %>
    @@ -288,8 +271,7 @@ 

    </tr> <% end %>

    -
    - +
    @@ -323,15 +305,10 @@

    -

    - - excerpt(text, phrase, options = {}) - -

    +

    excerpt(text, phrase, options = {})

    - -
    -

    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.

    +
    +

    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
    @@ -365,8 +342,7 @@

    Examples

    excerpt('This is a very beautiful morning', 'very', separator: ' ', radius: 1) # => "...a very beautiful..." -
    - +
    @@ -426,15 +402,10 @@

    Examples

    -

    - - highlight(text, phrases, options = {}, &block) - -

    +

    highlight(text, phrases, options = {}, &block)

    - -
    -

    Highlights occurrences of phrases in text by formatting them with a highlighter string. phrases can be one or more strings or regular expressions. The result will be marked HTML safe. By default, text is sanitized before highlighting to prevent possible XSS attacks.

    +
    +

    Highlights occurrences of phrases in text by formatting them with a highlighter string. phrases can be one or more strings or regular expressions. The result will be marked HTML safe. By default, text is sanitized before highlighting to prevent possible XSS attacks.

    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.

    @@ -470,8 +441,7 @@

    Examples

    highlight('<a href="javascript:alert(\'no!\')">ruby</a> on rails', 'rails', sanitize: false) # => "<a href=\"javascript:alert('no!')\">ruby</a> on <mark>rails</mark>" -
    - +
    @@ -514,15 +484,10 @@

    Examples

    -

    - - pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale) - -

    +

    pluralize(count, singular, plural_arg = nil, plural: plural_arg, locale: I18n.locale)

    - -
    -

    Attempts to pluralize the singular word unless count is 1. If plural is supplied, it will use that when count is > 1, otherwise it will use the Inflector to determine the plural form for the given locale, which defaults to I18n.locale.

    +
    +

    Attempts to pluralize the singular word unless count is 1. If plural is supplied, it will use that when count is > 1, otherwise it will use the Inflector to determine the plural form for the given locale, which defaults to I18n.locale.

    The word will be pluralized using rules defined for the locale (you must define your own inflection rules for languages other than English). See ActiveSupport::Inflector.pluralize.

    @@ -541,8 +506,7 @@

    pluralize(2, 'Person', locale: :de) # => "2 Personen" -

    - +
    @@ -573,15 +537,10 @@

    -

    - - reset_cycle(name = "default") - -

    +

    reset_cycle(name = "default")

    - -
    -

    Resets a cycle so that it starts from the first element the next time it is called. Pass in name to reset a named cycle.

    +
    +

    Resets a cycle so that it starts from the first element the next time it is called. Pass in name to reset a named cycle.

    <%# Alternate CSS classes for even and odd numbers... %>
     <% @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] %>
    @@ -599,8 +558,7 @@ 

    <% end %> </table>

    -
    - +
    @@ -626,17 +584,9 @@

    -

    - - safe_concat(string) - -

    +

    safe_concat(string)

    -
    - -
    - @@ -661,15 +611,10 @@

    -

    - - simple_format(text, html_options = {}, options = {}) - -

    +

    simple_format(text, html_options = {}, options = {})

    - -
    -

    Returns text transformed into HTML using simple formatting rules. Two or more consecutive newlines (\n\n or \r\n\r\n) are considered a paragraph and wrapped in <p> tags. One newline (\n or \r\n) is considered a linebreak and a <br /> tag is appended. This method does not remove the newlines from the text.

    +
    +

    Returns text transformed into HTML using simple formatting rules. Two or more consecutive newlines (\n\n or \r\n\r\n) are considered a paragraph and wrapped in <p> tags. One newline (\n or \r\n) is considered a linebreak and a <br /> tag is appended. This method does not remove the newlines from the text.

    You can pass any HTML attributes into html_options. These will be added to all created paragraphs.

    @@ -709,8 +654,7 @@

    Examples

    simple_format("<a target=\"_blank\" href=\"http://example.com\">Continue</a>", {}, { sanitize_options: { attributes: %w[target href] } }) # => "<p><a target=\"_blank\" href=\"http://example.com\">Continue</a></p>" -
    - +
    @@ -746,15 +690,10 @@

    Examples

    -

    - - truncate(text, options = {}, &block) - -

    +

    truncate(text, options = {}, &block)

    - -
    -

    Truncates text if it is longer than a specified :length. If text is truncated, an omission marker will be appended to the result for a total length not exceeding :length.

    +
    +

    Truncates text if it is longer than a specified :length. If text is truncated, an omission marker will be appended to the result for a total length not exceeding :length.

    You can also pass a block to render and append extra content after the omission marker when text is truncated. However, this content can cause the total length to exceed :length characters.

    @@ -798,8 +737,7 @@

    Examples

    truncate("Once upon a time in a world far far away") { link_to "Continue", "#" } # => "Once upon a time in a world...<a href=\"#\">Continue</a>" -
    - +
    @@ -831,15 +769,10 @@

    Examples

    -

    - - word_wrap(text, line_width: 80, break_sequence: "\n") - -

    +

    word_wrap(text, line_width: 80, break_sequence: "\n")

    - -
    -

    Wraps the text into lines no longer than line_width width. This method breaks on the first whitespace character that does not exceed line_width (which is 80 by default).

    +
    +

    Wraps the text into lines no longer than line_width width. This method breaks on the first whitespace character that does not exceed line_width (which is 80 by default).

    word_wrap('Once upon a time')
     # => "Once upon a time"
    @@ -859,8 +792,7 @@ 

    word_wrap('Once upon a time', line_width: 1, break_sequence: "\r\n")
     # => "Once\r\nupon\r\na\r\ntime"
     
    -

    - +
    diff --git a/src/classes/ActionView/Helpers/TranslationHelper.html b/src/classes/ActionView/Helpers/TranslationHelper.html index f4bdccbf5e..26b82c3946 100644 --- a/src/classes/ActionView/Helpers/TranslationHelper.html +++ b/src/classes/ActionView/Helpers/TranslationHelper.html @@ -104,24 +104,17 @@

    Attributes

    Instance Public methods

    -

    - - l(object, **options) - -

    +

    l(object, **options)

    -
    - -
    - -
    - Alias for: localize -
    +

    + Alias for: + localize. +

    @@ -129,24 +122,20 @@

    -

    - - localize(object, **options) - -

    +

    localize(object, **options)

    - -
    -

    Delegates to I18n.localize with no additional functionality.

    +
    +

    Delegates to I18n.localize with no additional functionality.

    See www.rubydoc.info/gems/i18n/I18n/Backend/Base:localize for more information.

    -
    - +
    -
    - Also aliased as: l -
    +

    + Also aliased as: + + l. +

    @@ -170,24 +159,17 @@

    -

    - - t(key, **options) - -

    +

    t(key, **options)

    -
    - -
    - -
    - Alias for: translate -
    +

    + Alias for: + translate. +

    @@ -195,15 +177,10 @@

    -

    - - translate(key, **options) - -

    +

    translate(key, **options)

    - -
    -

    Delegates to I18n#translate but also performs three additional functions.

    +
    +

    Delegates to I18n#translate but also performs three additional functions.

    First, it will ensure that any thrown MissingTranslation messages will be rendered as inline spans that:

    • @@ -237,13 +214,14 @@

      This enables annotate translated text to be aware of the scope it was resolved against.

      -

    - +
    -
    - Also aliased as: t -
    +

    + Also aliased as: + + t. +

    diff --git a/src/classes/ActionView/Helpers/UrlHelper.html b/src/classes/ActionView/Helpers/UrlHelper.html index 6148ad758c..b7be638681 100644 --- a/src/classes/ActionView/Helpers/UrlHelper.html +++ b/src/classes/ActionView/Helpers/UrlHelper.html @@ -164,15 +164,10 @@

    Constants

    Instance Public methods

    -

    - - button_to(name = nil, options = nil, html_options = nil, &block) - -

    +

    button_to(name = nil, options = nil, html_options = nil, &block)

    - -
    -

    Generates a form containing a single button that submits to the URL created by the set of options. This is the safest method to ensure links that cause changes to your data are not triggered by search bots or accelerators.

    +
    +

    Generates a form containing a single button that submits to the URL created by the set of options. This is the safest method to ensure links that cause changes to your data are not triggered by search bots or accelerators.

    You can control the form and button behavior with html_options. Most values in html_options are passed through to the button element. For example, passing a :class option within html_options will set the class attribute of the button element.

    @@ -251,8 +246,7 @@

    Examples

    # <input name="authenticity_token" type="hidden" value="10f2163b45388899ad4d5ae948988266befcb6c3d1b2451cf657a0c293d605a6" autocomplete="off"/> # </form>" -
    - +
    @@ -330,15 +324,10 @@

    Examples

    -

    - - current_page?(options = nil, check_parameters: false, method: :get, **options_as_kwargs) - -

    +

    current_page?(options = nil, check_parameters: false, method: :get, **options_as_kwargs)

    - -
    -

    True if the current request URI was generated by the given options.

    +
    +

    True if the current request URI was generated by the given options.

    Examples

    @@ -394,8 +383,7 @@

    Examples

    We can also pass in the symbol arguments instead of strings.

    -
    - +
    @@ -459,15 +447,10 @@

    Examples

    - + - -
    -

    Creates an anchor element of the given name using a URL created by the set of options. See the valid options in the documentation for url_for. It’s also possible to pass a String instead of an options hash, which generates an anchor element that uses the value of the String as the href for the link. Using a :back Symbol instead of an options hash will generate a link to the referrer (a JavaScript back link will be used in place of a referrer if none exists). If nil is passed as the name the value of the link itself will become the name.

    +
    +

    Creates an anchor element of the given name using a URL created by the set of options. See the valid options in the documentation for url_for. It’s also possible to pass a String instead of an options hash, which generates an anchor element that uses the value of the String as the href for the link. Using a :back Symbol instead of an options hash will generate a link to the referrer (a JavaScript back link will be used in place of a referrer if none exists). If nil is passed as the name the value of the link itself will become the name.

    @@ -603,8 +586,7 @@ link_to "Visit Other Site", "https://rubyonrails.org/", data: { turbo_confirm: "Are you sure?" } # => <a href="https://rubyonrails.org/" data-turbo-confirm="Are you sure?">Visit Other Site</a> -
    - +
    @@ -637,15 +619,10 @@
    - + - -
    -

    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.

    @@ -663,8 +640,7 @@ # If they are logged in... # => <a href="/accounts/show/3">my_username</a> -
    - +
    @@ -697,15 +673,10 @@
    - + - -
    -

    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.

    @@ -723,8 +694,7 @@ # If not... # => <a href="/accounts/signup">Reply</a> -
    - +
    @@ -749,15 +719,10 @@
    - + - -
    -

    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).

    @@ -793,8 +758,7 @@ end %> -
    - +
    @@ -819,15 +783,10 @@
    -

    - - mail_to(email_address, name = nil, html_options = {}, &block) - -

    +

    mail_to(email_address, name = nil, html_options = {}, &block)

    - -
    -

    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.

    +
    +

    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.

    @@ -870,8 +829,7 @@

    Examples

    <strong>Email me:</strong> <span>me@domain.com</span> </a> -
    - +
    @@ -908,15 +866,10 @@

    Examples

    -

    - - phone_to(phone_number, name = nil, html_options = {}, &block) - -

    +

    phone_to(phone_number, name = nil, html_options = {}, &block)

    - -
    -

    Creates a TEL anchor link tag to the specified phone_number. When the link is clicked, the default app to make phone calls is opened and prepopulated with the phone number.

    +
    +

    Creates a TEL anchor link tag to the specified phone_number. When the link is clicked, the default app to make phone calls is opened and prepopulated with the phone number.

    If name is not specified, phone_number will be used as the name of the link.

    @@ -950,8 +903,7 @@

    Examples

    <strong>Phone me:</strong> </a> -
    - +
    @@ -985,15 +937,10 @@

    Examples

    -

    - - sms_to(phone_number, name = nil, html_options = {}, &block) - -

    +

    sms_to(phone_number, name = nil, html_options = {}, &block)

    - -
    -

    Creates an SMS anchor link tag to the specified phone_number. When the link is clicked, the default SMS messaging app is opened ready to send a message to the linked phone number. If the body option is specified, the contents of the message will be preset to body.

    +
    +

    Creates an SMS anchor link tag to the specified phone_number. When the link is clicked, the default SMS messaging app is opened ready to send a message to the linked phone number. If the body option is specified, the contents of the message will be preset to body.

    If name is not specified, phone_number will be used as the name of the link.

    @@ -1032,8 +979,7 @@

    Examples

    <strong>Text me:</strong> </a> -
    - +
    diff --git a/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html b/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html index ec6180f962..9c2575b051 100644 --- a/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html +++ b/src/classes/ActionView/Helpers/UrlHelper/ClassMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - _url_for_modules() - -

    +

    _url_for_modules()

    -
    - -
    - diff --git a/src/classes/ActionView/Layouts.html b/src/classes/ActionView/Layouts.html index 964865a5fb..052850d063 100644 --- a/src/classes/ActionView/Layouts.html +++ b/src/classes/ActionView/Layouts.html @@ -290,17 +290,11 @@

    Included Modules

    Instance Public methods

    -

    - - action_has_layout?() - -

    +

    action_has_layout?()

    - -
    -

    Controls whether an action should be rendered using a layout. If you want to disable any layout settings for the current action so that it is rendered without a layout then either override this method in your controller to return false for that action or set the action_has_layout attribute to false before rendering.

    -
    - +
    +

    Controls whether an action should be rendered using a layout. If you want to disable any layout settings for the current action so that it is rendered without a layout then either override this method in your controller to return false for that action or set the action_has_layout attribute to false before rendering.

    +
    diff --git a/src/classes/ActionView/Layouts/ClassMethods.html b/src/classes/ActionView/Layouts/ClassMethods.html index 99b29c1d6f..2d91eb14b0 100644 --- a/src/classes/ActionView/Layouts/ClassMethods.html +++ b/src/classes/ActionView/Layouts/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - layout(layout, conditions = {}) - -

    +

    layout(layout, conditions = {})

    - -
    -

    Specify the layout to use for this class.

    +
    +

    Specify the layout to use for this class.

    If the specified layout is a:

    String
    @@ -102,8 +97,7 @@

    Options (conditions)

  • :except - Apply this layout to all actions but this one.

  • -
    - +
    diff --git a/src/classes/ActionView/LookupContext/DetailsCache.html b/src/classes/ActionView/LookupContext/DetailsCache.html index d2bcb94c67..f6957dc83b 100644 --- a/src/classes/ActionView/LookupContext/DetailsCache.html +++ b/src/classes/ActionView/LookupContext/DetailsCache.html @@ -82,17 +82,11 @@

    Attributes

    Instance Public methods

    -

    - - disable_cache() - -

    +

    disable_cache()

    - -
    -

    Temporary skip passing the details_key forward.

    -
    - +
    +

    Temporary skip passing the details_key forward.

    +
    @@ -123,17 +117,9 @@

    Instance Private methods

    -

    - - _set_detail(key, value) - -

    +

    _set_detail(key, value)

    -
    - -
    - diff --git a/src/classes/ActionView/LookupContext/ViewPaths.html b/src/classes/ActionView/LookupContext/ViewPaths.html index 29b9f73c07..f21b0d66ec 100644 --- a/src/classes/ActionView/LookupContext/ViewPaths.html +++ b/src/classes/ActionView/LookupContext/ViewPaths.html @@ -122,22 +122,16 @@

    Attributes

    Instance Public methods

    -

    - - any?(name, prefixes = [], partial = false) - -

    +

    any?(name, prefixes = [], partial = false)

    -
    - -
    - -
    - Also aliased as: any_templates? -
    +

    + Also aliased as: + + any_templates?. +

    @@ -163,24 +157,17 @@

    -

    - - any_templates?(name, prefixes = [], partial = false) - -

    +

    any_templates?(name, prefixes = [], partial = false)

    -
    - -
    - -
    - Alias for: any? -
    +

    + Alias for: + any?. +

    @@ -188,17 +175,9 @@

    -

    - - append_view_paths(paths) - -

    +

    append_view_paths(paths)

    -
    - -
    - @@ -223,22 +202,16 @@

    -

    - - exists?(name, prefixes = [], partial = false, keys = [], **options) - -

    +

    exists?(name, prefixes = [], partial = false, keys = [], **options)

    -
    - -
    - -
    - Also aliased as: template_exists? -
    +

    + Also aliased as: + + template_exists?. +

    @@ -264,22 +237,16 @@

    -

    - - find(name, prefixes = [], partial = false, keys = [], options = {}) - -

    +

    find(name, prefixes = [], partial = false, keys = [], options = {})

    -
    - -
    - -
    - Also aliased as: find_template -
    +

    + Also aliased as: + + find_template. +

    @@ -305,17 +272,9 @@

    -

    - - find_all(name, prefixes = [], partial = false, keys = [], options = {}) - -

    +

    find_all(name, prefixes = [], partial = false, keys = [], options = {})

    -
    - -
    - @@ -342,24 +301,17 @@

    -

    - - find_template(name, prefixes = [], partial = false, keys = [], options = {}) - -

    +

    find_template(name, prefixes = [], partial = false, keys = [], options = {})

    -
    - -
    - -
    - Alias for: find -
    +

    + Alias for: + find. +

    @@ -367,17 +319,9 @@

    -

    - - prepend_view_paths(paths) - -

    +

    prepend_view_paths(paths)

    -
    - -
    - @@ -402,24 +346,17 @@

    -

    - - template_exists?(name, prefixes = [], partial = false, keys = [], **options) - -

    +

    template_exists?(name, prefixes = [], partial = false, keys = [], **options)

    -
    - -
    - -
    - Alias for: exists? -
    +

    + Alias for: + exists?. +

    @@ -430,17 +367,11 @@

    Instance Private methods

    -

    - - detail_args_for(options) - -

    +

    detail_args_for(options)

    - -
    -

    Compute details hash and key according to user options (e.g. passed from render).

    -
    - +
    +

    Compute details hash and key according to user options (e.g. passed from render).

    +
    diff --git a/src/classes/ActionView/NullResolver.html b/src/classes/ActionView/NullResolver.html index cd3a8010f7..bfafadae56 100644 --- a/src/classes/ActionView/NullResolver.html +++ b/src/classes/ActionView/NullResolver.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - find_templates(name, prefix, partial, details, locals = []) - -

    +

    find_templates(name, prefix, partial, details, locals = [])

    -
    - -
    - diff --git a/src/classes/ActionView/PartialIteration.html b/src/classes/ActionView/PartialIteration.html index 41e29bcf7a..566eaa5d3a 100644 --- a/src/classes/ActionView/PartialIteration.html +++ b/src/classes/ActionView/PartialIteration.html @@ -93,17 +93,9 @@

    Attributes

    Class Public methods

    -

    - - new(size) - -

    +

    new(size)

    -
    - -
    - @@ -133,17 +125,11 @@

    Instance Public methods

    -

    - - first?() - -

    +

    first?()

    - -
    -

    Check if this is the first iteration of the partial.

    -
    - +
    +

    Check if this is the first iteration of the partial.

    +
    @@ -168,17 +154,11 @@

    -

    - - last?() - -

    +

    last?()

    - -
    -

    Check if this is the last iteration of the partial.

    -
    - +
    +

    Check if this is the last iteration of the partial.

    +
    diff --git a/src/classes/ActionView/PartialRenderer.html b/src/classes/ActionView/PartialRenderer.html index f4bbe2392d..730fca20b7 100644 --- a/src/classes/ActionView/PartialRenderer.html +++ b/src/classes/ActionView/PartialRenderer.html @@ -300,17 +300,9 @@

    Methods

    Class Public methods

    -

    - - new(lookup_context, options) - -

    +

    new(lookup_context, options)

    -
    - -
    - @@ -342,17 +334,9 @@

    Instance Public methods

    -

    - - render(partial, context, block) - -

    +

    render(partial, context, block)

    -
    - -
    - diff --git a/src/classes/ActionView/RecordIdentifier.html b/src/classes/ActionView/RecordIdentifier.html index 9d0e7f425e..ee9f9aafcf 100644 --- a/src/classes/ActionView/RecordIdentifier.html +++ b/src/classes/ActionView/RecordIdentifier.html @@ -144,15 +144,10 @@

    Constants

    Instance Public methods

    -

    - - dom_class(record_or_class, prefix = nil) - -

    +

    dom_class(record_or_class, prefix = nil)

    - -
    -

    The DOM class convention is to use the singular form of an object or class.

    +
    +

    The DOM class convention is to use the singular form of an object or class.

    dom_class(post)   # => "post"
     dom_class(Person) # => "person"
    @@ -163,8 +158,7 @@ 

    dom_class(post, :edit)   # => "edit_post"
     dom_class(Person, :edit) # => "edit_person"
     
    -

    - +
    @@ -190,15 +184,10 @@

    -

    - - dom_id(record_or_class, prefix = nil) - -

    +

    dom_id(record_or_class, prefix = nil)

    - -
    -

    The DOM id convention is to use the singular form of an object or class with the id following an underscore. If no id is found, prefix with “new_” instead.

    +
    +

    The DOM id convention is to use the singular form of an object or class with the id following an underscore. If no id is found, prefix with “new_” instead.

    dom_id(Post.find(45)) # => "post_45"
     dom_id(Post)          # => "new_post"
    @@ -209,8 +198,7 @@ 

    dom_id(Post.find(45), :edit) # => "edit_post_45"
     dom_id(Post, :custom)        # => "custom_post"
     
    -

    - +
    @@ -242,23 +230,17 @@

    -

    - - dom_target(*objects) - -

    +

    dom_target(*objects)

    - -
    -

    The DOM target convention is to concatenate any number of parameters into a string. Records are passed through dom_id, while string and symbols are retained.

    +
    +

    The DOM target convention is to concatenate any number of parameters into a string. Records are passed through dom_id, while string and symbols are retained.

    dom_target(Post.find(45))                  # => "post_45"
     dom_target(Post.find(45), :edit)           # => "post_45_edit"
     dom_target(Post.find(45), :edit, :special) # => "post_45_edit_special"
     dom_target(Post.find(45), Comment.find(1)) # => "post_45_comment_1"
     
    -
    - +
    @@ -296,17 +278,11 @@

    Instance Private methods

    -

    - - record_key_for_dom_id(record) - -

    +

    record_key_for_dom_id(record)

    - -
    -

    Returns a string representation of the key attribute(s) that is suitable for use in an HTML DOM id. This can be overwritten to customize the default generated string representation if desired. If you need to read back a key from a dom_id in order to query for the underlying database record, you should write a helper like ‘person_record_from_dom_id’ that will extract the key either based on the default implementation (which just joins all key attributes with ‘_’) or on your own overwritten version of the method. By default, this implementation passes the key string through a method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to make sure yourself that your dom ids are valid, in case you override this method.

    -
    - +
    +

    Returns a string representation of the key attribute(s) that is suitable for use in an HTML DOM id. This can be overwritten to customize the default generated string representation if desired. If you need to read back a key from a dom_id in order to query for the underlying database record, you should write a helper like ‘person_record_from_dom_id’ that will extract the key either based on the default implementation (which just joins all key attributes with ‘_’) or on your own overwritten version of the method. By default, this implementation passes the key string through a method that replaces all characters that are invalid inside DOM ids, with valid ones. You need to make sure yourself that your dom ids are valid, in case you override this method.

    +
    diff --git a/src/classes/ActionView/Renderer.html b/src/classes/ActionView/Renderer.html index 628cceed4f..68387380d1 100644 --- a/src/classes/ActionView/Renderer.html +++ b/src/classes/ActionView/Renderer.html @@ -95,17 +95,9 @@

    Attributes

    Class Public methods

    -

    - - new(lookup_context) - -

    +

    new(lookup_context)

    -
    - -
    - @@ -134,17 +126,11 @@

    Instance Public methods

    -

    - - render(context, options) - -

    +

    render(context, options)

    - -
    -

    Main render entry point shared by Action View and Action Controller.

    -
    - +
    +

    Main render entry point shared by Action View and Action Controller.

    +
    @@ -169,19 +155,13 @@

    -

    - - render_body(context, options) - -

    +

    render_body(context, options)

    - -
    -

    Render but returns a valid Rack body. If fibers are defined, we return a streaming body that renders the template piece by piece.

    +
    +

    Render but returns a valid Rack body. If fibers are defined, we return a streaming body that renders the template piece by piece.

    Note that partials are not supported to be rendered with streaming, so in such cases, we just wrap them in an array.

    -
    - +
    diff --git a/src/classes/ActionView/Rendering.html b/src/classes/ActionView/Rendering.html index 498f40a316..fdd60117d1 100644 --- a/src/classes/ActionView/Rendering.html +++ b/src/classes/ActionView/Rendering.html @@ -96,17 +96,9 @@

    Included Modules

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -136,17 +128,9 @@

    Instance Public methods

    -

    - - render_to_body(options = {}) - -

    +

    render_to_body(options = {})

    -
    - -
    - @@ -173,15 +157,10 @@

    -

    - - view_context() - -

    +

    view_context()

    - -
    -

    An instance of a view class. The default view class is ActionView::Base.

    +
    +

    An instance of a view class. The default view class is ActionView::Base.

    The view class must have the following methods:

    • @@ -191,8 +170,7 @@

    Override this method in a module to change the default behavior.

    -
    - +
    @@ -217,17 +195,9 @@

    -

    - - view_context_class() - -

    +

    view_context_class()

    -
    - -
    - diff --git a/src/classes/ActionView/Rendering/ClassMethods.html b/src/classes/ActionView/Rendering/ClassMethods.html index ec436e9684..7a87201883 100644 --- a/src/classes/ActionView/Rendering/ClassMethods.html +++ b/src/classes/ActionView/Rendering/ClassMethods.html @@ -78,17 +78,9 @@

    Methods

    Instance Public methods

    -

    - - _helpers() - -

    +

    _helpers()

    -
    - -
    - @@ -112,17 +104,9 @@

    -

    - - _routes() - -

    +

    _routes()

    -
    - -
    - @@ -146,17 +130,9 @@

    -

    - - build_view_context_class(klass, supports_path, routes, helpers) - -

    +

    build_view_context_class(klass, supports_path, routes, helpers)

    -
    - -
    - @@ -194,17 +170,9 @@

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - @@ -231,17 +199,9 @@

    -

    - - inherit_view_context_class?() - -

    +

    inherit_view_context_class?()

    -
    - -
    - @@ -269,17 +229,9 @@

    -

    - - view_context_class() - -

    +

    view_context_class()

    -
    - -
    - diff --git a/src/classes/ActionView/Resolver.html b/src/classes/ActionView/Resolver.html index 251099326f..37e7949d98 100644 --- a/src/classes/ActionView/Resolver.html +++ b/src/classes/ActionView/Resolver.html @@ -74,17 +74,9 @@

    Methods

    Instance Public methods

    -

    - - clear_cache() - -

    +

    clear_cache()

    -
    - -
    - @@ -108,17 +100,11 @@

    -

    - - find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = []) - -

    +

    find_all(name, prefix = nil, partial = false, details = {}, key = nil, locals = [])

    - -
    -

    Normalizes the arguments and passes it on to find_templates.

    -
    - +
    +

    Normalizes the arguments and passes it on to find_templates.

    +
    diff --git a/src/classes/ActionView/RoutingUrlFor.html b/src/classes/ActionView/RoutingUrlFor.html index 32a9c4910f..e6f3b40576 100644 --- a/src/classes/ActionView/RoutingUrlFor.html +++ b/src/classes/ActionView/RoutingUrlFor.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - url_for(options = nil) - -

    +

    url_for(options = nil)

    - -
    -

    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

    • @@ -143,8 +138,7 @@

      Examples

      # Specify absolute path with beginning slash # => /users -
    - +
    diff --git a/src/classes/ActionView/Template.html b/src/classes/ActionView/Template.html index facaf1db7d..986ead1206 100644 --- a/src/classes/ActionView/Template.html +++ b/src/classes/ActionView/Template.html @@ -256,17 +256,9 @@

    Attributes

    Class Public methods

    -

    - - mime_types_implementation=(implementation) - -

    +

    mime_types_implementation=(implementation)

    -
    - -
    - @@ -296,17 +288,9 @@

    -

    - - new(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil) - -

    +

    new(source, identifier, handler, locals:, format: nil, variant: nil, virtual_path: nil)

    -
    - -
    - @@ -353,19 +337,13 @@

    Instance Public methods

    -

    - - encode!() - -

    +

    encode!()

    - -
    -

    This method is responsible for properly setting the encoding of the source. Until this point, we assume that the source is BINARY data. If no additional information is supplied, we assume the encoding is the same as Encoding.default_external.

    +
    +

    This method is responsible for properly setting the encoding of the source. Until this point, we assume that the source is BINARY data. If no additional information is supplied, we assume the encoding is the same as Encoding.default_external.

    The user can also specify the encoding via a comment on the first line of the template (# encoding: NAME-OF-ENCODING). This will work with any template engine, as we process out the encoding comment before passing the source on to the template engine, leaving a blank line in its stead.

    -
    - +
    @@ -422,17 +400,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -457,15 +427,10 @@

    -

    - - local_assigns - -

    +

    local_assigns

    - -
    -

    Returns a hash with the defined local variables.

    +
    +

    Returns a hash with the defined local variables.

    Given this sub template rendering:

    @@ -534,8 +499,7 @@

    Read more about strict locals in Action View Overview in the guides.

    -

    - +
    @@ -569,17 +533,11 @@

    -

    - - locals() - -

    +

    locals()

    - -
    -

    The locals this template has been or will be compiled for, or nil if this is a strict locals template.

    -
    - +
    +

    The locals this template has been or will be compiled for, or nil if this is a strict locals template.

    +
    @@ -608,19 +566,13 @@

    -

    - - render(view, locals, buffer = nil, implicit_locals: [], add_to_stack: true, &block) - -

    +

    render(view, locals, buffer = nil, implicit_locals: [], add_to_stack: true, &block)

    - -
    -

    Render a template. If the template was not compiled yet, it is done exactly before rendering.

    +
    +

    Render a template. If the template was not compiled yet, it is done exactly before rendering.

    This method is instrumented as “!render_template.action_view”. Notice that we use a bang in this instrumentation because you don’t want to consume this in production. This is only slow if it’s being listened to.

    -
    - +
    @@ -662,17 +614,9 @@

    -

    - - short_identifier() - -

    +

    short_identifier()

    -
    - -
    - @@ -697,17 +641,9 @@

    -

    - - source() - -

    +

    source()

    -
    - -
    - @@ -732,22 +668,16 @@

    -

    - - strict_locals!() - -

    +

    strict_locals!()

    - -
    -

    This method is responsible for marking a template as having strict locals which means the template can only accept the locals defined in a magic comment. For example, if your template accepts the locals title and comment_count, add the following to your template file:

    +
    +

    This method is responsible for marking a template as having strict locals which means the template can only accept the locals defined in a magic comment. For example, if your template accepts the locals title and comment_count, add the following to your template file:

    <%# locals: (title: "Default title", comment_count: 0) %>
     

    Strict locals are useful for validating template arguments and for specifying defaults.

    -
    - +
    @@ -781,17 +711,11 @@

    -

    - - strict_locals?() - -

    +

    strict_locals?()

    - -
    -

    Returns whether a template is using strict locals.

    -
    - +
    +

    Returns whether a template is using strict locals.

    +
    @@ -816,17 +740,11 @@

    -

    - - supports_streaming?() - -

    +

    supports_streaming?()

    - -
    -

    Returns whether the underlying handler supports streaming. If so, a streaming buffer may be passed when it starts rendering.

    -
    - +
    +

    Returns whether the underlying handler supports streaming. If so, a streaming buffer may be passed when it starts rendering.

    +
    @@ -851,17 +769,11 @@

    -

    - - translate_location(backtrace_location, spot) - -

    +

    translate_location(backtrace_location, spot)

    - -
    -

    Translate an error location returned by ErrorHighlight to the correct source location inside the template.

    -
    - +
    +

    Translate an error location returned by ErrorHighlight to the correct source location inside the template.

    +
    @@ -890,17 +802,9 @@

    -

    - - type() - -

    +

    type()

    -
    - -
    - @@ -928,17 +832,9 @@

    Instance Private methods

    -

    - - instrument(action, &block) - -

    +

    instrument(action, &block)

    -
    - -
    - diff --git a/src/classes/ActionView/Template/Handlers/Builder.html b/src/classes/ActionView/Template/Handlers/Builder.html index 32b4391d05..99af944f1a 100644 --- a/src/classes/ActionView/Template/Handlers/Builder.html +++ b/src/classes/ActionView/Template/Handlers/Builder.html @@ -68,17 +68,9 @@

    Methods

    Instance Public methods

    -

    - - call(template, source) - -

    +

    call(template, source)

    -
    - -
    - @@ -110,17 +102,9 @@

    Instance Private methods

    -

    - - require_engine() - -

    +

    require_engine()

    -
    - -
    - diff --git a/src/classes/ActionView/Template/Handlers/ERB.html b/src/classes/ActionView/Template/Handlers/ERB.html index ea01060bcf..b1df4cc43f 100644 --- a/src/classes/ActionView/Template/Handlers/ERB.html +++ b/src/classes/ActionView/Template/Handlers/ERB.html @@ -94,17 +94,9 @@

    Constants

    Class Public methods

    -

    - - call(template, source) - -

    +

    call(template, source)

    -
    - -
    - @@ -133,17 +125,9 @@

    Instance Public methods

    -

    - - call(template, source) - -

    +

    call(template, source)

    -
    - -
    - @@ -195,17 +179,9 @@

    -

    - - handles_encoding?() - -

    +

    handles_encoding?()

    -
    - -
    - @@ -230,17 +206,9 @@

    -

    - - supports_streaming?() - -

    +

    supports_streaming?()

    -
    - -
    - @@ -265,17 +233,11 @@

    -

    - - translate_location(spot, _backtrace_location, source) - -

    +

    translate_location(spot, _backtrace_location, source)

    - -
    -

    Translate an error location returned by ErrorHighlight to the correct source location inside the template.

    -
    - +
    +

    Translate an error location returned by ErrorHighlight to the correct source location inside the template.

    +
    diff --git a/src/classes/ActionView/Template/Handlers/Html.html b/src/classes/ActionView/Template/Handlers/Html.html index 7d046f591a..f0a81d3e8a 100644 --- a/src/classes/ActionView/Template/Handlers/Html.html +++ b/src/classes/ActionView/Template/Handlers/Html.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - call(template, source) - -

    +

    call(template, source)

    -
    - -
    - diff --git a/src/classes/ActionView/Template/Handlers/Raw.html b/src/classes/ActionView/Template/Handlers/Raw.html index 7ef800f844..ce05917deb 100644 --- a/src/classes/ActionView/Template/Handlers/Raw.html +++ b/src/classes/ActionView/Template/Handlers/Raw.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - call(template, source) - -

    +

    call(template, source)

    -
    - -
    - diff --git a/src/classes/ActionView/Template/Sources/File.html b/src/classes/ActionView/Template/Sources/File.html index a29dc10599..8e3d9cf7b8 100644 --- a/src/classes/ActionView/Template/Sources/File.html +++ b/src/classes/ActionView/Template/Sources/File.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(filename) - -

    +

    new(filename)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActionView/TemplateDetails/Requested.html b/src/classes/ActionView/TemplateDetails/Requested.html index 69a7f1f3d9..1ed4799d23 100644 --- a/src/classes/ActionView/TemplateDetails/Requested.html +++ b/src/classes/ActionView/TemplateDetails/Requested.html @@ -146,17 +146,9 @@

    Attributes

    Class Public methods

    -

    - - new(locale:, handlers:, formats:, variants:) - -

    +

    new(locale:, handlers:, formats:, variants:)

    -
    - -
    - diff --git a/src/classes/ActionView/TemplatePath.html b/src/classes/ActionView/TemplatePath.html index 7f8aed2ec1..17849215b7 100644 --- a/src/classes/ActionView/TemplatePath.html +++ b/src/classes/ActionView/TemplatePath.html @@ -155,17 +155,11 @@

    Attributes

    Class Public methods

    -

    - - build(name, prefix, partial) - -

    +

    build(name, prefix, partial)

    - -
    -

    Convert name, prefix, and partial into a TemplatePath

    -
    - +
    +

    Convert name, prefix, and partial into a TemplatePath

    +
    @@ -190,17 +184,9 @@

    -

    - - new(name, prefix, partial, virtual) - -

    +

    new(name, prefix, partial, virtual)

    -
    - -
    - @@ -228,17 +214,11 @@

    -

    - - parse(virtual) - -

    +

    parse(virtual)

    - -
    -

    Build a TemplatePath form a virtual path

    -
    - +
    +

    Build a TemplatePath form a virtual path

    +
    @@ -273,17 +253,11 @@

    -

    - - virtual(name, prefix, partial) - -

    +

    virtual(name, prefix, partial)

    - -
    -

    Convert name, prefix, and partial into a virtual path string

    -
    - +
    +

    Convert name, prefix, and partial into a virtual path string

    +
    diff --git a/src/classes/ActionView/TestCase/Behavior.html b/src/classes/ActionView/TestCase/Behavior.html index fad1c3b976..fe3b94478c 100644 --- a/src/classes/ActionView/TestCase/Behavior.html +++ b/src/classes/ActionView/TestCase/Behavior.html @@ -299,17 +299,9 @@

    Attributes

    Instance Public methods

    -

    - - _routes() - -

    +

    _routes()

    -
    - -
    - @@ -334,17 +326,9 @@

    -

    - - _test_case() - -

    +

    _test_case()

    -
    - -
    - @@ -369,17 +353,9 @@

    -

    - - config() - -

    +

    config()

    -
    - -
    - @@ -404,17 +380,9 @@

    -

    - - protect_against_forgery?() - -

    +

    protect_against_forgery?()

    -
    - -
    - @@ -439,17 +407,9 @@

    -

    - - render(options = {}, local_assigns = {}, &block) - -

    +

    render(options = {}, local_assigns = {}, &block)

    -
    - -
    - @@ -476,17 +436,9 @@

    -

    - - rendered_views() - -

    +

    rendered_views()

    -
    - -
    - @@ -511,17 +463,9 @@

    -

    - - setup_with_controller() - -

    +

    setup_with_controller()

    -
    - -
    - diff --git a/src/classes/ActionView/TestCase/Behavior/ClassMethods.html b/src/classes/ActionView/TestCase/Behavior/ClassMethods.html index 6de2bdd8ac..481546f8e1 100644 --- a/src/classes/ActionView/TestCase/Behavior/ClassMethods.html +++ b/src/classes/ActionView/TestCase/Behavior/ClassMethods.html @@ -92,17 +92,9 @@

    Attributes

    Instance Public methods

    -

    - - determine_default_helper_class(name) - -

    +

    determine_default_helper_class(name)

    -
    - -
    - @@ -129,17 +121,9 @@

    -

    - - helper_class() - -

    +

    helper_class()

    -
    - -
    - @@ -164,17 +148,9 @@

    -

    - - helper_method(*methods) - -

    +

    helper_method(*methods)

    -
    - -
    - @@ -206,17 +182,9 @@

    -

    - - new(*) - -

    +

    new(*)

    -
    - -
    - @@ -242,15 +210,10 @@

    -

    - - register_parser(format, callable = nil, &block) - -

    +

    register_parser(format, callable = nil, &block)

    - -
    -

    Register a callable to parse rendered content for a given template format.

    +
    +

    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.

    @@ -321,8 +284,7 @@

    Examples

    rendered.html.assert_css "h1", text: "Hello, world" end -
    - +
    @@ -350,17 +312,9 @@

    Examples

    -

    - - tests(helper_class) - -

    +

    tests(helper_class)

    -
    - -
    - diff --git a/src/classes/ActionView/TestCase/Behavior/Locals.html b/src/classes/ActionView/TestCase/Behavior/Locals.html index 722e0c4567..6f6cfbde4b 100644 --- a/src/classes/ActionView/TestCase/Behavior/Locals.html +++ b/src/classes/ActionView/TestCase/Behavior/Locals.html @@ -72,17 +72,9 @@

    Attributes

    Instance Public methods

    -

    - - render(options = {}, local_assigns = {}) - -

    +

    render(options = {}, local_assigns = {})

    -
    - -
    - diff --git a/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html b/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html index 5040a40f7b..50218ea93b 100644 --- a/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html +++ b/src/classes/ActionView/TestCase/Behavior/RenderedViewsCollection.html @@ -79,17 +79,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -118,17 +110,9 @@

    Instance Public methods

    -

    - - add(view, locals) - -

    +

    add(view, locals)

    -
    - -
    - @@ -154,17 +138,9 @@

    -

    - - locals_for(view) - -

    +

    locals_for(view)

    -
    - -
    - @@ -189,17 +165,9 @@

    -

    - - rendered_views() - -

    +

    rendered_views()

    -
    - -
    - @@ -224,17 +192,9 @@

    -

    - - view_rendered?(view, expected_locals) - -

    +

    view_rendered?(view, expected_locals)

    -
    - -
    - diff --git a/src/classes/ActionView/TestCase/TestController.html b/src/classes/ActionView/TestCase/TestController.html index 061cc8a6f9..aa0997a476 100644 --- a/src/classes/ActionView/TestCase/TestController.html +++ b/src/classes/ActionView/TestCase/TestController.html @@ -123,17 +123,9 @@

    Attributes

    Class Public methods

    -

    - - controller_name() - -

    +

    controller_name()

    -
    - -
    - @@ -158,17 +150,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -203,17 +187,9 @@

    Instance Public methods

    -

    - - controller_path=(path) - -

    +

    controller_path=(path)

    -
    - -
    - diff --git a/src/classes/ActionView/UnboundTemplate.html b/src/classes/ActionView/UnboundTemplate.html index b1fd54460b..8dae8b6bea 100644 --- a/src/classes/ActionView/UnboundTemplate.html +++ b/src/classes/ActionView/UnboundTemplate.html @@ -89,17 +89,9 @@

    Attributes

    Class Public methods

    -

    - - new(source, identifier, details:, virtual_path:) - -

    +

    new(source, identifier, details:, virtual_path:)

    -
    - -
    - @@ -134,17 +126,9 @@

    Instance Public methods

    -

    - - bind_locals(locals) - -

    +

    bind_locals(locals)

    -
    - -
    - diff --git a/src/classes/ActionView/ViewPaths.html b/src/classes/ActionView/ViewPaths.html index abb922fe63..dd3ea6255d 100644 --- a/src/classes/ActionView/ViewPaths.html +++ b/src/classes/ActionView/ViewPaths.html @@ -83,22 +83,16 @@

    Methods

    Instance Public methods

    -

    - - append_view_path(path) - -

    +

    append_view_path(path)

    - -
    -

    Append a path to the list of view paths for the current LookupContext.

    +
    +

    Append a path to the list of view paths for the current LookupContext.

    Parameters

    • path - If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::PathSet for more information)

    -
    - +
    @@ -123,17 +117,9 @@

    Parameters

    -

    - - details_for_lookup() - -

    +

    details_for_lookup()

    -
    - -
    - @@ -158,17 +144,11 @@

    -

    - - lookup_context() - -

    +

    lookup_context()

    - -
    -

    LookupContext is the object responsible for holding all information required for looking up templates, i.e. view paths and details. Check ActionView::LookupContext for more information.

    -
    - +
    +

    LookupContext is the object responsible for holding all information required for looking up templates, i.e. view paths and details. Check ActionView::LookupContext for more information.

    +
    @@ -194,22 +174,16 @@

    -

    - - prepend_view_path(path) - -

    +

    prepend_view_path(path)

    - -
    -

    Prepend a path to the list of view paths for the current LookupContext.

    +
    +

    Prepend a path to the list of view paths for the current LookupContext.

    Parameters

    • path - If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::PathSet for more information)

    -
    - +
    diff --git a/src/classes/ActionView/ViewPaths/ClassMethods.html b/src/classes/ActionView/ViewPaths/ClassMethods.html index a60779c153..014dc45868 100644 --- a/src/classes/ActionView/ViewPaths/ClassMethods.html +++ b/src/classes/ActionView/ViewPaths/ClassMethods.html @@ -78,17 +78,9 @@

    Methods

    Instance Public methods

    -

    - - _view_paths() - -

    +

    _view_paths()

    -
    - -
    - @@ -113,17 +105,9 @@

    -

    - - _view_paths=(paths) - -

    +

    _view_paths=(paths)

    -
    - -
    - @@ -148,22 +132,16 @@

    -

    - - append_view_path(path) - -

    +

    append_view_path(path)

    - -
    -

    Append a path to the list of view paths for this controller.

    +
    +

    Append a path to the list of view paths for this controller.

    Parameters

    • path - If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::PathSet for more information)

    -
    - +
    @@ -188,22 +166,16 @@

    Parameters

    -

    - - prepend_view_path(path) - -

    +

    prepend_view_path(path)

    - -
    -

    Prepend a path to the list of view paths for this controller.

    +
    +

    Prepend a path to the list of view paths for this controller.

    Parameters

    • path - If a String is provided, it gets converted into the default view path. You may also provide a custom view path (see ActionView::PathSet for more information)

    -
    - +
    @@ -228,17 +200,11 @@

    Parameters

    -

    - - view_paths() - -

    +

    view_paths()

    - -
    -

    A list of all of the default view paths for this controller.

    -
    - +
    +

    A list of all of the default view paths for this controller.

    +
    @@ -263,22 +229,16 @@

    -

    - - view_paths=(paths) - -

    +

    view_paths=(paths)

    - -
    -

    Set the view paths.

    +
    +

    Set the view paths.

    Parameters

    • paths - If a PathSet is provided, use that; otherwise, process the parameter into a PathSet.

    -
    - +
    diff --git a/src/classes/ActiveJob.html b/src/classes/ActiveJob.html index 694eecc8b2..1ea262d678 100644 --- a/src/classes/ActiveJob.html +++ b/src/classes/ActiveJob.html @@ -350,17 +350,11 @@

    Methods

    Class Public methods

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Active Job as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Job as a Gem::Version.

    +
    @@ -385,17 +379,11 @@

    -

    - - perform_all_later(*jobs) - -

    +

    perform_all_later(*jobs)

    - -
    -

    Push many jobs onto the queue at once without running enqueue callbacks. Queue adapters may communicate the enqueue status of each job by setting successfully_enqueued and/or enqueue_error on the passed-in job instances.

    -
    - +
    +

    Push many jobs onto the queue at once without running enqueue callbacks. Queue adapters may communicate the enqueue status of each job by setting successfully_enqueued and/or enqueue_error on the passed-in job instances.

    +
    @@ -441,17 +429,11 @@

    -

    - - verbose_enqueue_logs - -

    +

    verbose_enqueue_logs

    - -
    -

    Specifies if the methods calling background job enqueue should be logged below their relevant enqueue log lines. Defaults to false.

    -
    - +
    +

    Specifies if the methods calling background job enqueue should be logged below their relevant enqueue log lines. Defaults to false.

    +
    @@ -475,17 +457,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Active Job as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Job as a Gem::Version.

    +
    diff --git a/src/classes/ActiveJob/Arguments.html b/src/classes/ActiveJob/Arguments.html index d65673b820..9d93a582b5 100644 --- a/src/classes/ActiveJob/Arguments.html +++ b/src/classes/ActiveJob/Arguments.html @@ -66,17 +66,11 @@

    Methods

    Instance Public methods

    -

    - - deserialize(arguments) - -

    +

    deserialize(arguments)

    - -
    -

    Deserializes a set of arguments. Intrinsic types that can safely be deserialized without mutation are returned as-is. Arrays/Hashes are deserialized element by element. All other types are deserialized using GlobalID.

    -
    - +
    +

    Deserializes a set of arguments. Intrinsic types that can safely be deserialized without mutation are returned as-is. Arrays/Hashes are deserialized element by element. All other types are deserialized using GlobalID.

    +
    @@ -103,17 +97,11 @@

    -

    - - serialize(arguments) - -

    +

    serialize(arguments)

    - -
    -

    Serializes a set of arguments. Intrinsic types that can safely be serialized without mutation are returned as-is. Arrays/Hashes are serialized element by element. All other types are serialized using GlobalID.

    -
    - +
    +

    Serializes a set of arguments. Intrinsic types that can safely be serialized without mutation are returned as-is. Arrays/Hashes are serialized element by element. All other types are serialized using GlobalID.

    +
    diff --git a/src/classes/ActiveJob/Callbacks/ClassMethods.html b/src/classes/ActiveJob/Callbacks/ClassMethods.html index 108070ca26..4583b7836f 100644 --- a/src/classes/ActiveJob/Callbacks/ClassMethods.html +++ b/src/classes/ActiveJob/Callbacks/ClassMethods.html @@ -84,15 +84,10 @@

    Methods

    Instance Public methods

    -

    - - after_enqueue(*filters, &blk) - -

    +

    after_enqueue(*filters, &blk)

    - -
    -

    Defines a callback that will get called right after the job is enqueued.

    +
    +

    Defines a callback that will get called right after the job is enqueued.

    class VideoProcessJob < ActiveJob::Base
       queue_as :default
    @@ -107,8 +102,7 @@ 

    end end

    -
    - +
    @@ -133,15 +127,10 @@

    -

    - - after_perform(*filters, &blk) - -

    +

    after_perform(*filters, &blk)

    - -
    -

    Defines a callback that will get called right after the job’s perform method has finished.

    +
    +

    Defines a callback that will get called right after the job’s perform method has finished.

    class VideoProcessJob < ActiveJob::Base
       queue_as :default
    @@ -155,8 +144,7 @@ 

    end end

    -
    - +
    @@ -181,15 +169,10 @@

    -

    - - around_enqueue(*filters, &blk) - -

    +

    around_enqueue(*filters, &blk)

    - -
    -

    Defines a callback that will get called around the enqueuing of the job.

    +
    +

    Defines a callback that will get called around the enqueuing of the job.

    class VideoProcessJob < ActiveJob::Base
       queue_as :default
    @@ -205,8 +188,7 @@ 

    end end

    -
    - +
    @@ -231,15 +213,10 @@

    -

    - - around_perform(*filters, &blk) - -

    +

    around_perform(*filters, &blk)

    - -
    -

    Defines a callback that will get called around the job’s perform method.

    +
    +

    Defines a callback that will get called around the job’s perform method.

    class VideoProcessJob < ActiveJob::Base
       queue_as :default
    @@ -269,8 +246,7 @@ 

    end end

    -
    - +
    @@ -295,15 +271,10 @@

    -

    - - before_enqueue(*filters, &blk) - -

    +

    before_enqueue(*filters, &blk)

    - -
    -

    Defines a callback that will get called right before the job is enqueued.

    +
    +

    Defines a callback that will get called right before the job is enqueued.

    class VideoProcessJob < ActiveJob::Base
       queue_as :default
    @@ -317,8 +288,7 @@ 

    end end

    -
    - +
    @@ -343,15 +313,10 @@

    -

    - - before_perform(*filters, &blk) - -

    +

    before_perform(*filters, &blk)

    - -
    -

    Defines a callback that will get called right before the job’s perform method is executed.

    +
    +

    Defines a callback that will get called right before the job’s perform method is executed.

    class VideoProcessJob < ActiveJob::Base
       queue_as :default
    @@ -365,8 +330,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActiveJob/Continuable.html b/src/classes/ActiveJob/Continuable.html index 01cf05fed9..2319bda2de 100644 --- a/src/classes/ActiveJob/Continuable.html +++ b/src/classes/ActiveJob/Continuable.html @@ -87,17 +87,9 @@

    Attributes

    Class Public methods

    -

    - - new(...) - -

    +

    new(...)

    -
    - -
    - @@ -128,17 +120,11 @@

    Instance Public methods

    -

    - - step(step_name, start: nil, isolated: false, &block) - -

    +

    step(step_name, start: nil, isolated: false, &block)

    - -
    -

    Start a new continuation step

    -
    - +
    +

    Start a new continuation step

    +
    diff --git a/src/classes/ActiveJob/Continuation.html b/src/classes/ActiveJob/Continuation.html index afdccdf5ca..f0b428a4aa 100644 --- a/src/classes/ActiveJob/Continuation.html +++ b/src/classes/ActiveJob/Continuation.html @@ -284,17 +284,9 @@

    Methods

    Instance Public methods

    -

    - - advanced?() - -

    +

    advanced?()

    -
    - -
    - @@ -319,17 +311,9 @@

    -

    - - instrumentation() - -

    +

    instrumentation()

    -
    - -
    - @@ -356,17 +340,9 @@

    -

    - - started?() - -

    +

    started?()

    -
    - -
    - diff --git a/src/classes/ActiveJob/Continuation/Step.html b/src/classes/ActiveJob/Continuation/Step.html index b99c3f92e7..59eb283a13 100644 --- a/src/classes/ActiveJob/Continuation/Step.html +++ b/src/classes/ActiveJob/Continuation/Step.html @@ -127,17 +127,9 @@

    Attributes

    Class Public methods

    -

    - - new(name, cursor, job:, resumed:) - -

    +

    new(name, cursor, job:, resumed:)

    -
    - -
    - @@ -170,19 +162,13 @@

    Instance Public methods

    -

    - - advance!(from: nil) - -

    +

    advance!(from: nil)

    - -
    -

    Advance the cursor from the current or supplied value

    +
    +

    Advance the cursor from the current or supplied value

    The cursor will be advanced by calling the succ method on the cursor. An UnadvanceableCursorError error will be raised if the cursor does not implement succ.

    -
    - +
    @@ -215,17 +201,11 @@

    -

    - - advanced?() - -

    +

    advanced?()

    - -
    -

    Has the cursor been advanced during this job execution?

    -
    - +
    +

    Has the cursor been advanced during this job execution?

    +
    @@ -250,17 +230,11 @@

    -

    - - checkpoint!() - -

    +

    checkpoint!()

    - -
    -

    Check if the job should be interrupted, and if so raise an Interrupt exception. The job will be requeued for retry.

    -
    - +
    +

    Check if the job should be interrupted, and if so raise an Interrupt exception. The job will be requeued for retry.

    +
    @@ -285,17 +259,9 @@

    -

    - - description() - -

    +

    description()

    -
    - -
    - @@ -320,17 +286,11 @@

    -

    - - resumed?() - -

    +

    resumed?()

    - -
    -

    Has this step been resumed from a previous job execution?

    -
    - +
    +

    Has this step been resumed from a previous job execution?

    +
    @@ -355,17 +315,11 @@

    -

    - - set!(cursor) - -

    +

    set!(cursor)

    - -
    -

    Set the cursor and interrupt the job if necessary.

    -
    - +
    +

    Set the cursor and interrupt the job if necessary.

    +
    @@ -391,17 +345,9 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - diff --git a/src/classes/ActiveJob/Continuation/TestHelper.html b/src/classes/ActiveJob/Continuation/TestHelper.html index 79b8c1bd68..45db065ad0 100644 --- a/src/classes/ActiveJob/Continuation/TestHelper.html +++ b/src/classes/ActiveJob/Continuation/TestHelper.html @@ -82,15 +82,10 @@

    Included Modules

    Instance Public methods

    -

    - - interrupt_job_after_step(job, step, &block) - -

    +

    interrupt_job_after_step(job, step, &block)

    - -
    -

    Interrupt a job after a step.

    +
    +

    Interrupt a job after a step.

    Note that there’s no checkpoint after the final step so it won’t be interrupted.

    @@ -115,8 +110,7 @@

    assert_equal [1, 2, 3, 4], MyJob.items end -

    - +
    @@ -142,15 +136,10 @@

    -

    - - interrupt_job_during_step(job, step, cursor: nil, &block) - -

    +

    interrupt_job_during_step(job, step, cursor: nil, &block)

    - -
    -

    Interrupt a job during a step.

    +
    +

    Interrupt a job during a step.

    class MyJob < ApplicationJob
       include ActiveJob::Continuable
    @@ -174,8 +163,7 @@ 

    assert_equal [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], MyJob.items end

    -
    - +
    diff --git a/src/classes/ActiveJob/Core.html b/src/classes/ActiveJob/Core.html index 76843c402e..8534aec1ad 100644 --- a/src/classes/ActiveJob/Core.html +++ b/src/classes/ActiveJob/Core.html @@ -200,17 +200,11 @@

    Attributes

    Class Public methods

    -

    - - new(*arguments) - -

    +

    new(*arguments)

    - -
    -

    Creates a new job instance. Takes the arguments that will be passed to the perform method.

    -
    - +
    +

    Creates a new job instance. Takes the arguments that will be passed to the perform method.

    +
    @@ -246,15 +240,10 @@

    Instance Public methods

    -

    - - deserialize(job_data) - -

    +

    deserialize(job_data)

    - -
    -

    Attaches the stored job data to the current instance. Receives a hash returned from serialize

    +
    +

    Attaches the stored job data to the current instance. Receives a hash returned from serialize

    Examples

    @@ -280,8 +269,7 @@

    Examples

    end end -
    - +
    @@ -316,17 +304,11 @@

    Examples

    -

    - - serialize() - -

    +

    serialize()

    - -
    -

    Returns a hash with the job data that can safely be passed to the queuing adapter.

    -
    - +
    +

    Returns a hash with the job data that can safely be passed to the queuing adapter.

    +
    @@ -364,17 +346,9 @@

    -

    - - successfully_enqueued?() - -

    +

    successfully_enqueued?()

    -
    - -
    - diff --git a/src/classes/ActiveJob/Core/ClassMethods.html b/src/classes/ActiveJob/Core/ClassMethods.html index 86c981932d..e8c57b0ae5 100644 --- a/src/classes/ActiveJob/Core/ClassMethods.html +++ b/src/classes/ActiveJob/Core/ClassMethods.html @@ -68,17 +68,11 @@

    Methods

    Instance Public methods

    -

    - - deserialize(job_data) - -

    +

    deserialize(job_data)

    - -
    -

    Creates a new job instance from a hash created with serialize

    -
    - +
    +

    Creates a new job instance from a hash created with serialize

    +
    @@ -108,15 +102,10 @@

    -

    - - set(options = {}) - -

    +

    set(options = {})

    - -
    -

    Creates a job preconfigured with the given options. You can call perform_later with the job arguments to enqueue the job with the preconfigured options

    +
    +

    Creates a job preconfigured with the given options. You can call perform_later with the job arguments to enqueue the job with the preconfigured options

    Options

    • @@ -138,8 +127,7 @@

      Examples

      VideoJob.set(queue: :some_queue, wait_until: Time.now.tomorrow).perform_later(Video.last) VideoJob.set(queue: :some_queue, wait: 5.minutes, priority: 10).perform_later(Video.last) -
    - +
    diff --git a/src/classes/ActiveJob/Enqueuing.html b/src/classes/ActiveJob/Enqueuing.html index 3d2db0ac61..374d67b9a2 100644 --- a/src/classes/ActiveJob/Enqueuing.html +++ b/src/classes/ActiveJob/Enqueuing.html @@ -74,23 +74,17 @@

    Methods

    Class Public methods

    -

    - - enqueue_after_transaction_commit - -

    +

    enqueue_after_transaction_commit

    - -
    -

    Defines if enqueueing this job from inside an Active Record transaction automatically defers the enqueue to after the transaction commits.

    +
    +

    Defines if enqueueing this job from inside an Active Record transaction automatically defers the enqueue to after the transaction commits.

    It can be set on a per job basis:

    - true forces the job to be deferred.
     - false forces the job to be queued immediately.
     
    -
    - +
    @@ -118,15 +112,10 @@

    Instance Public methods

    -

    - - enqueue(options = {}) - -

    +

    enqueue(options = {})

    - -
    -

    Enqueues the job to be performed by the queue adapter.

    +
    +

    Enqueues the job to be performed by the queue adapter.

    Options

    • @@ -147,8 +136,7 @@

      Examples

      my_job_instance.enqueue wait_until: Date.tomorrow.midnight my_job_instance.enqueue priority: 10 -
    - +
    diff --git a/src/classes/ActiveJob/Enqueuing/ClassMethods.html b/src/classes/ActiveJob/Enqueuing/ClassMethods.html index 068bfd381d..f5a819e14c 100644 --- a/src/classes/ActiveJob/Enqueuing/ClassMethods.html +++ b/src/classes/ActiveJob/Enqueuing/ClassMethods.html @@ -68,15 +68,10 @@

    Methods

    Instance Public methods

    -

    - - perform_later(...) - -

    +

    perform_later(...)

    - -
    -

    Push a job onto the queue. By default the arguments must be either String, Integer, Float, NilClass, TrueClass, FalseClass, BigDecimal, Symbol, Date, Time, DateTime, ActiveSupport::TimeWithZone, ActiveSupport::Duration, Hash, ActiveSupport::HashWithIndifferentAccess, Array, Range, or GlobalID::Identification instances, although this can be extended by adding custom serializers.

    +
    +

    Push a job onto the queue. By default the arguments must be either String, Integer, Float, NilClass, TrueClass, FalseClass, BigDecimal, Symbol, Date, Time, DateTime, ActiveSupport::TimeWithZone, ActiveSupport::Duration, Hash, ActiveSupport::HashWithIndifferentAccess, Array, Range, or GlobalID::Identification instances, although this can be extended by adding custom serializers.

    Returns an instance of the job class queued with arguments available in Job#arguments or false if the enqueue did not succeed.

    @@ -90,8 +85,7 @@

    self.enqueue_after_transaction_commit = false end -

    - +
    @@ -124,17 +118,9 @@

    Instance Private methods

    -

    - - job_or_instantiate(*args, &) - -

    +

    job_or_instantiate(*args, &)

    -
    - -
    - diff --git a/src/classes/ActiveJob/Exceptions.html b/src/classes/ActiveJob/Exceptions.html index 7f059efd3e..15706a456a 100644 --- a/src/classes/ActiveJob/Exceptions.html +++ b/src/classes/ActiveJob/Exceptions.html @@ -77,15 +77,10 @@

    Methods

    Instance Public methods

    -

    - - retry_job(options = {}) - -

    +

    retry_job(options = {})

    - -
    -

    Reschedules the job to be re-executed. This is useful in combination with rescue_from. When you rescue an exception from your job you can ask Active Job to retry performing your job.

    +
    +

    Reschedules the job to be re-executed. This is useful in combination with rescue_from. When you rescue an exception from your job you can ask Active Job to retry performing your job.

    Options

    • @@ -110,8 +105,7 @@

      Examples

      end end
      -
    - +
    diff --git a/src/classes/ActiveJob/Exceptions/ClassMethods.html b/src/classes/ActiveJob/Exceptions/ClassMethods.html index a37d88e5d2..15f9980836 100644 --- a/src/classes/ActiveJob/Exceptions/ClassMethods.html +++ b/src/classes/ActiveJob/Exceptions/ClassMethods.html @@ -66,15 +66,10 @@

    Methods

    Instance Public methods

    -

    - - after_discard(&blk) - -

    +

    after_discard(&blk)

    - -
    -

    A block to run when a job is about to be discarded for any reason.

    +
    +

    A block to run when a job is about to be discarded for any reason.

    Example

    @@ -87,8 +82,7 @@

    Example

    end -
    - +
    @@ -113,15 +107,10 @@

    Example

    -

    - - discard_on(*exceptions, report: false) - -

    +

    discard_on(*exceptions, report: false)

    - -
    -

    Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job, like an Active Record, is no longer available, and the job is thus no longer relevant.

    +
    +

    Discard the job with no attempts to retry, if the exception is raised. This is useful when the subject of the job, like an Active Record, is no longer available, and the job is thus no longer relevant.

    Passing the :report option reports the error through the error reporter before discarding the job.

    @@ -144,8 +133,7 @@

    Example

    end end -
    - +
    @@ -176,15 +164,10 @@

    Example

    -

    - - retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT, report: false) - -

    +

    retry_on(*exceptions, wait: 3.seconds, attempts: 5, queue: nil, priority: nil, jitter: JITTER_DEFAULT, report: false)

    - -
    -

    Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts. If the exception keeps getting raised beyond the specified number of attempts, the exception is allowed to bubble up to the underlying queuing system, which may have its own retry mechanism or place it in a holding queue for inspection.

    +
    +

    Catch the exception and reschedule job for re-execution after so many seconds, for a specific number of attempts. If the exception keeps getting raised beyond the specified number of attempts, the exception is allowed to bubble up to the underlying queuing system, which may have its own retry mechanism or place it in a holding queue for inspection.

    You can also pass a block that’ll be invoked if the retry attempts fail for custom logic rather than letting the exception bubble up. This block is yielded with the job instance as the first and the error instance as the second parameter.

    @@ -231,8 +214,7 @@

    Examples

    end end -
    - +
    diff --git a/src/classes/ActiveJob/Execution.html b/src/classes/ActiveJob/Execution.html index eeec27609f..b44259e68c 100644 --- a/src/classes/ActiveJob/Execution.html +++ b/src/classes/ActiveJob/Execution.html @@ -97,17 +97,9 @@

    Included Modules

    Instance Public methods

    -

    - - perform(*) - -

    +

    perform(*)

    -
    - -
    - @@ -132,15 +124,10 @@

    -

    - - perform_now() - -

    +

    perform_now()

    - -
    -

    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
    @@ -150,8 +137,7 @@ 

    puts MyJob.new(*args).perform_now # => "Hello World!"

    -
    - +
    diff --git a/src/classes/ActiveJob/Execution/ClassMethods.html b/src/classes/ActiveJob/Execution/ClassMethods.html index bc4bcff5df..ae60fd21b2 100644 --- a/src/classes/ActiveJob/Execution/ClassMethods.html +++ b/src/classes/ActiveJob/Execution/ClassMethods.html @@ -64,20 +64,14 @@

    Methods

    Instance Public methods

    -

    - - perform_now(...) - -

    +

    perform_now(...)

    - -
    -

    Performs the job immediately.

    +
    +

    Performs the job immediately.

    MyJob.perform_now("mike")
     
    -
    - +
    diff --git a/src/classes/ActiveJob/Logging.html b/src/classes/ActiveJob/Logging.html index 025a5d5a49..6ddacad864 100644 --- a/src/classes/ActiveJob/Logging.html +++ b/src/classes/ActiveJob/Logging.html @@ -62,19 +62,13 @@

    Methods

    Instance Public methods

    -

    - - log_arguments - -

    +

    log_arguments

    - -
    -

    Configures whether a job’s arguments should be logged. This can be useful when a job’s arguments may be sensitive and so should not be logged.

    +
    +

    Configures whether a job’s arguments should be logged. This can be useful when a job’s arguments may be sensitive and so should not be logged.

    The value defaults to true, but this can be configured with config.active_job.log_arguments. Additionally, individual jobs can also configure a value, which will apply to themselves and any subclasses.

    -
    - +
    @@ -98,17 +92,11 @@

    -

    - - logger - -

    +

    logger

    - -
    -

    Accepts a logger conforming to the interface of Log4r or the default Ruby Logger class. You can retrieve this logger by calling logger on either an Active Job job class or an Active Job job instance.

    -
    - +
    +

    Accepts a logger conforming to the interface of Log4r or the default Ruby Logger class. You can retrieve this logger by calling logger on either an Active Job job class or an Active Job job instance.

    +
    diff --git a/src/classes/ActiveJob/QueueAdapter/ClassMethods.html b/src/classes/ActiveJob/QueueAdapter/ClassMethods.html index fc5614e72f..7450db728c 100644 --- a/src/classes/ActiveJob/QueueAdapter/ClassMethods.html +++ b/src/classes/ActiveJob/QueueAdapter/ClassMethods.html @@ -85,17 +85,11 @@

    Constants

    Instance Public methods

    -

    - - queue_adapter() - -

    +

    queue_adapter()

    - -
    -

    Returns the backend queue provider. The default queue adapter is :async. See QueueAdapters for more information.

    -
    - +
    +

    Returns the backend queue provider. The default queue adapter is :async. See QueueAdapters for more information.

    +
    @@ -121,17 +115,11 @@

    -

    - - queue_adapter=(name_or_adapter) - -

    +

    queue_adapter=(name_or_adapter)

    - -
    -

    Specify the backend queue provider. The default queue adapter is the :async queue. See QueueAdapters for more information.

    -
    - +
    +

    Specify the backend queue provider. The default queue adapter is the :async queue. See QueueAdapters for more information.

    +
    @@ -168,17 +156,11 @@

    -

    - - queue_adapter_name() - -

    +

    queue_adapter_name()

    - -
    -

    Returns string denoting the name of the configured queue adapter. By default returns "async".

    -
    - +
    +

    Returns string denoting the name of the configured queue adapter. By default returns "async".

    +
    diff --git a/src/classes/ActiveJob/QueueAdapters.html b/src/classes/ActiveJob/QueueAdapters.html index f33efb384a..3562e9484f 100644 --- a/src/classes/ActiveJob/QueueAdapters.html +++ b/src/classes/ActiveJob/QueueAdapters.html @@ -222,21 +222,15 @@

    Methods

    Class Public methods

    -

    - - lookup(name) - -

    +

    lookup(name)

    - -
    -

    Returns adapter for specified name.

    +
    +

    Returns adapter for specified name.

    ActiveJob::QueueAdapters.lookup(:sidekiq)
     # => ActiveJob::QueueAdapters::SidekiqAdapter
     
    -
    - +
    diff --git a/src/classes/ActiveJob/QueueAdapters/AbstractAdapter.html b/src/classes/ActiveJob/QueueAdapters/AbstractAdapter.html index b02a569227..1d56a60b2e 100644 --- a/src/classes/ActiveJob/QueueAdapters/AbstractAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/AbstractAdapter.html @@ -94,17 +94,9 @@

    Attributes

    Instance Public methods

    -

    - - enqueue(job) - -

    +

    enqueue(job)

    -
    - -
    - @@ -129,17 +121,9 @@

    -

    - - enqueue_at(job, timestamp) - -

    +

    enqueue_at(job, timestamp)

    -
    - -
    - @@ -164,17 +148,9 @@

    -

    - - stopping?() - -

    +

    stopping?()

    -
    - -
    - diff --git a/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html b/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html index 794bbc554d..baeb26b8c2 100644 --- a/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/AsyncAdapter.html @@ -88,17 +88,11 @@

    Methods

    Class Public methods

    -

    - - new(**executor_options) - -

    +

    new(**executor_options)

    - -
    -

    See Concurrent::ThreadPoolExecutor for executor options.

    -
    - +
    +

    See Concurrent::ThreadPoolExecutor for executor options.

    +
    diff --git a/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html b/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html index a3a3676e21..e9f29d2dfd 100644 --- a/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/QueueClassicAdapter.html @@ -79,19 +79,13 @@

    Methods

    Instance Public methods

    -

    - - build_queue(queue_name) - -

    +

    build_queue(queue_name)

    - -
    -

    Builds a QC::Queue object to schedule jobs on.

    +
    +

    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.

    -
    - +
    diff --git a/src/classes/ActiveJob/QueueAdapters/SidekiqAdapter.html b/src/classes/ActiveJob/QueueAdapters/SidekiqAdapter.html index d0fa7c7a9f..aad0909c0b 100644 --- a/src/classes/ActiveJob/QueueAdapters/SidekiqAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/SidekiqAdapter.html @@ -79,17 +79,9 @@

    Methods

    Instance Public methods

    -

    - - check_adapter() - -

    +

    check_adapter()

    -
    - -
    - diff --git a/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html b/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html index 0fe8c85d48..e69ec7bddb 100644 --- a/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/SneakersAdapter.html @@ -78,17 +78,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - diff --git a/src/classes/ActiveJob/QueueAdapters/TestAdapter.html b/src/classes/ActiveJob/QueueAdapters/TestAdapter.html index bf4d7b544a..a8fe600b2e 100644 --- a/src/classes/ActiveJob/QueueAdapters/TestAdapter.html +++ b/src/classes/ActiveJob/QueueAdapters/TestAdapter.html @@ -163,17 +163,11 @@

    Attributes

    Instance Public methods

    -

    - - enqueued_jobs() - -

    +

    enqueued_jobs()

    - -
    -

    Provides a store of all the enqueued jobs with the TestAdapter so you can check them.

    -
    - +
    +

    Provides a store of all the enqueued jobs with the TestAdapter so you can check them.

    +
    @@ -198,17 +192,11 @@

    -

    - - performed_jobs() - -

    +

    performed_jobs()

    - -
    -

    Provides a store of all the performed jobs with the TestAdapter so you can check them.

    -
    - +
    +

    Provides a store of all the performed jobs with the TestAdapter so you can check them.

    +
    @@ -233,17 +221,9 @@

    -

    - - stopping?() - -

    +

    stopping?()

    -
    - -
    - diff --git a/src/classes/ActiveJob/QueueName.html b/src/classes/ActiveJob/QueueName.html index d049251aa2..6fed9544f7 100644 --- a/src/classes/ActiveJob/QueueName.html +++ b/src/classes/ActiveJob/QueueName.html @@ -71,17 +71,11 @@

    Methods

    Instance Public methods

    -

    - - queue_name() - -

    +

    queue_name()

    - -
    -

    Returns the name of the queue the job will be run on.

    -
    - +
    +

    Returns the name of the queue the job will be run on.

    +
    diff --git a/src/classes/ActiveJob/QueueName/ClassMethods.html b/src/classes/ActiveJob/QueueName/ClassMethods.html index 9555cbe557..ad8206bb9c 100644 --- a/src/classes/ActiveJob/QueueName/ClassMethods.html +++ b/src/classes/ActiveJob/QueueName/ClassMethods.html @@ -64,15 +64,10 @@

    Methods

    Instance Public methods

    -

    - - queue_as(part_name = nil, &block) - -

    +

    queue_as(part_name = nil, &block)

    - -
    -

    Specifies the name of the queue to process the job on.

    +
    +

    Specifies the name of the queue to process the job on.

    class PublishToFeedJob < ActiveJob::Base
       queue_as :feeds
    @@ -101,8 +96,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActiveJob/QueuePriority.html b/src/classes/ActiveJob/QueuePriority.html index 36bd03f38e..eee44e1f22 100644 --- a/src/classes/ActiveJob/QueuePriority.html +++ b/src/classes/ActiveJob/QueuePriority.html @@ -71,17 +71,11 @@

    Methods

    Instance Public methods

    -

    - - priority() - -

    +

    priority()

    - -
    -

    Returns the priority that the job will be created with

    -
    - +
    +

    Returns the priority that the job will be created with

    +
    diff --git a/src/classes/ActiveJob/QueuePriority/ClassMethods.html b/src/classes/ActiveJob/QueuePriority/ClassMethods.html index 31913ed707..2c2816dabe 100644 --- a/src/classes/ActiveJob/QueuePriority/ClassMethods.html +++ b/src/classes/ActiveJob/QueuePriority/ClassMethods.html @@ -64,15 +64,10 @@

    Methods

    Instance Public methods

    -

    - - queue_with_priority(priority = nil, &block) - -

    +

    queue_with_priority(priority = nil, &block)

    - -
    -

    Specifies the priority of the queue to create the job with.

    +
    +

    Specifies the priority of the queue to create the job with.

    class PublishToFeedJob < ActiveJob::Base
       queue_with_priority 50
    @@ -101,8 +96,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActiveJob/Serializers/ActionControllerParametersSerializer.html b/src/classes/ActiveJob/Serializers/ActionControllerParametersSerializer.html index bfa5f9cbf4..1962399269 100644 --- a/src/classes/ActiveJob/Serializers/ActionControllerParametersSerializer.html +++ b/src/classes/ActiveJob/Serializers/ActionControllerParametersSerializer.html @@ -76,17 +76,9 @@

    Methods

    Instance Public methods

    -

    - - deserialize(hash) - -

    +

    deserialize(hash)

    -
    - -
    - @@ -111,17 +103,9 @@

    -

    - - klass() - -

    +

    klass()

    -
    - -
    - @@ -148,17 +132,9 @@

    -

    - - serialize(argument) - -

    +

    serialize(argument)

    -
    - -
    - @@ -183,17 +159,9 @@

    -

    - - serialize?(argument) - -

    +

    serialize?(argument)

    -
    - -
    - diff --git a/src/classes/ActiveJob/Serializers/ObjectSerializer.html b/src/classes/ActiveJob/Serializers/ObjectSerializer.html index 034f708329..b8bf09a00c 100644 --- a/src/classes/ActiveJob/Serializers/ObjectSerializer.html +++ b/src/classes/ActiveJob/Serializers/ObjectSerializer.html @@ -112,17 +112,9 @@

    Included Modules

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -152,17 +144,11 @@

    Instance Public methods

    -

    - - deserialize(hash) - -

    +

    deserialize(hash)

    - -
    -

    Deserializes an argument from a JSON primitive type.

    -
    - +
    +

    Deserializes an argument from a JSON primitive type.

    +
    @@ -187,17 +173,11 @@

    -

    - - serialize(hash) - -

    +

    serialize(hash)

    - -
    -

    Serializes an argument to a JSON primitive type.

    -
    - +
    +

    Serializes an argument to a JSON primitive type.

    +
    @@ -222,17 +202,11 @@

    -

    - - serialize?(argument) - -

    +

    serialize?(argument)

    - -
    -

    Determines if an argument should be serialized by a serializer.

    -
    - +
    +

    Determines if an argument should be serialized by a serializer.

    +
    diff --git a/src/classes/ActiveJob/Serializers/RangeSerializer.html b/src/classes/ActiveJob/Serializers/RangeSerializer.html index 73128f8450..1f78308e9e 100644 --- a/src/classes/ActiveJob/Serializers/RangeSerializer.html +++ b/src/classes/ActiveJob/Serializers/RangeSerializer.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - deserialize(hash) - -

    +

    deserialize(hash)

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - klass() - -

    +

    klass()

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - serialize(range) - -

    +

    serialize(range)

    -
    - -
    - diff --git a/src/classes/ActiveJob/TestHelper.html b/src/classes/ActiveJob/TestHelper.html index 294c833d18..4cf1a09536 100644 --- a/src/classes/ActiveJob/TestHelper.html +++ b/src/classes/ActiveJob/TestHelper.html @@ -123,15 +123,10 @@

    Included Modules

    Instance Public methods

    -

    - - assert_enqueued_jobs(number, only: nil, except: nil, queue: nil, &block) - -

    +

    assert_enqueued_jobs(number, only: nil, except: nil, queue: nil, &block)

    - -
    -

    Asserts that the number of enqueued jobs matches the given number.

    +
    +

    Asserts that the number of enqueued jobs matches the given number.

    def test_jobs
       assert_enqueued_jobs 0
    @@ -187,8 +182,7 @@ 

    end end

    -
    - +
    @@ -227,15 +221,10 @@

    -

    - - assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block) - -

    +

    assert_enqueued_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block)

    - -
    -

    Asserts that the job has been enqueued with the given arguments.

    +
    +

    Asserts that the job has been enqueued with the given arguments.

    def test_assert_enqueued_with
       MyJob.perform_later(1,2,3)
    @@ -290,8 +279,7 @@ 

    end end

    -
    - +
    @@ -360,15 +348,10 @@

    -

    - - assert_no_enqueued_jobs(only: nil, except: nil, queue: nil, &block) - -

    +

    assert_no_enqueued_jobs(only: nil, except: nil, queue: nil, &block)

    - -
    -

    Asserts that no jobs have been enqueued.

    +
    +

    Asserts that no jobs have been enqueued.

    def test_jobs
       assert_no_enqueued_jobs
    @@ -419,8 +402,7 @@ 

    assert_enqueued_jobs 0, &block
     
    -

    - +
    @@ -447,15 +429,10 @@

    -

    - - assert_no_performed_jobs(only: nil, except: nil, queue: nil, &block) - -

    +

    assert_no_performed_jobs(only: nil, except: nil, queue: nil, &block)

    - -
    -

    Asserts that no jobs have been performed.

    +
    +

    Asserts that no jobs have been performed.

    def test_jobs
       assert_no_performed_jobs
    @@ -509,8 +486,7 @@ 

    assert_performed_jobs 0, &block
     
    -

    - +
    @@ -537,15 +513,10 @@

    -

    - - assert_performed_jobs(number, only: nil, except: nil, queue: nil, &block) - -

    +

    assert_performed_jobs(number, only: nil, except: nil, queue: nil, &block)

    - -
    -

    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
    @@ -632,8 +603,7 @@ 

    end end

    -
    - +
    @@ -672,15 +642,10 @@

    -

    - - assert_performed_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block) - -

    +

    assert_performed_with(job: nil, args: nil, at: nil, queue: nil, priority: nil, &block)

    - -
    -

    Asserts that the job has been performed with the given arguments.

    +
    +

    Asserts that the job has been performed with the given arguments.

    def test_assert_performed_with
       MyJob.perform_later(1,2,3)
    @@ -737,8 +702,7 @@ 

    end end

    -
    - +
    @@ -808,15 +772,10 @@

    -

    - - perform_enqueued_jobs(only: nil, except: nil, queue: nil, at: nil, &block) - -

    +

    perform_enqueued_jobs(only: nil, except: nil, queue: nil, at: nil, &block)

    - -
    -

    Performs all enqueued jobs. If a block is given, performs all of the jobs that were enqueued throughout the duration of the block. If a block is not given, performs all of the enqueued jobs up to this point in the test.

    +
    +

    Performs all enqueued jobs. If a block is given, performs all of the jobs that were enqueued throughout the duration of the block. If a block is not given, performs all of the enqueued jobs up to this point in the test.

    def test_perform_enqueued_jobs
       perform_enqueued_jobs do
    @@ -872,8 +831,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.

    -

    - +
    @@ -930,22 +888,16 @@

    -

    - - queue_adapter() - -

    +

    queue_adapter()

    - -
    -

    Accesses the queue_adapter set by ActiveJob::Base.

    +
    +

    Accesses the queue_adapter set by ActiveJob::Base.

    def test_assert_job_has_custom_queue_adapter_set
       assert_instance_of CustomQueueAdapter, HelloJob.queue_adapter
     end
     
    -
    - +
    @@ -970,17 +922,11 @@

    -

    - - queue_adapter_for_test() - -

    +

    queue_adapter_for_test()

    - -
    -

    Returns a queue adapter instance to use with all Active Job test helpers. By default, returns an instance of ActiveJob::QueueAdapters::TestAdapter. Override this method to specify a different adapter. The adapter must implement the same interface as ActiveJob::QueueAdapters::TestAdapter.

    -
    - +
    +

    Returns a queue adapter instance to use with all Active Job test helpers. By default, returns an instance of ActiveJob::QueueAdapters::TestAdapter. Override this method to specify a different adapter. The adapter must implement the same interface as ActiveJob::QueueAdapters::TestAdapter.

    +
    diff --git a/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html b/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html index 7a7dc794ce..1bb2f8ddf5 100644 --- a/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html +++ b/src/classes/ActiveJob/TestHelper/TestQueueAdapter/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - disable_test_adapter() - -

    +

    disable_test_adapter()

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - enable_test_adapter(test_adapter) - -

    +

    enable_test_adapter(test_adapter)

    -
    - -
    - @@ -136,17 +120,9 @@

    -

    - - queue_adapter() - -

    +

    queue_adapter()

    -
    - -
    - diff --git a/src/classes/ActiveJob/UnknownJobClassError.html b/src/classes/ActiveJob/UnknownJobClassError.html index fe9288b09c..d30b8d1e5c 100644 --- a/src/classes/ActiveJob/UnknownJobClassError.html +++ b/src/classes/ActiveJob/UnknownJobClassError.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(job_class_name) - -

    +

    new(job_class_name)

    -
    - -
    - diff --git a/src/classes/ActiveModel.html b/src/classes/ActiveModel.html index 92d58e590a..5ca71b6ddd 100644 --- a/src/classes/ActiveModel.html +++ b/src/classes/ActiveModel.html @@ -584,17 +584,9 @@

    Methods

    Class Public methods

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - @@ -620,17 +612,11 @@

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Active Model as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Model as a Gem::Version.

    +
    @@ -655,17 +641,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Active Model as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Model as a Gem::Version.

    +
    diff --git a/src/classes/ActiveModel/API.html b/src/classes/ActiveModel/API.html index d595735b01..4c117374a7 100644 --- a/src/classes/ActiveModel/API.html +++ b/src/classes/ActiveModel/API.html @@ -144,15 +144,10 @@

    Included Modules

    Class Public methods

    -

    - - new(attributes = {}) - -

    +

    new(attributes = {})

    - -
    -

    Initializes a new model with the given params.

    +
    +

    Initializes a new model with the given params.

    class Person
       include ActiveModel::API
    @@ -163,8 +158,7 @@ 

    person.name # => "bob" person.age # => "18"

    -
    - +
    @@ -195,15 +189,10 @@

    Instance Public methods

    -

    - - persisted?() - -

    +

    persisted?()

    - -
    -

    Indicates if the model is persisted. Default is false.

    +
    +

    Indicates if the model is persisted. Default is false.

    class Person
       include ActiveModel::API
    @@ -213,8 +202,7 @@ 

    person = Person.new(id: 1, name: 'bob') person.persisted? # => false

    -
    - +
    diff --git a/src/classes/ActiveModel/AttributeAssignment.html b/src/classes/ActiveModel/AttributeAssignment.html index f4769f4e21..11678aac20 100644 --- a/src/classes/ActiveModel/AttributeAssignment.html +++ b/src/classes/ActiveModel/AttributeAssignment.html @@ -66,15 +66,10 @@

    Methods

    Instance Public methods

    -

    - - assign_attributes(new_attributes) - -

    +

    assign_attributes(new_attributes)

    - -
    -

    Allows you to set all the attributes by passing in a hash of attributes with keys matching the attribute names.

    +
    +

    Allows you to set all the attributes by passing in a hash of attributes with keys matching the attribute names.

    If the passed hash responds to permitted? method and the return value of this method is false an ActiveModel::ForbiddenAttributesError exception is raised.

    @@ -91,13 +86,14 @@

    cat.name # => 'Gorby' cat.status # => 'sleeping' -

    - +
    -
    - Also aliased as: attributes= -
    +

    + Also aliased as: + + attributes=. +

    @@ -126,15 +122,10 @@

    -

    - - attribute_writer_missing(name, value) - -

    +

    attribute_writer_missing(name, value)

    - -
    -

    Like ‘BasicObject#method_missing`, `#attribute_writer_missing` is invoked when `#assign_attributes` is passed an unknown attribute name.

    +
    +

    Like ‘BasicObject#method_missing`, `#attribute_writer_missing` is invoked when `#assign_attributes` is passed an unknown attribute name.

    By default, ‘#attribute_writer_missing` raises an UnknownAttributeError.

    @@ -151,8 +142,7 @@

    rectangle = Rectangle.new rectangle.assign_attributes(height: 10) # => Logs "Tried to assign to unknown attribute 'height'" -

    - +
    @@ -177,24 +167,17 @@

    -

    - - attributes=(new_attributes) - -

    +

    attributes=(new_attributes)

    -
    - -
    - -
    - Alias for: assign_attributes -
    +

    + Alias for: + assign_attributes. +

    diff --git a/src/classes/ActiveModel/AttributeMethods.html b/src/classes/ActiveModel/AttributeMethods.html index d94dc4cfc4..10bb29ec48 100644 --- a/src/classes/ActiveModel/AttributeMethods.html +++ b/src/classes/ActiveModel/AttributeMethods.html @@ -161,17 +161,11 @@

    Constants

    Instance Public methods

    -

    - - attribute_missing(match, ...) - -

    +

    attribute_missing(match, ...)

    - -
    -

    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.

    +
    @@ -196,19 +190,13 @@

    -

    - - method_missing(method, ...) - -

    +

    method_missing(method, ...)

    - -
    -

    Allows access to the object attributes, which are held in the hash returned by attributes, as though they were first-class methods. So a Person class with a name attribute can for example use Person#name and Person#name= and never directly use the attributes hash – except for multiple assignments with ActiveRecord::Base#attributes=.

    +
    +

    Allows access to the object attributes, which are held in the hash returned by attributes, as though they were first-class methods. So a Person class with a name attribute can for example use Person#name and Person#name= and never directly use the attributes hash – except for multiple assignments with ActiveRecord::Base#attributes=.

    It’s also possible to instantiate related objects, so a Client class belonging to the clients table with a master_id foreign key can instantiate master through Client#master.

    -
    - +
    @@ -238,22 +226,16 @@

    -

    - - respond_to?(method, include_private_methods = false) - -

    +

    respond_to?(method, include_private_methods = false)

    -
    - -
    - -
    - Also aliased as: respond_to_without_attributes? -
    +

    + Also aliased as: + + respond_to_without_attributes?. +

    @@ -285,24 +267,19 @@

    -

    - - respond_to_without_attributes?(method, include_private_methods = false) - -

    +

    respond_to_without_attributes?(method, include_private_methods = false)

    - -
    -

    A Person instance with a name attribute can ask person.respond_to?(:name), person.respond_to?(:name=), and person.respond_to?(:name?) which will all return true.

    -
    - +
    +

    A Person instance with a name attribute can ask person.respond_to?(:name), person.respond_to?(:name=), and person.respond_to?(:name?) which will all return true.

    +
    -
    - Alias for: respond_to? -
    +

    + Alias for: + respond_to?. +

    diff --git a/src/classes/ActiveModel/AttributeMethods/ClassMethods.html b/src/classes/ActiveModel/AttributeMethods/ClassMethods.html index a8520bca4d..f780fb8659 100644 --- a/src/classes/ActiveModel/AttributeMethods/ClassMethods.html +++ b/src/classes/ActiveModel/AttributeMethods/ClassMethods.html @@ -90,15 +90,10 @@

    Methods

    Instance Public methods

    -

    - - alias_attribute(new_name, old_name) - -

    +

    alias_attribute(new_name, old_name)

    - -
    -

    Allows you to make aliases for attributes.

    +
    +

    Allows you to make aliases for attributes.

    class Person
       include ActiveModel::AttributeMethods
    @@ -122,8 +117,7 @@ 

    person.name_short? # => true person.nickname_short? # => true

    -
    - +
    @@ -152,17 +146,11 @@

    -

    - - attribute_alias(name) - -

    +

    attribute_alias(name)

    - -
    -

    Returns the original name for the alias name

    -
    - +
    +

    Returns the original name for the alias name

    +
    @@ -187,17 +175,11 @@

    -

    - - attribute_alias?(new_name) - -

    +

    attribute_alias?(new_name)

    - -
    -

    Is new_name an alias?

    -
    - +
    +

    Is new_name an alias?

    +
    @@ -222,15 +204,10 @@

    -

    - - attribute_method_affix(*affixes) - -

    +

    attribute_method_affix(*affixes)

    - -
    -

    Declares a method available for all attributes with the given prefix and suffix. Uses method_missing and respond_to? to rewrite the method.

    +
    +

    Declares a method available for all attributes with the given prefix and suffix. Uses method_missing and respond_to? to rewrite the method.

    #{prefix}#{attr}#{suffix}(*args, &block)
     
    @@ -260,8 +237,7 @@

    person.reset_name_to_default! person.name # => 'Default Name' -

    - +
    @@ -287,15 +263,10 @@

    -

    - - attribute_method_prefix(*prefixes, parameters: nil) - -

    +

    attribute_method_prefix(*prefixes, parameters: nil)

    - -
    -

    Declares a method available for all attributes with the given prefix. Uses method_missing and respond_to? to rewrite the method.

    +
    +

    Declares a method available for all attributes with the given prefix. Uses method_missing and respond_to? to rewrite the method.

    #{prefix}#{attr}(*args, &block)
     
    @@ -326,8 +297,7 @@

    person.clear_name person.name # => nil -

    - +
    @@ -353,15 +323,10 @@

    -

    - - attribute_method_suffix(*suffixes, parameters: nil) - -

    +

    attribute_method_suffix(*suffixes, parameters: nil)

    - -
    -

    Declares a method available for all attributes with the given suffix. Uses method_missing and respond_to? to rewrite the method.

    +
    +

    Declares a method available for all attributes with the given suffix. Uses method_missing and respond_to? to rewrite the method.

    #{attr}#{suffix}(*args, &block)
     
    @@ -391,8 +356,7 @@

    person.name # => "Bob" person.name_short? # => true -

    - +
    @@ -418,15 +382,10 @@

    -

    - - define_attribute_method(attr_name, _owner: generated_attribute_methods, as: attr_name) - -

    +

    define_attribute_method(attr_name, _owner: generated_attribute_methods, as: attr_name)

    - -
    -

    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.

    @@ -452,8 +411,7 @@

    person.name # => "Bob" person.name_short? # => true -

    - +
    @@ -483,15 +441,10 @@

    -

    - - define_attribute_methods(*attr_names) - -

    +

    define_attribute_methods(*attr_names)

    - -
    -

    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.

    @@ -512,8 +465,7 @@

    end end -

    - +
    @@ -545,15 +497,10 @@

    -

    - - undefine_attribute_methods() - -

    +

    undefine_attribute_methods()

    - -
    -

    Removes all the previously dynamically defined methods from the class, including alias attribute methods.

    +
    +

    Removes all the previously dynamically defined methods from the class, including alias attribute methods.

    class Person
       include ActiveModel::AttributeMethods
    @@ -579,8 +526,7 @@ 

    person.name_short? # => NoMethodError person.first_name # => NoMethodError

    -
    - +
    diff --git a/src/classes/ActiveModel/Attributes.html b/src/classes/ActiveModel/Attributes.html index 125dbd8283..4c66e28370 100644 --- a/src/classes/ActiveModel/Attributes.html +++ b/src/classes/ActiveModel/Attributes.html @@ -121,15 +121,10 @@

    Included Modules

    Instance Public methods

    -

    - - attribute_names() - -

    +

    attribute_names()

    - -
    -

    Returns an array of attribute names as strings.

    +
    +

    Returns an array of attribute names as strings.

    class Person
       include ActiveModel::Attributes
    @@ -141,8 +136,7 @@ 

    person = Person.new person.attribute_names # => ["name", "age"]

    -
    - +
    @@ -167,15 +161,10 @@

    -

    - - attributes() - -

    +

    attributes()

    - -
    -

    Returns a hash of all the attributes with their names as keys and the values of the attributes as values.

    +
    +

    Returns a hash of all the attributes with their names as keys and the values of the attributes as values.

    class Person
       include ActiveModel::Attributes
    @@ -190,8 +179,7 @@ 

    person.attributes # => { "name" => "Francesco", "age" => 22}

    -
    - +
    diff --git a/src/classes/ActiveModel/Attributes/ClassMethods.html b/src/classes/ActiveModel/Attributes/ClassMethods.html index 7cd8eacb22..26e1f03279 100644 --- a/src/classes/ActiveModel/Attributes/ClassMethods.html +++ b/src/classes/ActiveModel/Attributes/ClassMethods.html @@ -66,16 +66,11 @@

    Methods

    Instance Public methods

    -

    - - attribute(name, cast_type = nil, default: nil, **options) +

    attribute(name, cast_type = nil, default: nil, **options) +

    - - - - -
    -

    Defines a model attribute. In addition to the attribute name, a cast type and default value may be specified, as well as any options supported by the given cast type.

    +
    +

    Defines a model attribute. In addition to the attribute name, a cast type and default value may be specified, as well as any options supported by the given cast type.

    class Person
       include ActiveModel::Attributes
    @@ -90,8 +85,7 @@ 

    person.name # => "Volmer" person.active # => true

    -
    - +
    @@ -117,15 +111,10 @@

    -

    - - attribute_names() - -

    +

    attribute_names()

    - -
    -

    Returns an array of attribute names as strings.

    +
    +

    Returns an array of attribute names as strings.

    class Person
       include ActiveModel::Attributes
    @@ -136,8 +125,7 @@ 

    Person.attribute_names # => ["name", "age"]

    -
    - +
    @@ -162,18 +150,12 @@

    -

    - - type_for_attribute(attribute_name, &block) - - -

    +

    type_for_attribute(attribute_name, &block) +

    - -
    -

    Returns the type of the specified attribute after applying any modifiers. This method is the only valid source of information for anything related to the types of a model’s attributes. The return value of this method will implement the interface described by ActiveModel::Type::Value (though the object itself may not subclass it).

    -
    - +
    +

    Returns the type of the specified attribute after applying any modifiers. This method is the only valid source of information for anything related to the types of a model’s attributes. The return value of this method will implement the interface described by ActiveModel::Type::Value (though the object itself may not subclass it).

    +
    diff --git a/src/classes/ActiveModel/Attributes/Normalization.html b/src/classes/ActiveModel/Attributes/Normalization.html index 6630e179df..7ca1ca6ecd 100644 --- a/src/classes/ActiveModel/Attributes/Normalization.html +++ b/src/classes/ActiveModel/Attributes/Normalization.html @@ -93,15 +93,10 @@

    Included Modules

    Instance Public methods

    -

    - - normalize_attribute(name) - -

    +

    normalize_attribute(name)

    - -
    -

    Normalizes a specified attribute using its declared normalizations.

    +
    +

    Normalizes a specified attribute using its declared normalizations.

    Examples

    @@ -146,8 +141,7 @@

    Behavior User.normalize_value_for(:phone, "+1 (555) 867-5309") # => "5558675309" -

    - +
    diff --git a/src/classes/ActiveModel/Attributes/Normalization/ClassMethods.html b/src/classes/ActiveModel/Attributes/Normalization/ClassMethods.html index f4493d641b..821016643c 100644 --- a/src/classes/ActiveModel/Attributes/Normalization/ClassMethods.html +++ b/src/classes/ActiveModel/Attributes/Normalization/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - normalize_value_for(name, value) - -

    +

    normalize_value_for(name, value)

    - -
    -

    Normalizes a given value using normalizations declared for name.

    +
    +

    Normalizes a given value using normalizations declared for name.

    Examples

    @@ -86,8 +81,7 @@

    Examples

    User.normalize_value_for(:email, " CRUISE-CONTROL@EXAMPLE.COM\n") # => "cruise-control@example.com" -
    - +
    @@ -112,15 +106,10 @@

    Examples

    -

    - - normalizes(*names, with:, apply_to_nil: false) - -

    +

    normalizes(*names, with:, apply_to_nil: false)

    - -
    -

    Declares a normalization for one or more attributes. The normalization is applied when the attribute is assigned or validated.

    +
    +

    Declares a normalization for one or more attributes. The normalization is applied when the attribute is assigned or validated.

    Because the normalization may be applied multiple times, it should be idempotent. In other words, applying the normalization more than once should have the same result as applying it only once.

    @@ -152,8 +141,7 @@

    Examples

    User.normalize_value_for(:phone, "+1 (555) 867-5309") # => "5558675309" -
    - +
    diff --git a/src/classes/ActiveModel/Callbacks.html b/src/classes/ActiveModel/Callbacks.html index 7229f32a69..8642362afa 100644 --- a/src/classes/ActiveModel/Callbacks.html +++ b/src/classes/ActiveModel/Callbacks.html @@ -132,15 +132,10 @@

    Included Modules

    Instance Public methods

    -

    - - define_model_callbacks(*callbacks) - -

    +

    define_model_callbacks(*callbacks)

    - -
    -

    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
     
    @@ -171,8 +166,7 @@

    NOTE: method_name passed to define_model_callbacks must not end with !, ? or =.

    -

    - +
    diff --git a/src/classes/ActiveModel/Conversion.html b/src/classes/ActiveModel/Conversion.html index 5a8caf4cab..031570460c 100644 --- a/src/classes/ActiveModel/Conversion.html +++ b/src/classes/ActiveModel/Conversion.html @@ -99,17 +99,11 @@

    Methods

    Class Public methods

    -

    - - param_delimiter - -

    +

    param_delimiter

    - -
    -

    Accepts a string that will be used as a delimiter of object’s key values in the ‘to_param` method.

    -
    - +
    +

    Accepts a string that will be used as a delimiter of object’s key values in the ‘to_param` method.

    +
    @@ -137,15 +131,10 @@

    Instance Public methods

    -

    - - to_key() - -

    +

    to_key()

    - -
    -

    Returns an Array of all key attributes if any of the attributes is set, whether or not the object is persisted. Returns nil if there are no key attributes.

    +
    +

    Returns an Array of all key attributes if any of the attributes is set, whether or not the object is persisted. Returns nil if there are no key attributes.

    class Person
       include ActiveModel::Conversion
    @@ -159,8 +148,7 @@ 

    person = Person.new(1) person.to_key # => [1]

    -
    - +
    @@ -186,15 +174,10 @@

    -

    - - to_model() - -

    +

    to_model()

    - -
    -

    If your object is already designed to implement all of the Active Model you can use the default :to_model implementation, which simply returns self.

    +
    +

    If your object is already designed to implement all of the Active Model you can use the default :to_model implementation, which simply returns self.

    class Person
       include ActiveModel::Conversion
    @@ -205,8 +188,7 @@ 

    If your model does not act like an Active Model object, then you should define :to_model yourself returning a proxy object that wraps your object with Active Model compliant methods.

    -
    - +
    @@ -231,15 +213,10 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Returns a string representing the object’s key suitable for use in URLs, or nil if persisted? is false.

    +
    +

    Returns a string representing the object’s key suitable for use in URLs, or nil if persisted? is false.

    class Person
       include ActiveModel::Conversion
    @@ -257,8 +234,7 @@ 

    person = Person.new(1) person.to_param # => "1"

    -
    - +
    @@ -283,15 +259,10 @@

    -

    - - to_partial_path() - -

    +

    to_partial_path()

    - -
    -

    Returns a string identifying the path associated with the object. ActionPack uses this to find a suitable partial to represent the object.

    +
    +

    Returns a string identifying the path associated with the object. ActionPack uses this to find a suitable partial to represent the object.

    class Person
       include ActiveModel::Conversion
    @@ -300,8 +271,7 @@ 

    person = Person.new person.to_partial_path # => "people/person"

    -
    - +
    diff --git a/src/classes/ActiveModel/Dirty.html b/src/classes/ActiveModel/Dirty.html index 7c9e9bb556..1c7553081d 100644 --- a/src/classes/ActiveModel/Dirty.html +++ b/src/classes/ActiveModel/Dirty.html @@ -285,15 +285,10 @@

    Included Modules

    Instance Public methods

    -

    - - *_change - -

    +

    *_change

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Returns the old and the new value of the attribute.

    @@ -301,8 +296,7 @@

    person.name = 'Nick' person.name_change # => [nil, 'Nick'] -

    - +
    @@ -315,15 +309,10 @@

    -

    - - *_changed? - -

    +

    *_changed?

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Returns true if the attribute has unsaved changes.

    @@ -331,8 +320,7 @@

    person.name = 'Andrew' person.name_changed? # => true -

    - +
    @@ -345,15 +333,10 @@

    -

    - - *_previous_change - -

    +

    *_previous_change

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Returns the old and the new value of the attribute before the last save.

    @@ -362,8 +345,7 @@

    person.save person.name_previous_change # => [nil, 'Emmanuel'] -

    - +
    @@ -376,16 +358,11 @@

    -

    - - *_previously_changed?(**options) +

    *_previously_changed?(**options) +

    - - - - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Returns true if the attribute previously had unsaved changes.

    @@ -395,8 +372,7 @@

    person.name_previously_changed? # => true person.name_previously_changed?(from: nil, to: 'Britanny') # => true -

    - +
    @@ -409,15 +385,10 @@

    -

    - - *_previously_was - -

    +

    *_previously_was

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Returns the old value of the attribute before the last save.

    @@ -426,8 +397,7 @@

    person.save person.name_previously_was # => nil -

    - +
    @@ -440,15 +410,10 @@

    -

    - - *_was - -

    +

    *_was

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Returns the old value of the attribute.

    @@ -456,8 +421,7 @@

    person.name = 'Stephanie' person.name_was # => 'Steph' -

    - +
    @@ -470,15 +434,10 @@

    -

    - - *_will_change! - -

    +

    *_will_change!

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    If an attribute is modified in-place then make use of *_will_change! to mark that the attribute is changing. Otherwise Active Model can’t track changes to in-place attributes. Note that Active Record can detect in-place modifications automatically. You do not need to call *_will_change! on Active Record models.

    @@ -486,8 +445,7 @@

    person.name_will_change! person.name_change # => ['Sandy', 'Sandy'] -

    - +
    @@ -500,17 +458,11 @@

    -

    - - attribute_changed?(attr_name, **options) - -

    +

    attribute_changed?(attr_name, **options)

    - -
    -

    Dispatch target for *_changed? attribute methods.

    -
    - +
    +

    Dispatch target for *_changed? attribute methods.

    +
    @@ -535,17 +487,11 @@

    -

    - - attribute_previously_changed?(attr_name, **options) - -

    +

    attribute_previously_changed?(attr_name, **options)

    - -
    -

    Dispatch target for *_previously_changed? attribute methods.

    -
    - +
    +

    Dispatch target for *_previously_changed? attribute methods.

    +
    @@ -570,17 +516,11 @@

    -

    - - attribute_previously_was(attr_name) - -

    +

    attribute_previously_was(attr_name)

    - -
    -

    Dispatch target for *_previously_was attribute methods.

    -
    - +
    +

    Dispatch target for *_previously_was attribute methods.

    +
    @@ -605,17 +545,11 @@

    -

    - - attribute_was(attr_name) - -

    +

    attribute_was(attr_name)

    - -
    -

    Dispatch target for *_was attribute methods.

    -
    - +
    +

    Dispatch target for *_was attribute methods.

    +
    @@ -640,22 +574,16 @@

    -

    - - changed() - -

    +

    changed()

    - -
    -

    Returns an array with the name of the attributes with unsaved changes.

    +
    +

    Returns an array with the name of the attributes with unsaved changes.

    person.changed # => []
     person.name = 'bob'
     person.changed # => ["name"]
     
    -
    - +
    @@ -680,22 +608,16 @@

    -

    - - changed?() - -

    +

    changed?()

    - -
    -

    Returns true if any of the attributes has unsaved changes, false otherwise.

    +
    +

    Returns true if any of the attributes has unsaved changes, false otherwise.

    person.changed? # => false
     person.name = 'bob'
     person.changed? # => true
     
    -
    - +
    @@ -720,22 +642,16 @@

    -

    - - changed_attributes() - -

    +

    changed_attributes()

    - -
    -

    Returns a hash of the attributes with unsaved changes indicating their original values like attr => original value.

    +
    +

    Returns a hash of the attributes with unsaved changes indicating their original values like attr => original value.

    person.name # => "bob"
     person.name = 'robert'
     person.changed_attributes # => {"name" => "bob"}
     
    -
    - +
    @@ -760,22 +676,16 @@

    -

    - - changes() - -

    +

    changes()

    - -
    -

    Returns a hash of changed attributes indicating their original and new values like attr => [original value, new value].

    +
    +

    Returns a hash of changed attributes indicating their original and new values like attr => [original value, new value].

    person.changes # => {}
     person.name = 'bob'
     person.changes # => { "name" => ["bill", "bob"] }
     
    -
    - +
    @@ -800,17 +710,11 @@

    -

    - - changes_applied() - -

    +

    changes_applied()

    - -
    -

    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.

    +
    @@ -840,15 +744,10 @@

    -

    - - clear_*_change - -

    +

    clear_*_change

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Clears all dirty data of the attribute: current changes and previous changes.

    @@ -858,8 +757,7 @@

    person.clear_name_change person.name_change # => nil -

    - +
    @@ -883,17 +781,9 @@

    -

    - - clear_attribute_changes(attr_names) - -

    +

    clear_attribute_changes(attr_names)

    -
    - -
    - @@ -920,17 +810,11 @@

    -

    - - clear_changes_information() - -

    +

    clear_changes_information()

    - -
    -

    Clears all dirty data: current changes and previous changes.

    -
    - +
    +

    Clears all dirty data: current changes and previous changes.

    +
    @@ -957,23 +841,17 @@

    -

    - - previous_changes() - -

    +

    previous_changes()

    - -
    -

    Returns a hash of attributes that were changed before the model was saved.

    +
    +

    Returns a hash of attributes that were changed before the model was saved.

    person.name # => "bob"
     person.name = 'robert'
     person.save
     person.previous_changes # => {"name" => ["bob", "robert"]}
     
    -
    - +
    @@ -998,15 +876,10 @@

    -

    - - restore_*! - -

    +

    restore_*!

    - -
    -

    This method is generated for each attribute.

    +
    +

    This method is generated for each attribute.

    Restores the attribute to the old value.

    @@ -1015,8 +888,7 @@

    person.restore_name! person.name # => nil -

    - +
    @@ -1029,17 +901,11 @@

    -

    - - restore_attributes(attr_names = changed) - -

    +

    restore_attributes(attr_names = changed)

    - -
    -

    Restore all previous data of the provided attributes.

    -
    - +
    +

    Restore all previous data of the provided attributes.

    +
    diff --git a/src/classes/ActiveModel/EachValidator.html b/src/classes/ActiveModel/EachValidator.html index 452f4ab619..d4afe663bd 100644 --- a/src/classes/ActiveModel/EachValidator.html +++ b/src/classes/ActiveModel/EachValidator.html @@ -99,17 +99,11 @@

    Attributes

    Class Public methods

    -

    - - new(options) - -

    +

    new(options)

    - -
    -

    Returns a new validator instance. All options will be available via the options reader, however the :attributes option will be removed and instead be made available through the attributes reader.

    -
    - +
    +

    Returns a new validator instance. All options will be available via the options reader, however the :attributes option will be removed and instead be made available through the attributes reader.

    +
    @@ -141,17 +135,11 @@

    Instance Public methods

    -

    - - check_validity!() - -

    +

    check_validity!()

    - -
    -

    Hook method that gets called by the initializer allowing verification that the arguments supplied are valid. You could for example raise an ArgumentError when invalid options are supplied.

    -
    - +
    +

    Hook method that gets called by the initializer allowing verification that the arguments supplied are valid. You could for example raise an ArgumentError when invalid options are supplied.

    +
    @@ -175,17 +163,11 @@

    -

    - - validate(record) - -

    +

    validate(record)

    - -
    -

    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.

    +
    @@ -215,17 +197,11 @@

    -

    - - validate_each(record, attribute, value) - -

    +

    validate_each(record, attribute, value)

    - -
    -

    Override this method in subclasses with the validation logic, adding errors to the records errors array where necessary.

    -
    - +
    +

    Override this method in subclasses with the validation logic, adding errors to the records errors array where necessary.

    +
    diff --git a/src/classes/ActiveModel/Error.html b/src/classes/ActiveModel/Error.html index 73dfda8161..b87d2c89d3 100644 --- a/src/classes/ActiveModel/Error.html +++ b/src/classes/ActiveModel/Error.html @@ -165,17 +165,9 @@

    Attributes

    Class Public methods

    -

    - - new(base, attribute, type = :invalid, **options) - -

    +

    new(base, attribute, type = :invalid, **options)

    -
    - -
    - @@ -208,24 +200,17 @@

    Instance Public methods

    -

    - - detail() - -

    +

    detail()

    -
    - -
    - -
    - Alias for: details -
    +

    + Alias for: + details. +

    @@ -233,27 +218,23 @@

    -

    - - details() - -

    +

    details()

    - -
    -

    Returns the error details.

    +
    +

    Returns the error details.

    error = ActiveModel::Error.new(person, :name, :too_short, count: 5)
     error.details
     # => { error: :too_short, count: 5 }
     
    -
    - +
    -
    - Also aliased as: detail -
    +

    + Also aliased as: + + detail. +

    @@ -277,22 +258,16 @@

    -

    - - full_message() - -

    +

    full_message()

    - -
    -

    Returns the full error message.

    +
    +

    Returns the full error message.

    error = ActiveModel::Error.new(person, :name, :too_short, count: 5)
     error.full_message
     # => "Name is too short (minimum is 5 characters)"
     
    -
    - +
    @@ -317,19 +292,13 @@

    -

    - - match?(attribute, type = nil, **options) - -

    +

    match?(attribute, type = nil, **options)

    - -
    -

    See if error matches provided attribute, type, and options.

    +
    +

    See if error matches provided attribute, type, and options.

    Omitted params are not checked for a match.

    -
    - +
    @@ -364,22 +333,16 @@

    -

    - - message() - -

    +

    message()

    - -
    -

    Returns the error message.

    +
    +

    Returns the error message.

    error = ActiveModel::Error.new(person, :name, :too_short, count: 5)
     error.message
     # => "is too short (minimum is 5 characters)"
     
    -
    - +
    @@ -409,19 +372,13 @@

    -

    - - strict_match?(attribute, type, **options) - -

    +

    strict_match?(attribute, type, **options)

    - -
    -

    See if error matches provided attribute, type, and options exactly.

    +
    +

    See if error matches provided attribute, type, and options exactly.

    All params must be equal to Error’s own attributes to be considered a strict match.

    -
    - +
    @@ -451,17 +408,9 @@

    Instance Protected methods

    -

    - - attributes_for_hash() - -

    +

    attributes_for_hash()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Errors.html b/src/classes/ActiveModel/Errors.html index 6c09cadadc..55d90d5512 100644 --- a/src/classes/ActiveModel/Errors.html +++ b/src/classes/ActiveModel/Errors.html @@ -258,15 +258,10 @@

    Attributes

    Class Public methods

    -

    - - new(base) - -

    +

    new(base)

    - -
    -

    Pass in the instance of the object that is using the errors object.

    +
    +

    Pass in the instance of the object that is using the errors object.

    class Person
       def initialize
    @@ -274,8 +269,7 @@ 

    end end

    -
    - +
    @@ -305,21 +299,15 @@

    Instance Public methods

    -

    - - [](attribute) - -

    +

    [](attribute)

    - -
    -

    When passed a symbol or a name of a method, returns an array of errors for the method.

    +
    +

    When passed a symbol or a name of a method, returns an array of errors for the method.

    person.errors[:name]  # => ["cannot be nil"]
     person.errors['name'] # => ["cannot be nil"]
     
    -
    - +
    @@ -344,15 +332,10 @@

    -

    - - add(attribute, type = :invalid, **options) - -

    +

    add(attribute, type = :invalid, **options)

    - -
    -

    Adds a new error of type on attribute. More than one error can be added to the same attribute. If no type is supplied, :invalid is assumed.

    +
    +

    Adds a new error of type on attribute. More than one error can be added to the same attribute. If no type is supplied, :invalid is assumed.

    person.errors.add(:name)
     # Adds <#ActiveModel::Error attribute=name, type=invalid>
    @@ -398,8 +381,7 @@ 

    person.errors.details # => {:base=>[{error: :name_or_email_blank}]}

    -
    - +
    @@ -434,15 +416,10 @@

    -

    - - added?(attribute, type = :invalid, options = {}) - -

    +

    added?(attribute, type = :invalid, options = {})

    - -
    -

    Returns true if an error matches provided attribute and type, or false otherwise. type is treated the same as for add.

    +
    +

    Returns true if an error matches provided attribute and type, or false otherwise. type is treated the same as for add.

    person.errors.add :name, :blank
     person.errors.added? :name, :blank           # => true
    @@ -458,8 +435,7 @@ 

    person.errors.added? :name, :too_long # => false person.errors.added? :name, "is too long" # => false

    -
    - +
    @@ -492,21 +468,15 @@

    -

    - - as_json(options = nil) - -

    +

    as_json(options = nil)

    - -
    -

    Returns a Hash that can be used as the JSON representation for this object. You can pass the :full_messages option. This determines if the JSON object should contain full messages or not (false by default).

    +
    +

    Returns a Hash that can be used as the JSON representation for this object. You can pass the :full_messages option. This determines if the JSON object should contain full messages or not (false by default).

    person.errors.as_json                      # => {:name=>["cannot be nil"]}
     person.errors.as_json(full_messages: true) # => {:name=>["name cannot be nil"]}
     
    -
    - +
    @@ -531,21 +501,15 @@

    -

    - - attribute_names() - -

    +

    attribute_names()

    - -
    -

    Returns all error attribute names

    +
    +

    Returns all error attribute names

    person.errors.messages        # => {:name=>["cannot be nil", "must be specified"]}
     person.errors.attribute_names # => [:name]
     
    -
    - +
    @@ -570,18 +534,12 @@

    -

    - - clear +

    clear +

    - - - - -
    -

    Clears all errors. Clearing the errors does not, however, make the model valid. The next time the validations are run (for example, via ActiveRecord::Validations#valid?), the errors collection will be filled again if any validations fail.

    -
    - +
    +

    Clears all errors. Clearing the errors does not, however, make the model valid. The next time the validations are run (for example, via ActiveRecord::Validations#valid?), the errors collection will be filled again if any validations fail.

    +
    @@ -594,22 +552,16 @@

    -

    - - delete(attribute, type = nil, **options) - -

    +

    delete(attribute, type = nil, **options)

    - -
    -

    Delete messages for key. Returns the deleted messages.

    +
    +

    Delete messages for key. Returns the deleted messages.

    person.errors[:name]        # => ["cannot be nil"]
     person.errors.delete(:name) # => ["cannot be nil"]
     person.errors[:name]        # => []
     
    -
    - +
    @@ -639,17 +591,11 @@

    -

    - - details() - -

    +

    details()

    - -
    -

    Returns a Hash of attributes with an array of their error details.

    -
    - +
    +

    Returns a Hash of attributes with an array of their error details.

    +
    @@ -679,16 +625,11 @@

    -

    - - each(&block) +

    each(&block) +

    - - - - -
    -

    Iterates through each error object.

    +
    +

    Iterates through each error object.

    person.errors.add(:name, :too_short, count: 2)
     person.errors.each do |error|
    @@ -696,8 +637,7 @@ 

    options={:count=>3}> end

    -
    - +
    @@ -710,18 +650,12 @@

    -

    - - empty? - - -

    +

    empty? +

    - -
    -

    Returns true if there are no errors.

    -
    - +
    +

    Returns true if there are no errors.

    +
    @@ -734,20 +668,14 @@

    -

    - - full_message(attribute, message) - -

    +

    full_message(attribute, message)

    - -
    -

    Returns a full message for a given attribute.

    +
    +

    Returns a full message for a given attribute.

    person.errors.full_message(:name, 'is invalid') # => "Name is invalid"
     
    -
    - +
    @@ -772,15 +700,10 @@

    -

    - - full_messages() - -

    +

    full_messages()

    - -
    -

    Returns all the full error messages in an array.

    +
    +

    Returns all the full error messages in an array.

    class Person
       validates_presence_of :name, :address, :email
    @@ -791,13 +714,14 @@ 

    person.errors.full_messages # => ["Name is too short (minimum is 5 characters)", "Name can't be blank", "Email can't be blank"]

    -
    - +
    -
    - Also aliased as: to_a -
    +

    + Also aliased as: + + to_a. +

    @@ -821,15 +745,10 @@

    -

    - - full_messages_for(attribute) - -

    +

    full_messages_for(attribute)

    - -
    -

    Returns all the full error messages for a given attribute in an array.

    +
    +

    Returns all the full error messages for a given attribute in an array.

    class Person
       validates_presence_of :name, :email
    @@ -840,8 +759,7 @@ 

    person.errors.full_messages_for(:name) # => ["Name is too short (minimum is 5 characters)", "Name can't be blank"]

    -
    - +
    @@ -866,15 +784,10 @@

    -

    - - generate_message(attribute, type = :invalid, options = {}) - -

    +

    generate_message(attribute, type = :invalid, options = {})

    - -
    -

    Translates an error message in its default scope (activemodel.errors.messages).

    +
    +

    Translates an error message in its default scope (activemodel.errors.messages).

    Error messages are first looked up in activemodel.errors.models.MODEL.attributes.ATTRIBUTE.MESSAGE, if it’s not there, it’s looked up in activemodel.errors.models.MODEL.MESSAGE and if that is not there also, it returns the translation of the default message (e.g. activemodel.errors.messages.MESSAGE). The translated model name, translated attribute name, and the value are available for interpolation.

    @@ -896,8 +809,7 @@

  • errors.messages.blank

  • -

    - +
    @@ -922,21 +834,15 @@

    -

    - - group_by_attribute() - -

    +

    group_by_attribute()

    - -
    -

    Returns a Hash of attributes with an array of their Error objects.

    +
    +

    Returns a Hash of attributes with an array of their Error objects.

    person.errors.group_by_attribute
     # => {:name=>[<#ActiveModel::Error>, <#ActiveModel::Error>]}
     
    -
    - +
    @@ -961,24 +867,17 @@

    -

    - - has_key?(attribute) - -

    +

    has_key?(attribute)

    -
    - -
    - -
    - Alias for: include? -
    +

    + Alias for: + include?. +

    @@ -986,15 +885,10 @@

    -

    - - import(error, override_options = {}) - -

    +

    import(error, override_options = {})

    - -
    -

    Imports one error. Imported errors are wrapped as a NestedError, providing access to original error object. If attribute or type needs to be overridden, use override_options.

    +
    +

    Imports one error. Imported errors are wrapped as a NestedError, providing access to original error object. If attribute or type needs to be overridden, use override_options.

    Options

    • @@ -1002,8 +896,7 @@

      Options

    • :type - Override type of the error.

    -
    - +
    @@ -1033,27 +926,23 @@

    Options

    -

    - - include?(attribute) - -

    +

    include?(attribute)

    - -
    -

    Returns true if the error messages include an error for the given key attribute, false otherwise.

    +
    +

    Returns true if the error messages include an error for the given key attribute, false otherwise.

    person.errors.messages        # => {:name=>["cannot be nil"]}
     person.errors.include?(:name) # => true
     person.errors.include?(:age)  # => false
     
    -
    - +
    -
    - Also aliased as: has_key?, key? -
    +

    + Also aliased as: + + has_key?, key?. +

    @@ -1079,24 +968,17 @@

    -

    - - key?(attribute) - -

    +

    key?(attribute)

    -
    - -
    - -
    - Alias for: include? -
    +

    + Alias for: + include?. +

    @@ -1104,15 +986,10 @@

    -

    - - merge!(other) - -

    +

    merge!(other)

    - -
    -

    Merges the errors from other, each Error wrapped as NestedError.

    +
    +

    Merges the errors from other, each Error wrapped as NestedError.

    Parameters

    • @@ -1123,8 +1000,7 @@

      Examples

      person.errors.merge!(other)
       
      -
    - +
    @@ -1153,17 +1029,11 @@

    Examples

    -

    - - messages() - -

    +

    messages()

    - -
    -

    Returns a Hash of attributes with an array of their error messages.

    -
    - +
    +

    Returns a Hash of attributes with an array of their error messages.

    +
    @@ -1191,15 +1061,10 @@

    -

    - - messages_for(attribute) - -

    +

    messages_for(attribute)

    - -
    -

    Returns all the error messages for a given attribute in an array.

    +
    +

    Returns all the error messages for a given attribute in an array.

    class Person
       validates_presence_of :name, :email
    @@ -1210,8 +1075,7 @@ 

    person.errors.messages_for(:name) # => ["is too short (minimum is 5 characters)", "can't be blank"]

    -
    - +
    @@ -1236,15 +1100,10 @@

    -

    - - of_kind?(attribute, type = :invalid) - -

    +

    of_kind?(attribute, type = :invalid)

    - -
    -

    Returns true if an error on the attribute with the given type is present, or false otherwise. type is treated the same as for add.

    +
    +

    Returns true if an error on the attribute with the given type is present, or false otherwise. type is treated the same as for add.

    person.errors.add :age
     person.errors.add :name, :too_long, count: 25
    @@ -1255,8 +1114,7 @@ 

    person.errors.of_kind? :name, :not_too_long # => false person.errors.of_kind? :name, "is too long" # => false

    -
    - +
    @@ -1287,18 +1145,12 @@

    -

    - - size - - -

    +

    size +

    - -
    -

    Returns number of errors.

    -
    - +
    +

    Returns number of errors.

    +
    @@ -1322,24 +1174,17 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - -
    - Alias for: full_messages -
    +

    + Alias for: + full_messages. +

    @@ -1347,21 +1192,15 @@

    -

    - - to_hash(full_messages = false) - -

    +

    to_hash(full_messages = false)

    - -
    -

    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"]}
     
    -
    - +
    @@ -1389,15 +1228,10 @@

    -

    - - where(attribute, type = nil, **options) - -

    +

    where(attribute, type = nil, **options)

    - -
    -

    Search for errors matching attribute, type, or options.

    +
    +

    Search for errors matching attribute, type, or options.

    Only supplied params will be matched.

    @@ -1405,8 +1239,7 @@

    person.errors.where(:name, :too_short) # => all name errors being too short person.errors.where(:name, :too_short, minimum: 2) # => all name errors being too short and minimum is 2 -

    - +
    diff --git a/src/classes/ActiveModel/Lint/Tests.html b/src/classes/ActiveModel/Lint/Tests.html index 2aa2384000..0a2a653540 100644 --- a/src/classes/ActiveModel/Lint/Tests.html +++ b/src/classes/ActiveModel/Lint/Tests.html @@ -92,19 +92,13 @@

    Methods

    Instance Public methods

    -

    - - test_errors_aref() - -

    +

    test_errors_aref()

    - -
    -

    Passes if the object’s model responds to errors and if calling [](attribute) on the result of this method returns an array. Fails otherwise.

    +
    +

    Passes if the object’s model responds to errors and if calling [](attribute) on the result of this method returns an array. Fails otherwise.

    errors[attribute] is used to retrieve the errors of a model for a given attribute. If errors are present, the method should return an array of strings that are the errors for the attribute in question. If localization is used, the strings should be localized for the current locale. If no error is present, the method should return an empty array.

    -
    - +
    @@ -130,19 +124,13 @@

    -

    - - test_model_naming() - -

    +

    test_model_naming()

    - -
    -

    Passes if the object’s model responds to model_name both as an instance method and as a class method, and if calling this method returns a string with some convenience methods: :human, :singular and :plural.

    +
    +

    Passes if the object’s model responds to model_name both as an instance method and as a class method, and if calling this method returns a string with some convenience methods: :human, :singular and :plural.

    Check ActiveModel::Naming for more information.

    -
    - +
    @@ -175,19 +163,13 @@

    -

    - - test_persisted?() - -

    +

    test_persisted?()

    - -
    -

    Passes if the object’s model responds to persisted? and if calling this method returns either true or false. Fails otherwise.

    +
    +

    Passes if the object’s model responds to persisted? and if calling this method returns either true or false. Fails otherwise.

    persisted? is used when calculating the URL for an object. If the object is not persisted, a form for that object, for instance, will route to the create action. If it is persisted, a form for the object will route to the update action.

    -
    - +
    @@ -213,19 +195,13 @@

    -

    - - test_to_key() - -

    +

    test_to_key()

    - -
    -

    Passes if the object’s model responds to to_key and if calling this method returns nil when the object is not persisted. Fails otherwise.

    +
    +

    Passes if the object’s model responds to to_key and if calling this method returns nil when the object is not persisted. Fails otherwise.

    to_key returns an Enumerable of all (primary) key attributes of the model, and is used to a generate unique DOM id for the object.

    -
    - +
    @@ -252,19 +228,13 @@

    -

    - - test_to_param() - -

    +

    test_to_param()

    - -
    -

    Passes if the object’s model responds to to_param and if calling this method returns nil when the object is not persisted. Fails otherwise.

    +
    +

    Passes if the object’s model responds to to_param and if calling this method returns nil when the object is not persisted. Fails otherwise.

    to_param is used to represent the object’s key in URLs. Implementers can decide to either raise an exception or provide a default in case the record uses a composite primary key. There are no tests for this behavior in lint because it doesn’t make sense to force any of the possible implementation strategies on the implementer.

    -
    - +
    @@ -292,19 +262,13 @@

    -

    - - test_to_partial_path() - -

    +

    test_to_partial_path()

    - -
    -

    Passes if the object’s model responds to to_partial_path and if calling this method returns a string. Fails otherwise.

    +
    +

    Passes if the object’s model responds to to_partial_path and if calling this method returns a string. Fails otherwise.

    to_partial_path is used for looking up partials. For example, a BlogPost model might return “blog_posts/blog_post”.

    -
    - +
    diff --git a/src/classes/ActiveModel/Model.html b/src/classes/ActiveModel/Model.html index bfdcf8e235..1c648efe9e 100644 --- a/src/classes/ActiveModel/Model.html +++ b/src/classes/ActiveModel/Model.html @@ -114,23 +114,17 @@

    Included Modules

    Instance Public methods

    -

    - - slice(*methods) - - -

    +

    slice(*methods) +

    - -
    -

    Returns a hash of the given methods with their names as keys and returned values as values.

    +
    +

    Returns a hash of the given methods with their names as keys and returned values as values.

    person = Person.new(id: 1, name: "bob")
     person.slice(:id, :name)
     # => { "id" => 1, "name" => "bob" }
     
    -
    - +
    @@ -143,23 +137,17 @@

    -

    - - values_at(*methods) - - -

    +

    values_at(*methods) +

    - -
    -

    Returns an array of the values returned by the given methods.

    +
    +

    Returns an array of the values returned by the given methods.

    person = Person.new(id: 1, name: "bob")
     person.values_at(:id, :name)
     # => [1, "bob"]
     
    -
    - +
    diff --git a/src/classes/ActiveModel/Name.html b/src/classes/ActiveModel/Name.html index d2da195238..3e9b4138d6 100644 --- a/src/classes/ActiveModel/Name.html +++ b/src/classes/ActiveModel/Name.html @@ -205,15 +205,10 @@

    Attributes

    Class Public methods

    -

    - - new(klass, namespace = nil, name = nil, locale = :en) - -

    +

    new(klass, namespace = nil, name = nil, locale = :en)

    - -
    -

    Returns a new ActiveModel::Name instance. By default, the namespace and name option will take the namespace and name of the given class respectively. Use locale argument for singularize and pluralize model name.

    +
    +

    Returns a new ActiveModel::Name instance. By default, the namespace and name option will take the namespace and name of the given class respectively. Use locale argument for singularize and pluralize model name.

    module Foo
       class Bar
    @@ -223,8 +218,7 @@ 

    ActiveModel::Name.new(Foo::Bar).to_s # => "Foo::Bar"

    -
    - +
    @@ -270,16 +264,11 @@

    Instance Public methods

    -

    - - !~(regexp) - - -

    +

    !~(regexp) +

    - -
    -

    Equivalent to String#!~. Match the class name against the given regexp. Returns true if there is no match, otherwise false.

    +
    +

    Equivalent to String#!~. Match the class name against the given regexp. Returns true if there is no match, otherwise false.

    class BlogPost
       extend ActiveModel::Naming
    @@ -288,8 +277,7 @@ 

    BlogPost.model_name !~ /Post/ # => false BlogPost.model_name !~ /\d/ # => true

    -
    - +
    @@ -302,16 +290,11 @@

    -

    - - <=>(other) - - -

    +

    <=>(other) +

    - -
    -

    Equivalent to String#<=>.

    +
    +

    Equivalent to String#<=>.

    class BlogPost
       extend ActiveModel::Naming
    @@ -321,8 +304,7 @@ 

    BlogPost.model_name <=> 'Blog' # => 1 BlogPost.model_name <=> 'BlogPosts' # => -1

    -
    - +
    @@ -335,16 +317,11 @@

    -

    - - ==(other) +

    ==(other) +

    - - - - -
    -

    Equivalent to String#==. Returns true if the class name and other are equal, otherwise false.

    +
    +

    Equivalent to String#==. Returns true if the class name and other are equal, otherwise false.

    class BlogPost
       extend ActiveModel::Naming
    @@ -353,8 +330,7 @@ 

    BlogPost.model_name == 'BlogPost' # => true BlogPost.model_name == 'Blog Post' # => false

    -
    - +
    @@ -367,16 +343,11 @@

    -

    - - ===(other) +

    ===(other) +

    - - - - -
    -

    Equivalent to ==.

    +
    +

    Equivalent to ==.

    class BlogPost
       extend ActiveModel::Naming
    @@ -385,8 +356,7 @@ 

    BlogPost.model_name === 'BlogPost' # => true BlogPost.model_name === 'Blog Post' # => false

    -
    - +
    @@ -399,16 +369,11 @@

    -

    - - =~(regexp) +

    =~(regexp) +

    - - - - -
    -

    Equivalent to String#=~. Match the class name against the given regexp. Returns the position where the match starts or nil if there is no match.

    +
    +

    Equivalent to String#=~. Match the class name against the given regexp. Returns the position where the match starts or nil if there is no match.

    class BlogPost
       extend ActiveModel::Naming
    @@ -417,8 +382,7 @@ 

    BlogPost.model_name =~ /Post/ # => 4 BlogPost.model_name =~ /\d/ # => nil

    -
    - +
    @@ -431,16 +395,11 @@

    -

    - - eql?(other) +

    eql?(other) +

    - - - - -
    -

    Equivalent to String#eql?. Returns true if the class name and other have the same length and content, otherwise false.

    +
    +

    Equivalent to String#eql?. Returns true if the class name and other have the same length and content, otherwise false.

    class BlogPost
       extend ActiveModel::Naming
    @@ -449,8 +408,7 @@ 

    BlogPost.model_name.eql?('BlogPost') # => true BlogPost.model_name.eql?('Blog Post') # => false

    -
    - +
    @@ -463,15 +421,10 @@

    -

    - - human(options = {}) - -

    +

    human(options = {})

    - -
    -

    Transform the model name into a more human format, using I18n. By default, it will underscore then humanize the class name.

    +
    +

    Transform the model name into a more human format, using I18n. By default, it will underscore then humanize the class name.

    class BlogPost
       extend ActiveModel::Naming
    @@ -481,8 +434,7 @@ 

    Specify options with additional translating options.

    -
    - +
    @@ -515,16 +467,11 @@

    -

    - - match?(regexp) +

    match?(regexp) +

    - - - - -
    -

    Equivalent to String#match?. Match the class name against the given regexp. Returns true if there is a match, otherwise false.

    +
    +

    Equivalent to String#match?. Match the class name against the given regexp. Returns true if there is a match, otherwise false.

    class BlogPost
       extend ActiveModel::Naming
    @@ -533,8 +480,7 @@ 

    BlogPost.model_name.match?(/Post/) # => true BlogPost.model_name.match?(/\d/) # => false

    -
    - +
    @@ -547,16 +493,11 @@

    -

    - - to_s() +

    to_s() +

    - - - - -
    -

    Returns the class name.

    +
    +

    Returns the class name.

    class BlogPost
       extend ActiveModel::Naming
    @@ -564,8 +505,7 @@ 

    BlogPost.model_name.to_s # => "BlogPost"

    -
    - +
    @@ -578,18 +518,12 @@

    -

    - - to_str() +

    to_str() +

    - - - - -
    -

    Equivalent to to_s.

    -
    - +
    +

    Equivalent to to_s.

    +
    @@ -614,17 +548,9 @@

    -

    - - uncountable?() - -

    +

    uncountable?()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Naming.html b/src/classes/ActiveModel/Naming.html index ab2f2dfc5f..a67591592f 100644 --- a/src/classes/ActiveModel/Naming.html +++ b/src/classes/ActiveModel/Naming.html @@ -104,15 +104,10 @@

    Methods

    Class Public methods

    -

    - - param_key(record_or_class) - -

    +

    param_key(record_or_class)

    - -
    -

    Returns string to use for params names. It differs for namespaced models regarding whether it’s inside isolated engine.

    +
    +

    Returns string to use for params names. It differs for namespaced models regarding whether it’s inside isolated engine.

    # For isolated engine:
     ActiveModel::Naming.param_key(Blog::Post) # => "post"
    @@ -120,8 +115,7 @@ 

    # For shared engine: ActiveModel::Naming.param_key(Blog::Post) # => "blog_post"

    -
    - +
    @@ -146,21 +140,15 @@

    -

    - - plural(record_or_class) - -

    +

    plural(record_or_class)

    - -
    -

    Returns the plural class name of a record or class.

    +
    +

    Returns the plural class name of a record or class.

    ActiveModel::Naming.plural(post)             # => "posts"
     ActiveModel::Naming.plural(Highrise::Person) # => "highrise_people"
     
    -
    - +
    @@ -185,15 +173,10 @@

    -

    - - route_key(record_or_class) - -

    +

    route_key(record_or_class)

    - -
    -

    Returns string to use while generating route names. It differs for namespaced models regarding whether it’s inside isolated engine.

    +
    +

    Returns string to use while generating route names. It differs for namespaced models regarding whether it’s inside isolated engine.

    # For isolated engine:
     ActiveModel::Naming.route_key(Blog::Post) # => "posts"
    @@ -203,8 +186,7 @@ 

    The route key also considers if the noun is uncountable and, in such cases, automatically appends _index.

    -
    - +
    @@ -229,21 +211,15 @@

    -

    - - singular(record_or_class) - -

    +

    singular(record_or_class)

    - -
    -

    Returns the singular class name of a record or class.

    +
    +

    Returns the singular class name of a record or class.

    ActiveModel::Naming.singular(post)             # => "post"
     ActiveModel::Naming.singular(Highrise::Person) # => "highrise_person"
     
    -
    - +
    @@ -268,15 +244,10 @@

    -

    - - singular_route_key(record_or_class) - -

    +

    singular_route_key(record_or_class)

    - -
    -

    Returns string to use while generating route names. It differs for namespaced models regarding whether it’s inside isolated engine.

    +
    +

    Returns string to use while generating route names. It differs for namespaced models regarding whether it’s inside isolated engine.

    # For isolated engine:
     ActiveModel::Naming.singular_route_key(Blog::Post) # => "post"
    @@ -284,8 +255,7 @@ 

    # For shared engine: ActiveModel::Naming.singular_route_key(Blog::Post) # => "blog_post"

    -
    - +
    @@ -310,21 +280,15 @@

    -

    - - uncountable?(record_or_class) - -

    +

    uncountable?(record_or_class)

    - -
    -

    Identifies whether the class name of a record or class is uncountable.

    +
    +

    Identifies whether the class name of a record or class is uncountable.

    ActiveModel::Naming.uncountable?(Sheep) # => true
     ActiveModel::Naming.uncountable?(Post)  # => false
     
    -
    - +
    @@ -353,15 +317,10 @@

    Instance Public methods

    -

    - - model_name() - -

    +

    model_name()

    - -
    -

    Returns an ActiveModel::Name object for module. It can be used to retrieve all kinds of naming-related information (See ActiveModel::Name for more information).

    +
    +

    Returns an ActiveModel::Name object for module. It can be used to retrieve all kinds of naming-related information (See ActiveModel::Name for more information).

    class Person
       extend ActiveModel::Naming
    @@ -372,8 +331,7 @@ 

    Person.model_name.singular # => "person" Person.model_name.plural # => "people"

    -
    - +
    diff --git a/src/classes/ActiveModel/NestedError.html b/src/classes/ActiveModel/NestedError.html index 18f5009007..c060845a53 100644 --- a/src/classes/ActiveModel/NestedError.html +++ b/src/classes/ActiveModel/NestedError.html @@ -77,17 +77,9 @@

    Attributes

    Class Public methods

    -

    - - new(base, inner_error, override_options = {}) - -

    +

    new(base, inner_error, override_options = {})

    -
    - -
    - diff --git a/src/classes/ActiveModel/SecurePassword/ClassMethods.html b/src/classes/ActiveModel/SecurePassword/ClassMethods.html index 79719ee356..af58e8ebc2 100644 --- a/src/classes/ActiveModel/SecurePassword/ClassMethods.html +++ b/src/classes/ActiveModel/SecurePassword/ClassMethods.html @@ -72,15 +72,10 @@

    Included Modules

    Instance Public methods

    -

    - - has_secure_password(attribute = :password, validations: true, reset_token: true) - -

    +

    has_secure_password(attribute = :password, validations: true, reset_token: true)

    - -
    -

    Adds methods to set and authenticate against a BCrypt password. This mechanism requires you to have a XXX_digest attribute, where XXX is the attribute name of your desired password.

    +
    +

    Adds methods to set and authenticate against a BCrypt password. This mechanism requires you to have a XXX_digest attribute, where XXX is the attribute name of your desired password.

    The following validations are added automatically:

    • @@ -178,8 +173,7 @@
      Using # raises ActiveSupport::MessageVerifier::InvalidSignature since the token is expired User.find_by_password_reset_token!(token) -
    - +
    diff --git a/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html b/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html index 1177ec459c..6bb7eec319 100644 --- a/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html +++ b/src/classes/ActiveModel/SecurePassword/InstanceMethodsOnActivation.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(attribute, reset_token:) - -

    +

    new(attribute, reset_token:)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Serialization.html b/src/classes/ActiveModel/Serialization.html index afa215257a..1e6d18fc23 100644 --- a/src/classes/ActiveModel/Serialization.html +++ b/src/classes/ActiveModel/Serialization.html @@ -124,15 +124,10 @@

    Methods

    Instance Public methods

    -

    - - serializable_hash(options = nil) - -

    +

    serializable_hash(options = nil)

    - -
    -

    Returns a serialized hash of your object.

    +
    +

    Returns a serialized hash of your object.

    class Person
       include ActiveModel::Serialization
    @@ -189,8 +184,7 @@ 

    user.serializable_hash(include: { notes: { only: 'title' }}) # => {"name" => "Napoleon", "notes" => [{"title"=>"Battle of Austerlitz"}]}

    -
    - +
    diff --git a/src/classes/ActiveModel/Serializers/JSON.html b/src/classes/ActiveModel/Serializers/JSON.html index 535f3bd04b..1f70f5fdc7 100644 --- a/src/classes/ActiveModel/Serializers/JSON.html +++ b/src/classes/ActiveModel/Serializers/JSON.html @@ -82,15 +82,10 @@

    Included Modules

    Instance Public methods

    -

    - - as_json(options = nil) - -

    +

    as_json(options = nil)

    - -
    -

    Returns a hash representing the model. Some configuration can be passed through options.

    +
    +

    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.

    @@ -169,8 +164,7 @@

    # { "comments" => [ { "body" => "Don't think too hard" } ], # "title" => "So I was thinking" } ] } -

    - +
    @@ -207,15 +201,10 @@

    -

    - - from_json(json, include_root = include_root_in_json) - -

    +

    from_json(json, include_root = include_root_in_json)

    - -
    -

    Sets the model attributes from a JSON string. Returns self.

    +
    +

    Sets the model attributes from a JSON string. Returns self.

    class Person
       include ActiveModel::Serializers::JSON
    @@ -250,8 +239,7 @@ 

    person.age # => 22 person.awesome # => true

    -
    - +
    diff --git a/src/classes/ActiveModel/Translation.html b/src/classes/ActiveModel/Translation.html index db4993eaf6..ea112c385c 100644 --- a/src/classes/ActiveModel/Translation.html +++ b/src/classes/ActiveModel/Translation.html @@ -114,22 +114,16 @@

    Attributes

    Instance Public methods

    -

    - - human_attribute_name(attribute, options = {}) - -

    +

    human_attribute_name(attribute, options = {})

    - -
    -

    Transforms attribute names into a more human format, such as “First name” instead of “first_name”.

    +
    +

    Transforms attribute names into a more human format, such as “First name” instead of “first_name”.

    Person.human_attribute_name("first_name") # => "First name"
     

    Specify options with additional translating options.

    -
    - +
    @@ -189,17 +183,11 @@

    -

    - - i18n_scope() - -

    +

    i18n_scope()

    - -
    -

    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.

    +
    @@ -224,17 +212,11 @@

    -

    - - lookup_ancestors() - -

    +

    lookup_ancestors()

    - -
    -

    When localizing a string, it goes through the lookup returned by this method, which is used in ActiveModel::Name#human, ActiveModel::Errors#full_messages and ActiveModel::Translation#human_attribute_name.

    -
    - +
    +

    When localizing a string, it goes through the lookup returned by this method, which is used in ActiveModel::Name#human, ActiveModel::Errors#full_messages and ActiveModel::Translation#human_attribute_name.

    +
    diff --git a/src/classes/ActiveModel/Type.html b/src/classes/ActiveModel/Type.html index 35ecf399b1..f6c41d8774 100644 --- a/src/classes/ActiveModel/Type.html +++ b/src/classes/ActiveModel/Type.html @@ -151,17 +151,11 @@

    Methods

    Class Public methods

    -

    - - register(type_name, klass = nil, &block) - -

    +

    register(type_name, klass = nil, &block)

    - -
    -

    Add a new type to the registry, allowing it to be referenced as a symbol by attribute.

    -
    - +
    +

    Add a new type to the registry, allowing it to be referenced as a symbol by attribute.

    +
    diff --git a/src/classes/ActiveModel/Type/BigInteger.html b/src/classes/ActiveModel/Type/BigInteger.html index 0abeb427e9..49a185fea8 100644 --- a/src/classes/ActiveModel/Type/BigInteger.html +++ b/src/classes/ActiveModel/Type/BigInteger.html @@ -86,17 +86,9 @@

    Methods

    Instance Public methods

    -

    - - serializable?(value, &) - -

    +

    serializable?(value, &)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Binary.html b/src/classes/ActiveModel/Type/Binary.html index 079c4db726..0abcfd796c 100644 --- a/src/classes/ActiveModel/Type/Binary.html +++ b/src/classes/ActiveModel/Type/Binary.html @@ -96,17 +96,9 @@

    Methods

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -131,17 +123,9 @@

    -

    - - cast(value) - -

    +

    cast(value)

    -
    - -
    - @@ -172,17 +156,9 @@

    -

    - - changed_in_place?(raw_old_value, value) - -

    +

    changed_in_place?(raw_old_value, value)

    -
    - -
    - @@ -208,17 +184,9 @@

    -

    - - serialize(value) - -

    +

    serialize(value)

    -
    - -
    - @@ -244,17 +212,9 @@

    -

    - - type() - -

    +

    type()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Date.html b/src/classes/ActiveModel/Type/Date.html index 5d6004d80f..d23f6db604 100644 --- a/src/classes/ActiveModel/Type/Date.html +++ b/src/classes/ActiveModel/Type/Date.html @@ -128,17 +128,9 @@

    Constants

    Instance Public methods

    -

    - - type() - -

    +

    type()

    -
    - -
    - @@ -163,17 +155,9 @@

    -

    - - type_cast_for_schema(value) - -

    +

    type_cast_for_schema(value)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/DateTime.html b/src/classes/ActiveModel/Type/DateTime.html index 762112b2c6..2f40c64383 100644 --- a/src/classes/ActiveModel/Type/DateTime.html +++ b/src/classes/ActiveModel/Type/DateTime.html @@ -128,17 +128,9 @@

    Included Modules

    Instance Public methods

    -

    - - type() - -

    +

    type()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Decimal.html b/src/classes/ActiveModel/Type/Decimal.html index 50679c1681..6fb89adc98 100644 --- a/src/classes/ActiveModel/Type/Decimal.html +++ b/src/classes/ActiveModel/Type/Decimal.html @@ -144,17 +144,9 @@

    Constants

    Instance Public methods

    -

    - - type() - -

    +

    type()

    -
    - -
    - @@ -179,17 +171,9 @@

    -

    - - type_cast_for_schema(value) - -

    +

    type_cast_for_schema(value)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Float.html b/src/classes/ActiveModel/Type/Float.html index a9deb13abe..6545028c89 100644 --- a/src/classes/ActiveModel/Type/Float.html +++ b/src/classes/ActiveModel/Type/Float.html @@ -127,17 +127,9 @@

    Included Modules

    Instance Public methods

    -

    - - type() - -

    +

    type()

    -
    - -
    - @@ -162,17 +154,9 @@

    -

    - - type_cast_for_schema(value) - -

    +

    type_cast_for_schema(value)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/ImmutableString.html b/src/classes/ActiveModel/Type/ImmutableString.html index bc54cb421a..71326e9f47 100644 --- a/src/classes/ActiveModel/Type/ImmutableString.html +++ b/src/classes/ActiveModel/Type/ImmutableString.html @@ -120,17 +120,9 @@

    Included Modules

    Class Public methods

    -

    - - new(**args) - -

    +

    new(**args)

    -
    - -
    - @@ -161,17 +153,9 @@

    Instance Public methods

    -

    - - serialize(value) - -

    +

    serialize(value)

    -
    - -
    - @@ -201,17 +185,9 @@

    -

    - - type() - -

    +

    type()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Integer.html b/src/classes/ActiveModel/Type/Integer.html index b54a970268..c510b6bd91 100644 --- a/src/classes/ActiveModel/Type/Integer.html +++ b/src/classes/ActiveModel/Type/Integer.html @@ -159,17 +159,9 @@

    Constants

    Class Public methods

    -

    - - new(**) - -

    +

    new(**)

    -
    - -
    - @@ -200,17 +192,9 @@

    Instance Public methods

    -

    - - deserialize(value) - -

    +

    deserialize(value)

    -
    - -
    - @@ -236,17 +220,9 @@

    -

    - - serializable?(value) - -

    +

    serializable?(value)

    -
    - -
    - @@ -274,17 +250,9 @@

    -

    - - serialize(value) - -

    +

    serialize(value)

    -
    - -
    - @@ -326,17 +294,9 @@

    -

    - - type() - -

    +

    type()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html b/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html index 107712da65..c718eb0843 100644 --- a/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html +++ b/src/classes/ActiveModel/Type/SerializeCastValue/ClassMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - serialize_cast_value_compatible?() - -

    +

    serialize_cast_value_compatible?()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html b/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html index 68e5842c7b..2181141de8 100644 --- a/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html +++ b/src/classes/ActiveModel/Type/SerializeCastValue/DefaultImplementation.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - serialize_cast_value(value) - -

    +

    serialize_cast_value(value)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/String.html b/src/classes/ActiveModel/Type/String.html index 1282029960..bb800b9e0d 100644 --- a/src/classes/ActiveModel/Type/String.html +++ b/src/classes/ActiveModel/Type/String.html @@ -78,17 +78,9 @@

    Methods

    Instance Public methods

    -

    - - changed_in_place?(raw_old_value, new_value) - -

    +

    changed_in_place?(raw_old_value, new_value)

    -
    - -
    - @@ -115,17 +107,9 @@

    -

    - - to_immutable_string() - -

    +

    to_immutable_string()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Time.html b/src/classes/ActiveModel/Type/Time.html index f3268630a2..b4fddfd071 100644 --- a/src/classes/ActiveModel/Type/Time.html +++ b/src/classes/ActiveModel/Type/Time.html @@ -129,17 +129,9 @@

    Included Modules

    Instance Public methods

    -

    - - type() - -

    +

    type()

    -
    - -
    - @@ -164,17 +156,9 @@

    -

    - - user_input_in_time_zone(value) - -

    +

    user_input_in_time_zone(value)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Type/Value.html b/src/classes/ActiveModel/Type/Value.html index e5a876ae9c..06af5a4b23 100644 --- a/src/classes/ActiveModel/Type/Value.html +++ b/src/classes/ActiveModel/Type/Value.html @@ -167,17 +167,11 @@

    Attributes

    Class Public methods

    -

    - - new(precision: nil, limit: nil, scale: nil) - -

    +

    new(precision: nil, limit: nil, scale: nil)

    - -
    -

    Initializes a type with three basic configuration settings: precision, limit, and scale. The Value base class does not define behavior for these settings. It uses them for equality comparison and hash key generation only.

    -
    - +
    +

    Initializes a type with three basic configuration settings: precision, limit, and scale. The Value base class does not define behavior for these settings. It uses them for equality comparison and hash key generation only.

    +
    @@ -209,22 +203,16 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    -
    - -
    - -
    - Also aliased as: eql? -
    +

    + Also aliased as: + + eql?. +

    @@ -251,17 +239,9 @@

    -

    - - as_json(*) - -

    +

    as_json(*)

    -
    - -
    - @@ -286,17 +266,9 @@

    -

    - - assert_valid_value(_) - -

    +

    assert_valid_value(_)

    -
    - -
    - @@ -320,21 +292,15 @@

    -

    - - cast(value) - -

    +

    cast(value)

    - -
    -

    Type casts a value from user input (e.g. from a setter). This value may be a string from the form builder, or a ruby object passed to a setter. There is currently no way to differentiate between which source it came from.

    +
    +

    Type casts a value from user input (e.g. from a setter). This value may be a string from the form builder, or a ruby object passed to a setter. There is currently no way to differentiate between which source it came from.

    The return value of this method will be returned from ActiveRecord::AttributeMethods::Read#read_attribute. See also: Value#cast_value.

    value The raw input, as provided to the attribute setter.

    -
    - +
    @@ -359,17 +325,11 @@

    -

    - - changed?(old_value, new_value, _new_value_before_type_cast) - -

    +

    changed?(old_value, new_value, _new_value_before_type_cast)

    - -
    -

    Determines whether a value has changed for dirty checking. old_value and new_value will always be type-cast. Types should not need to override this method.

    -
    - +
    +

    Determines whether a value has changed for dirty checking. old_value and new_value will always be type-cast. Types should not need to override this method.

    +
    @@ -394,15 +354,10 @@

    -

    - - changed_in_place?(raw_old_value, new_value) - -

    +

    changed_in_place?(raw_old_value, new_value)

    - -
    -

    Determines whether the mutable value has been modified since it was read. Returns false by default. If your type returns an object which could be mutated, you should override this method. You will need to either:

    +
    +

    Determines whether the mutable value has been modified since it was read. Returns false by default. If your type returns an object which could be mutated, you should override this method. You will need to either:

    @@ -415,8 +370,7 @@

    raw_old_value The original value, before being passed to deserialize.

    new_value The current value, after type casting.

    -

    - +
    @@ -441,19 +395,13 @@

    -

    - - deserialize(value) - -

    +

    deserialize(value)

    - -
    -

    Converts a value from database input to the appropriate ruby type. The return value of this method will be returned from ActiveRecord::AttributeMethods::Read#read_attribute. The default implementation just calls Value#cast.

    +
    +

    Converts a value from database input to the appropriate ruby type. The return value of this method will be returned from ActiveRecord::AttributeMethods::Read#read_attribute. The default implementation just calls Value#cast.

    value The raw input, as provided from the database.

    -
    - +
    @@ -478,24 +426,17 @@

    -

    - - eql?(other) - -

    +

    eql?(other)

    -
    - -
    - -
    - Alias for: == -
    +

    + Alias for: + ==. +

    @@ -503,17 +444,9 @@

    -

    - - hash() - -

    +

    hash()

    -
    - -
    - @@ -538,17 +471,11 @@

    -

    - - serializable?(value, &) - -

    +

    serializable?(value, &)

    - -
    -

    Returns true if this type can convert value to a type that is usable by the database. For example a boolean type can return true if the value parameter is a Ruby boolean, but may return false if the value parameter is some other object.

    -
    - +
    +

    Returns true if this type can convert value to a type that is usable by the database. For example a boolean type can return true if the value parameter is a Ruby boolean, but may return false if the value parameter is some other object.

    +
    @@ -573,17 +500,11 @@

    -

    - - serialize(value) - -

    +

    serialize(value)

    - -
    -

    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 String, Numeric, Date, Time, Symbol, true, false, or nil.

    +
    @@ -608,17 +529,11 @@

    -

    - - type() - -

    +

    type()

    - -
    -

    Returns the unique type name as a Symbol. Subclasses should override this method.

    -
    - +
    +

    Returns the unique type name as a Symbol. Subclasses should override this method.

    +
    @@ -645,17 +560,11 @@

    Instance Private methods

    -

    - - cast_value(value) - -

    +

    cast_value(value)

    - -
    -

    Convenience method for types which do not need separate type casting behavior for user and database inputs. Called by Value#cast for values except nil.

    -
    - +
    +

    Convenience method for types which do not need separate type casting behavior for user and database inputs. Called by Value#cast for values except nil.

    +
    diff --git a/src/classes/ActiveModel/UnknownAttributeError.html b/src/classes/ActiveModel/UnknownAttributeError.html index 0a53a14011..1e557b6469 100644 --- a/src/classes/ActiveModel/UnknownAttributeError.html +++ b/src/classes/ActiveModel/UnknownAttributeError.html @@ -103,17 +103,9 @@

    Attributes

    Class Public methods

    -

    - - new(record, attribute) - -

    +

    new(record, attribute)

    -
    - -
    - diff --git a/src/classes/ActiveModel/ValidationError.html b/src/classes/ActiveModel/ValidationError.html index 6a6a4efae4..13ec447940 100644 --- a/src/classes/ActiveModel/ValidationError.html +++ b/src/classes/ActiveModel/ValidationError.html @@ -92,17 +92,9 @@

    Attributes

    Class Public methods

    -

    - - new(model) - -

    +

    new(model)

    -
    - -
    - diff --git a/src/classes/ActiveModel/Validations.html b/src/classes/ActiveModel/Validations.html index 6a1e2907ff..266c13308e 100644 --- a/src/classes/ActiveModel/Validations.html +++ b/src/classes/ActiveModel/Validations.html @@ -190,15 +190,10 @@

    Included Modules

    Instance Public methods

    -

    - - errors() - -

    +

    errors()

    - -
    -

    Returns the Errors object that holds all information about attribute error messages.

    +
    +

    Returns the Errors object that holds all information about attribute error messages.

    class Person
       include ActiveModel::Validations
    @@ -211,8 +206,7 @@ 

    person.valid? # => false person.errors # => #<ActiveModel::Errors:0x007fe603816640 @messages={name:["can't be blank"]}>

    -
    - +
    @@ -237,17 +231,9 @@

    -

    - - freeze() - -

    +

    freeze()

    -
    - -
    - @@ -275,15 +261,10 @@

    -

    - - invalid?(context = nil) - -

    +

    invalid?(context = nil)

    - -
    -

    Performs the opposite of valid?. Returns true if errors were added, false otherwise.

    +
    +

    Performs the opposite of valid?. Returns true if errors were added, false otherwise.

    class Person
       include ActiveModel::Validations
    @@ -312,8 +293,7 @@ 

    person.invalid? # => false person.invalid?(:new) # => true

    -
    - +
    @@ -338,15 +318,10 @@

    -

    - - valid?(context = nil) - -

    +

    valid?(context = nil)

    - -
    -

    Runs all the specified validations and returns true if no errors were added otherwise false.

    +
    +

    Runs all the specified validations and returns true if no errors were added otherwise false.

    class Person
       include ActiveModel::Validations
    @@ -375,13 +350,14 @@ 

    person.valid? # => true person.valid?(:new) # => false

    -
    - +
    -
    - Also aliased as: validate -
    +

    + Also aliased as: + + validate. +

    @@ -410,24 +386,17 @@

    -

    - - validate(context = nil) - -

    +

    validate(context = nil)

    -
    - -
    - -
    - Alias for: valid? -
    +

    + Alias for: + valid?. +

    @@ -435,19 +404,13 @@

    -

    - - validate!(context = nil) - -

    +

    validate!(context = nil)

    - -
    -

    Runs all the validations within the specified context. Returns true if no errors are found, raises ValidationError otherwise.

    +
    +

    Runs all the validations within the specified context. Returns true if no errors are found, raises ValidationError otherwise.

    Validations with no :on option will run no matter the context. Validations with some :on option will only run in the specified context.

    -
    - +
    @@ -472,15 +435,10 @@

    -

    - - validates_with(*args, &block) - -

    +

    validates_with(*args, &block)

    - -
    -

    Passes the record off to the class or classes specified and allows them to add errors based on more complex conditions.

    +
    +

    Passes the record off to the class or classes specified and allows them to add errors based on more complex conditions.

    class Person
       include ActiveModel::Validations
    @@ -511,8 +469,7 @@ 

    Standard configuration options (:on, :if and :unless), which are available on the class version of validates_with, should instead be placed on the validates method as these are applied and tested in the callback.

    If you pass any additional configuration options, they will be passed to the class and available as options, please refer to the class version of this method for more information.

    -

    - +
    @@ -543,17 +500,11 @@

    -

    - - validation_context() - -

    +

    validation_context()

    - -
    -

    Returns the context when running validations.

    -
    - +
    +

    Returns the context when running validations.

    +
    @@ -581,17 +532,9 @@

    Instance Private methods

    -

    - - raise_validation_error() - -

    +

    raise_validation_error()

    -
    - -
    - diff --git a/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html b/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html index f16ffa6232..2f73781881 100644 --- a/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html +++ b/src/classes/ActiveModel/Validations/Callbacks/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - after_validation(*args, &block) - -

    +

    after_validation(*args, &block)

    - -
    -

    Defines a callback that will get called right after validation.

    +
    +

    Defines a callback that will get called right after validation.

    class Person
       include ActiveModel::Validations
    @@ -96,8 +91,7 @@ 

    person.valid? # => true person.status # => true

    -
    - +
    @@ -128,15 +122,10 @@

    -

    - - before_validation(*args, &block) - -

    +

    before_validation(*args, &block)

    - -
    -

    Defines a callback that will get called right before validation.

    +
    +

    Defines a callback that will get called right before validation.

    class Person
       include ActiveModel::Validations
    @@ -159,8 +148,7 @@ 

    person.valid? # => true person.name # => "bob"

    -
    - +
    diff --git a/src/classes/ActiveModel/Validations/ClassMethods.html b/src/classes/ActiveModel/Validations/ClassMethods.html index 1293829a54..b122727cee 100644 --- a/src/classes/ActiveModel/Validations/ClassMethods.html +++ b/src/classes/ActiveModel/Validations/ClassMethods.html @@ -94,15 +94,10 @@

    Methods

    Instance Public methods

    -

    - - attribute_method?(attribute) - -

    +

    attribute_method?(attribute)

    - -
    -

    Returns true if attribute is an attribute method, false otherwise.

    +
    +

    Returns true if attribute is an attribute method, false otherwise.

    class Person
       include ActiveModel::Validations
    @@ -113,8 +108,7 @@ 

    User.attribute_method?(:name) # => true User.attribute_method?(:age) # => false

    -
    - +
    @@ -139,15 +133,10 @@

    -

    - - clear_validators!() - -

    +

    clear_validators!()

    - -
    -

    Clears all of the validators and validations.

    +
    +

    Clears all of the validators and validations.

    Note that this will clear anything that is being used to validate the model for both the validates_with and validate methods. It clears the validators that are created with an invocation of validates_with and the callbacks that are set by an invocation of validate.

    @@ -181,8 +170,7 @@

    Person._validate_callbacks.empty?  # => true
     
    -

    - +
    @@ -208,15 +196,10 @@

    -

    - - validate(*args, &block) - -

    +

    validate(*args, &block)

    - -
    -

    Adds a validation method or block to the class. This is useful when overriding the validate instance method becomes too unwieldy and you’re looking for more descriptive declaration of your validations.

    +
    +

    Adds a validation method or block to the class. This is useful when overriding the validate instance method becomes too unwieldy and you’re looking for more descriptive declaration of your validations.

    This can be done with a symbol pointing to a method:

    @@ -271,8 +254,7 @@

    Options

    NOTE: Calling validate multiple times on the same method will overwrite previous definitions.

    -
    - +
    @@ -320,15 +302,10 @@

    Options

    -

    - - validates(*attributes) - -

    +

    validates(*attributes)

    - -
    -

    This method is a shortcut to all default validators and any custom validator classes ending in ‘Validator’. Note that Rails default validators can be overridden inside specific classes by creating custom validator classes in their place such as PresenceValidator.

    +
    +

    This method is a shortcut to all default validators and any custom validator classes ending in ‘Validator’. Note that Rails default validators can be overridden inside specific classes by creating custom validator classes in their place such as PresenceValidator.

    Examples of using the default Rails validators:

    @@ -417,8 +394,7 @@

    validates :password, presence: { if: :password_required?, message: 'is forgotten.' }, confirmation: true
     
    -

    - +
    @@ -463,15 +439,10 @@

    -

    - - validates!(*attributes) - -

    +

    validates!(*attributes)

    - -
    -

    This method is used to define validations that cannot be corrected by end users and are considered exceptional. So each validator defined with bang or :strict option set to true will always raise ActiveModel::StrictValidationFailed instead of adding error when validation fails. See validates for more information about the validation itself.

    +
    +

    This method is used to define validations that cannot be corrected by end users and are considered exceptional. So each validator defined with bang or :strict option set to true will always raise ActiveModel::StrictValidationFailed instead of adding error when validation fails. See validates for more information about the validation itself.

    class Person
       include ActiveModel::Validations
    @@ -485,8 +456,7 @@ 

    person.valid? # => ActiveModel::StrictValidationFailed: Name can't be blank

    -
    - +
    @@ -513,15 +483,10 @@

    -

    - - validates_each(*attr_names, &block) - -

    +

    validates_each(*attr_names, &block)

    - -
    -

    Validates each attribute against a block.

    +
    +

    Validates each attribute against a block.

    class Person
       include ActiveModel::Validations
    @@ -548,8 +513,7 @@ 

    Options

  • :unless - Specifies a method, proc, or string to call to determine if the validation should not occur (e.g. unless: :skip_validation, or unless: Proc.new { |user| user.signup_step <= 2 }). The method, proc, or string should return or evaluate to a true or false value.

  • -
    - +
    @@ -574,15 +538,10 @@

    Options

    -

    - - validates_with(*args, &block) - -

    +

    validates_with(*args, &block)

    - -
    -

    Passes the record off to the class or classes specified and allows them to add errors based on more complex conditions.

    +
    +

    Passes the record off to the class or classes specified and allows them to add errors based on more complex conditions.

    class Person
       include ActiveModel::Validations
    @@ -639,8 +598,7 @@ 

    end end

    -
    - +
    @@ -680,15 +638,10 @@

    -

    - - validators() - -

    +

    validators()

    - -
    -

    List all validators that are being used to validate the model using validates_with method.

    +
    +

    List all validators that are being used to validate the model using validates_with method.

    class Person
       include ActiveModel::Validations
    @@ -705,8 +658,7 @@ 

    # #<StrictValidator:0x007fbff3204a30 @options={strict:true}> # ]

    -
    - +
    @@ -731,15 +683,10 @@

    -

    - - validators_on(*attributes) - -

    +

    validators_on(*attributes)

    - -
    -

    List all validators that are being used to validate a specific attribute.

    +
    +

    List all validators that are being used to validate a specific attribute.

    class Person
       include ActiveModel::Validations
    @@ -755,8 +702,7 @@ 

    # #<ActiveModel::Validations::PresenceValidator:0x007fe604914e60 @attributes=[:name], @options={}>, # ]

    -
    - +
    diff --git a/src/classes/ActiveModel/Validations/HelperMethods.html b/src/classes/ActiveModel/Validations/HelperMethods.html index 8baed2893b..bef235ae40 100644 --- a/src/classes/ActiveModel/Validations/HelperMethods.html +++ b/src/classes/ActiveModel/Validations/HelperMethods.html @@ -118,15 +118,10 @@

    Methods

    Instance Public methods

    -

    - - validates_absence_of(*attr_names) - -

    +

    validates_absence_of(*attr_names)

    - -
    -

    Validates that the specified attributes are blank (as defined by Object#present?).

    +
    +

    Validates that the specified attributes are blank (as defined by Object#present?).

    class Person < ActiveRecord::Base
       validates_absence_of :first_name
    @@ -141,8 +136,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -167,15 +161,10 @@

    -

    - - validates_acceptance_of(*attr_names) - -

    +

    validates_acceptance_of(*attr_names)

    - -
    -

    Encapsulates the pattern of wanting to validate the acceptance of a terms of service check box (or similar agreement).

    +
    +

    Encapsulates the pattern of wanting to validate the acceptance of a terms of service check box (or similar agreement).

    class Person < ActiveRecord::Base
       validates_acceptance_of :terms_of_service
    @@ -193,8 +182,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -219,15 +207,10 @@

    -

    - - validates_comparison_of(*attr_names) - -

    +

    validates_comparison_of(*attr_names)

    - -
    -

    Validates the value of a specified attribute fulfills all defined comparisons with another value, proc, or attribute.

    +
    +

    Validates the value of a specified attribute fulfills all defined comparisons with another value, proc, or attribute.

    class Person < ActiveRecord::Base
       validates_comparison_of :value, greater_than: 'the sum of its parts'
    @@ -275,8 +258,7 @@ 

    validates_comparison_of :preferred_name, other_than: :given_name, allow_nil: true end

    -
    - +
    @@ -301,15 +283,10 @@

    -

    - - validates_confirmation_of(*attr_names) - -

    +

    validates_confirmation_of(*attr_names)

    - -
    -

    Encapsulates the pattern of wanting to validate a password or email address field with a confirmation.

    +
    +

    Encapsulates the pattern of wanting to validate a password or email address field with a confirmation.

    Model:
       class Person < ActiveRecord::Base
    @@ -338,8 +315,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -364,15 +340,10 @@

    -

    - - validates_exclusion_of(*attr_names) - -

    +

    validates_exclusion_of(*attr_names)

    - -
    -

    Validates that the value of the specified attribute is not in a particular enumerable object.

    +
    +

    Validates that the value of the specified attribute is not in a particular enumerable object.

    class Person < ActiveRecord::Base
       validates_exclusion_of :username, in: %w( admin superuser ), message: "You don't belong here"
    @@ -394,8 +365,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -420,15 +390,10 @@

    -

    - - validates_format_of(*attr_names) - -

    +

    validates_format_of(*attr_names)

    - -
    -

    Validates whether the value of the specified attribute is of the correct form, going by the regular expression provided. You can require that the attribute matches the regular expression:

    +
    +

    Validates whether the value of the specified attribute is of the correct form, going by the regular expression provided. You can require that the attribute matches the regular expression:

    class Person < ActiveRecord::Base
       validates_format_of :email, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create
    @@ -469,8 +434,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -495,15 +459,10 @@

    -

    - - validates_inclusion_of(*attr_names) - -

    +

    validates_inclusion_of(*attr_names)

    - -
    -

    Validates whether the value of the specified attribute is available in a particular enumerable object.

    +
    +

    Validates whether the value of the specified attribute is available in a particular enumerable object.

    class Person < ActiveRecord::Base
       validates_inclusion_of :role, in: %w( admin contributor )
    @@ -524,8 +483,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -550,15 +508,10 @@

    -

    - - validates_length_of(*attr_names) - -

    +

    validates_length_of(*attr_names)

    - -
    -

    Validates that the specified attributes match the length restrictions supplied. Only one constraint option can be used at a time apart from :minimum and :maximum that can be combined together:

    +
    +

    Validates that the specified attributes match the length restrictions supplied. Only one constraint option can be used at a time apart from :minimum and :maximum that can be combined together:

    class Person < ActiveRecord::Base
       validates_length_of :first_name, maximum: 30
    @@ -606,13 +559,14 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    -
    - Also aliased as: validates_size_of -
    +

    + Also aliased as: + + validates_size_of. +

    @@ -636,15 +590,10 @@

    -

    - - validates_numericality_of(*attr_names) - -

    +

    validates_numericality_of(*attr_names)

    - -
    -

    Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if only_integer is false) or applying it to the regular expression /\A[+\-]?\d+\z/ (if only_integer is set to true). Precision of Kernel.Float values are guaranteed up to 15 digits.

    +
    +

    Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if only_integer is false) or applying it to the regular expression /\A[+\-]?\d+\z/ (if only_integer is set to true). Precision of Kernel.Float values are guaranteed up to 15 digits.

    class Person < ActiveRecord::Base
       validates_numericality_of :value, on: :create
    @@ -706,8 +655,7 @@ 

    validates_numericality_of :width, greater_than: :minimum_weight end

    -
    - +
    @@ -732,15 +680,10 @@

    -

    - - validates_presence_of(*attr_names) - -

    +

    validates_presence_of(*attr_names)

    - -
    -

    Validates that the specified attributes are not blank (as defined by Object#blank?).

    +
    +

    Validates that the specified attributes are not blank (as defined by Object#blank?).

    class Person < ActiveRecord::Base
       validates_presence_of :first_name
    @@ -759,8 +702,7 @@ 

    There is also a list of default options supported by every validator: :if, :unless, :on, :allow_nil, :allow_blank, and :strict. See ActiveModel::Validations::ClassMethods#validates for more information.

    -

    - +
    @@ -785,24 +727,17 @@

    -

    - - validates_size_of(*attr_names) - -

    +

    validates_size_of(*attr_names)

    -
    - -
    - -
    - Alias for: validates_length_of -
    +

    + Alias for: + validates_length_of. +

    diff --git a/src/classes/ActiveModel/Validator.html b/src/classes/ActiveModel/Validator.html index 5fea3351f5..1083e267f7 100644 --- a/src/classes/ActiveModel/Validator.html +++ b/src/classes/ActiveModel/Validator.html @@ -183,21 +183,15 @@

    Attributes

    Class Public methods

    -

    - - kind() - -

    +

    kind()

    - -
    -

    Returns the kind of the validator.

    +
    +

    Returns the kind of the validator.

    PresenceValidator.kind   # => :presence
     AcceptanceValidator.kind # => :acceptance
     
    -
    - +
    @@ -222,17 +216,11 @@

    -

    - - new(options = {}) - -

    +

    new(options = {})

    - -
    -

    Accepts options that will be made available through the options reader.

    -
    - +
    +

    Accepts options that will be made available through the options reader.

    +
    @@ -261,21 +249,15 @@

    Instance Public methods

    -

    - - kind() - -

    +

    kind()

    - -
    -

    Returns the kind for this validator.

    +
    +

    Returns the kind for this validator.

    PresenceValidator.new(attributes: [:username]).kind # => :presence
     AcceptanceValidator.new(attributes: [:terms]).kind  # => :acceptance
     
    -
    - +
    @@ -300,17 +282,11 @@

    -

    - - validate(record) - -

    +

    validate(record)

    - -
    -

    Override this method in subclasses with validation logic, adding errors to the records errors array where necessary.

    -
    - +
    +

    Override this method in subclasses with validation logic, adding errors to the records errors array where necessary.

    +
    diff --git a/src/classes/ActiveRecord.html b/src/classes/ActiveRecord.html index 9276ee5727..99b9ebefe0 100644 --- a/src/classes/ActiveRecord.html +++ b/src/classes/ActiveRecord.html @@ -1574,17 +1574,11 @@

    Attributes

    Class Public methods

    -

    - - action_on_strict_loading_violation - -

    +

    action_on_strict_loading_violation

    - -
    -

    Set the application to log or raise when an association violates strict loading. Defaults to :raise.

    -
    - +
    +

    Set the application to log or raise when an association violates strict loading. Defaults to :raise.

    +
    @@ -1608,15 +1602,10 @@

    -

    - - after_all_transactions_commit(&block) - -

    +

    after_all_transactions_commit(&block)

    - -
    -

    Registers a block to be called after all the current transactions have been committed.

    +
    +

    Registers a block to be called after all the current transactions have been committed.

    If there is no currently open transaction, the block is called immediately.

    @@ -1625,8 +1614,7 @@

    If any of the currently open transactions is rolled back, the block is never called.

    If multiple transactions are open across multiple databases, the block will be invoked if and once all of them have been committed. But note that nesting transactions across two distinct databases is a sharding anti-pattern that comes with a world of hurts.

    -

    - +
    @@ -1667,15 +1655,10 @@

    -

    - - async_query_executor - -

    +

    async_query_executor

    - -
    -

    Sets the async_query_executor for an application. By default the thread pool executor set to nil which will not run queries in the background. Applications must configure a thread pool executor to use this feature. Options are:

    +
    +

    Sets the async_query_executor for an application. By default the thread pool executor set to nil which will not run queries in the background. Applications must configure a thread pool executor to use this feature. Options are:

    * nil - Does not initialize a thread pool executor. Any async calls will be
     run in the foreground.
    @@ -1684,8 +1667,7 @@ 

    * :multi_thread_pool - Initializes a +Concurrent::ThreadPoolExecutor+ for each database connection. The initializer values are defined in the configuration hash.

    -
    - +
    @@ -1709,17 +1691,11 @@

    -

    - - db_warnings_action - -

    +

    db_warnings_action

    - -
    -

    The action to take when database query produces warning. Must be one of :ignore, :log, :raise, :report, or a custom proc. The default is :ignore.

    -
    - +
    +

    The action to take when database query produces warning. Must be one of :ignore, :log, :raise, :report, or a custom proc. The default is :ignore.

    +
    @@ -1743,17 +1719,9 @@

    -

    - - db_warnings_action=(action) - -

    +

    db_warnings_action=(action)

    -
    - -
    - @@ -1796,20 +1764,14 @@

    -

    - - db_warnings_ignore - -

    +

    db_warnings_ignore

    - -
    -

    Specify allowlist of database warnings. Can be a string, regular expression, or an error code from the database.

    +
    +

    Specify allowlist of database warnings. Can be a string, regular expression, or an error code from the database.

    ActiveRecord::Base.db_warnings_ignore = [/`SHOW WARNINGS` did not return the warnings/, "01000"]
     
    -
    - +
    @@ -1833,17 +1795,11 @@

    -

    - - default_timezone=(default_timezone) - -

    +

    default_timezone=(default_timezone)

    - -
    -

    Determines whether to use Time.utc (using :utc) or Time.local (using :local) when pulling dates and times from the database. This is set to :utc by default.

    -
    - +
    +

    Determines whether to use Time.utc (using :utc) or Time.local (using :local) when pulling dates and times from the database. This is set to :utc by default.

    +
    @@ -1872,17 +1828,9 @@

    -

    - - deprecated_associations_options() - -

    +

    deprecated_associations_options()

    -
    - -
    - @@ -1910,17 +1858,9 @@

    -

    - - deprecated_associations_options=(options) - -

    +

    deprecated_associations_options=(options)

    -
    - -
    - @@ -1957,17 +1897,11 @@

    -

    - - disconnect_all!() - -

    +

    disconnect_all!()

    - -
    -

    Explicitly closes all database connections in all pools.

    -
    - +
    +

    Explicitly closes all database connections in all pools.

    +
    @@ -1992,17 +1926,11 @@

    -

    - - dump_schema_after_migration - -

    +

    dump_schema_after_migration

    - -
    -

    Specify whether schema dump should happen at the end of the bin/rails db:migrate command. This is true by default, which is useful for the development environment. This should ideally be false in the production environment where dumping schema is rarely needed.

    -
    - +
    +

    Specify whether schema dump should happen at the end of the bin/rails db:migrate command. This is true by default, which is useful for the development environment. This should ideally be false in the production environment where dumping schema is rarely needed.

    +
    @@ -2026,17 +1954,11 @@

    -

    - - dump_schemas - -

    +

    dump_schemas

    - -
    -

    Specifies which database schemas to dump when calling db:schema:dump. If the value is :schema_search_path (the default), any schemas listed in schema_search_path are dumped. Use :all to dump all schemas regardless of schema_search_path, or a string of comma separated schemas for a custom list.

    -
    - +
    +

    Specifies which database schemas to dump when calling db:schema:dump. If the value is :schema_search_path (the default), any schemas listed in schema_search_path are dumped. Use :all to dump all schemas regardless of schema_search_path, or a string of comma separated schemas for a custom list.

    +
    @@ -2060,17 +1982,9 @@

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - @@ -2101,17 +2015,11 @@

    -

    - - error_on_ignored_order - -

    +

    error_on_ignored_order

    - -
    -

    Specifies if an error should be raised if the query has an order being ignored when doing batch queries. Useful in applications where the scope being ignored is error-worthy, rather than a warning.

    -
    - +
    +

    Specifies if an error should be raised if the query has an order being ignored when doing batch queries. Useful in applications where the scope being ignored is error-worthy, rather than a warning.

    +
    @@ -2135,17 +2043,11 @@

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Active Record as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Record as a Gem::Version.

    +
    @@ -2170,17 +2072,11 @@

    -

    - - generate_secure_token_on - -

    +

    generate_secure_token_on

    - -
    -

    Controls when to generate a value for has_secure_token declarations. Defaults to :create.

    -
    - +
    +

    Controls when to generate a value for has_secure_token declarations. Defaults to :create.

    +
    @@ -2204,17 +2100,11 @@

    -

    - - global_executor_concurrency=(global_executor_concurrency) - -

    +

    global_executor_concurrency=(global_executor_concurrency)

    - -
    -

    Set the global_executor_concurrency. This configuration value can only be used with the global thread pool async query executor.

    -
    - +
    +

    Set the global_executor_concurrency. This configuration value can only be used with the global thread pool async query executor.

    +
    @@ -2243,17 +2133,11 @@

    -

    - - lazily_load_schema_cache - -

    +

    lazily_load_schema_cache

    - -
    -

    Lazily load the schema cache. This option will load the schema cache when a connection is established rather than on boot.

    -
    - +
    +

    Lazily load the schema cache. This option will load the schema cache when a connection is established rather than on boot.

    +
    @@ -2277,17 +2161,9 @@

    -

    - - marshalling_format_version() - -

    +

    marshalling_format_version()

    -
    - -
    - @@ -2312,17 +2188,9 @@

    -

    - - marshalling_format_version=(value) - -

    +

    marshalling_format_version=(value)

    -
    - -
    - @@ -2347,17 +2215,11 @@

    -

    - - message_verifiers - -

    +

    message_verifiers

    - -
    -

    ActiveSupport::MessageVerifiers instance for Active Record. If you are using Rails, this will be set to Rails.application.message_verifiers.

    -
    - +
    +

    ActiveSupport::MessageVerifiers instance for Active Record. If you are using Rails, this will be set to Rails.application.message_verifiers.

    +
    @@ -2381,17 +2243,11 @@

    -

    - - migration_strategy - -

    +

    migration_strategy

    - -
    -

    Specify strategy to use for executing migrations.

    -
    - +
    +

    Specify strategy to use for executing migrations.

    +
    @@ -2415,17 +2271,11 @@

    -

    - - permanent_connection_checkout=(value) - -

    +

    permanent_connection_checkout=(value)

    - -
    -

    Defines whether ActiveRecord::Base.connection is allowed, deprecated, or entirely disallowed.

    -
    - +
    +

    Defines whether ActiveRecord::Base.connection is allowed, deprecated, or entirely disallowed.

    +
    @@ -2453,15 +2303,10 @@

    -

    - - protocol_adapters - -

    +

    protocol_adapters

    - -
    -

    Provides a mapping between database protocols/DBMSs and the underlying database adapter to be used. This is used only by the DATABASE_URL environment variable.

    +
    +

    Provides a mapping between database protocols/DBMSs and the underlying database adapter to be used. This is used only by the DATABASE_URL environment variable.

    Example

    @@ -2474,8 +2319,7 @@

    Example

    The protocols names are arbitrary, and external database adapters can be registered and set here.

    -
    - +
    @@ -2499,17 +2343,11 @@

    Example

    -

    - - queues - -

    +

    queues

    - -
    -

    Specifies the names of the queues used by background jobs.

    -
    - +
    +

    Specifies the names of the queues used by background jobs.

    +
    @@ -2533,17 +2371,11 @@

    -

    - - raise_int_wider_than_64bit - -

    +

    raise_int_wider_than_64bit

    - -
    -

    Application configurable boolean that denotes whether or not to raise an exception when the PostgreSQLAdapter is provided with an integer that is wider than signed 64bit representation

    -
    - +
    +

    Application configurable boolean that denotes whether or not to raise an exception when the PostgreSQLAdapter is provided with an integer that is wider than signed 64bit representation

    +
    @@ -2567,20 +2399,14 @@

    -

    - - schema_cache_ignored_table?(table_name) - -

    +

    schema_cache_ignored_table?(table_name)

    - -
    -

    Checks to see if the table_name is ignored by checking against the schema_cache_ignored_tables option.

    +
    +

    Checks to see if the table_name is ignored by checking against the schema_cache_ignored_tables option.

    ActiveRecord.schema_cache_ignored_table?(:developers)
     
    -
    - +
    @@ -2607,17 +2433,11 @@

    -

    - - schema_cache_ignored_tables - -

    +

    schema_cache_ignored_tables

    - -
    -

    A list of tables or regex’s to match tables to ignore when dumping the schema cache. For example if this is set to +[/^_/]+ the schema cache will not dump tables named with an underscore.

    -
    - +
    +

    A list of tables or regex’s to match tables to ignore when dumping the schema cache. For example if this is set to +[/^_/]+ the schema cache will not dump tables named with an underscore.

    +
    @@ -2641,17 +2461,11 @@

    -

    - - schema_format - -

    +

    schema_format

    - -
    -

    Specifies the format to use when dumping the database schema with Rails’ Rakefile. If :sql, the schema is dumped as (potentially database- specific) SQL statements. If :ruby, the schema is dumped as an ActiveRecord::Schema file which can be loaded into any database that supports migrations. Use :ruby if you want to have different database adapters for, e.g., your development and test environments. This can be overridden per-database in the database configuration.

    -
    - +
    +

    Specifies the format to use when dumping the database schema with Rails’ Rakefile. If :sql, the schema is dumped as (potentially database- specific) SQL statements. If :ruby, the schema is dumped as an ActiveRecord::Schema file which can be loaded into any database that supports migrations. Use :ruby if you want to have different database adapters for, e.g., your development and test environments. This can be overridden per-database in the database configuration.

    +
    @@ -2675,17 +2489,11 @@

    -

    - - schema_versions_formatter - -

    +

    schema_versions_formatter

    - -
    -

    Specify the formatter used by schema dumper to format versions information.

    -
    - +
    +

    Specify the formatter used by schema dumper to format versions information.

    +
    @@ -2709,17 +2517,11 @@

    -

    - - timestamped_migrations - -

    +

    timestamped_migrations

    - -
    -

    Specify whether or not to use timestamps for migration versions

    -
    - +
    +

    Specify whether or not to use timestamps for migration versions

    +
    @@ -2743,17 +2545,11 @@

    -

    - - use_yaml_unsafe_load - -

    +

    use_yaml_unsafe_load

    - -
    -

    Application configurable boolean that instructs the YAML Coder to use an unsafe load if set to true.

    -
    - +
    +

    Application configurable boolean that instructs the YAML Coder to use an unsafe load if set to true.

    +
    @@ -2777,17 +2573,11 @@

    -

    - - validate_migration_timestamps - -

    +

    validate_migration_timestamps

    - -
    -

    Specify whether or not to validate migration timestamps. When set, an error will be raised if a timestamp is more than a day ahead of the timestamp associated with the current time. timestamped_migrations must be set to true.

    -
    - +
    +

    Specify whether or not to validate migration timestamps. When set, an error will be raised if a timestamp is more than a day ahead of the timestamp associated with the current time. timestamped_migrations must be set to true.

    +
    @@ -2811,17 +2601,11 @@

    -

    - - verbose_query_logs - -

    +

    verbose_query_logs

    - -
    -

    Specifies if the methods calling database queries should be logged below their relevant queries. Defaults to false.

    -
    - +
    +

    Specifies if the methods calling database queries should be logged below their relevant queries. Defaults to false.

    +
    @@ -2845,17 +2629,11 @@

    -

    - - verify_foreign_keys_for_fixtures - -

    +

    verify_foreign_keys_for_fixtures

    - -
    -

    If true, Rails will verify all foreign keys in the database after loading fixtures. An error will be raised if there are any foreign key violations, indicating incorrectly written fixtures. Supported by PostgreSQL and SQLite.

    -
    - +
    +

    If true, Rails will verify all foreign keys in the database after loading fixtures. An error will be raised if there are any foreign key violations, indicating incorrectly written fixtures. Supported by PostgreSQL and SQLite.

    +
    @@ -2879,17 +2657,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Active Record as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Record as a Gem::Version.

    +
    @@ -2914,17 +2686,11 @@

    -

    - - with_transaction_isolation_level(isolation_level, &block) - -

    +

    with_transaction_isolation_level(isolation_level, &block)

    - -
    -

    Sets a transaction isolation level for all connection pools within the block.

    -
    - +
    +

    Sets a transaction isolation level for all connection pools within the block.

    +
    @@ -2953,17 +2719,11 @@

    -

    - - yaml_column_permitted_classes - -

    +

    yaml_column_permitted_classes

    - -
    -

    Application configurable array that provides additional permitted classes to Psych safe_load in the YAML Coder

    -
    - +
    +

    Application configurable array that provides additional permitted classes to Psych safe_load in the YAML Coder

    +
    diff --git a/src/classes/ActiveRecord/AdapterError.html b/src/classes/ActiveRecord/AdapterError.html index 7e2e3d468b..cbda3687ec 100644 --- a/src/classes/ActiveRecord/AdapterError.html +++ b/src/classes/ActiveRecord/AdapterError.html @@ -83,17 +83,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, connection_pool: nil) - -

    +

    new(message = nil, connection_pool: nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Aggregations/ClassMethods.html b/src/classes/ActiveRecord/Aggregations/ClassMethods.html index a782fb42a2..5c0280b36b 100644 --- a/src/classes/ActiveRecord/Aggregations/ClassMethods.html +++ b/src/classes/ActiveRecord/Aggregations/ClassMethods.html @@ -208,15 +208,10 @@

    Included Modules

    Instance Public methods

    -

    - - composed_of(part_id, options = {}) - -

    +

    composed_of(part_id, options = {})

    - -
    -

    Adds reader and writer methods for manipulating a value object: composed_of :address adds address and address=(new_address) methods.

    +
    +

    Adds reader and writer methods for manipulating a value object: composed_of :address adds address and address=(new_address) methods.

    Options are:

    • @@ -245,8 +240,7 @@

      constructor: Proc.new { |ip| IPAddr.new(ip, Socket::AF_INET) }, converter: Proc.new { |ip| ip.is_a?(Integer) ? IPAddr.new(ip, Socket::AF_INET) : IPAddr.new(ip.to_s) } -

    - +
    diff --git a/src/classes/ActiveRecord/Assertions/QueryAssertions.html b/src/classes/ActiveRecord/Assertions/QueryAssertions.html index 5cea11f2fc..dac7c5a7b6 100644 --- a/src/classes/ActiveRecord/Assertions/QueryAssertions.html +++ b/src/classes/ActiveRecord/Assertions/QueryAssertions.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - assert_no_queries(include_schema: false, &block) - -

    +

    assert_no_queries(include_schema: false, &block)

    - -
    -

    Asserts that no SQL queries are executed in the given block.

    +
    +

    Asserts that no SQL queries are executed in the given block.

    assert_no_queries { post.comments }
     
    @@ -87,8 +82,7 @@

    assert_no_queries(include_schema: true) { Post.columns }
     
    -

    - +
    @@ -113,15 +107,10 @@

    -

    - - assert_no_queries_match(match, include_schema: false, &block) - -

    +

    assert_no_queries_match(match, include_schema: false, &block)

    - -
    -

    Asserts that no SQL queries matching the pattern are executed in the given block.

    +
    +

    Asserts that no SQL queries matching the pattern are executed in the given block.

    assert_no_queries_match(/SELECT/i) { post.comments }
     
    @@ -130,8 +119,7 @@

    assert_no_queries_match(/FROM pg_attribute/i, include_schema: true) { Post.columns }
     
    -

    - +
    @@ -156,15 +144,10 @@

    -

    - - assert_queries_count(count = nil, include_schema: false, &block) - -

    +

    assert_queries_count(count = nil, include_schema: false, &block)

    - -
    -

    Asserts that the number of SQL queries executed in the given block matches the expected count.

    +
    +

    Asserts that the number of SQL queries executed in the given block matches the expected count.

    # Check for exact number of queries
     assert_queries_count(1) { Post.first }
    @@ -179,8 +162,7 @@ 

    assert_queries_count(1, include_schema: true) { Post.columns }
     
    -

    - +
    @@ -217,15 +199,10 @@

    -

    - - assert_queries_match(match, count: nil, include_schema: false, &block) - -

    +

    assert_queries_match(match, count: nil, include_schema: false, &block)

    - -
    -

    Asserts that the SQL queries executed in the given block match expected pattern.

    +
    +

    Asserts that the SQL queries executed in the given block match expected pattern.

    # Check for exact number of queries
     assert_queries_match(/LIMIT \?/, count: 1) { Post.first }
    @@ -238,8 +215,7 @@ 

    assert_queries_match(/FROM pg_attribute/i, include_schema: true) { Post.columns }
     
    -

    - +
    diff --git a/src/classes/ActiveRecord/Associations/ClassMethods.html b/src/classes/ActiveRecord/Associations/ClassMethods.html index f395a62e67..f47750d6df 100644 --- a/src/classes/ActiveRecord/Associations/ClassMethods.html +++ b/src/classes/ActiveRecord/Associations/ClassMethods.html @@ -978,15 +978,10 @@

    Methods

    Instance Public methods

    -

    - - belongs_to(name, scope = nil, **options) - -

    +

    belongs_to(name, scope = nil, **options)

    - -
    -

    Specifies a one-to-one association with another class. This method should only be used if this class contains the foreign key. If the other class contains the foreign key, then you should use has_one instead. See Is it a belongs_to or has_one association? for more detail on when to use has_one and when to use belongs_to.

    +
    +

    Specifies a one-to-one association with another class. This method should only be used if this class contains the foreign key. If the other class contains the foreign key, then you should use has_one instead. See Is it a belongs_to or has_one association? for more detail on when to use has_one and when to use belongs_to.

    Methods will be added for retrieval and query for a single associated object, for which this object holds an id:

    @@ -1138,8 +1133,7 @@

    Options

    belongs_to :account, strict_loading: true belongs_to :note, query_constraints: [:organization_id, :note_id]
    -
    - +
    @@ -1165,15 +1159,10 @@

    Options

    -

    - - has_and_belongs_to_many(name, scope = nil, **options, &extension) - -

    +

    has_and_belongs_to_many(name, scope = nil, **options, &extension)

    - -
    -

    Specifies a many-to-many relationship with another class. This associates two classes via an intermediate join table. Unless the join table is explicitly specified as an option, it is guessed using the lexical order of the class names. So a join between Developer and Project will give the default join table name of “developers_projects” because “D” precedes “P” alphabetically. Note that this precedence is calculated using the < operator for String. This means that if the strings are of different lengths, and the strings are equal when compared up to the shortest length, then the longer string is considered of higher lexical precedence than the shorter one. For example, one would expect the tables “paper_boxes” and “papers” to generate a join table name of “papers_paper_boxes” because of the length of the name “paper_boxes”, but it in fact generates a join table name of “paper_boxes_papers”. Be aware of this caveat, and use the custom :join_table option if you need to. If your tables share a common prefix, it will only appear once at the beginning. For example, the tables “catalog_categories” and “catalog_products” generate a join table name of “catalog_categories_products”.

    +
    +

    Specifies a many-to-many relationship with another class. This associates two classes via an intermediate join table. Unless the join table is explicitly specified as an option, it is guessed using the lexical order of the class names. So a join between Developer and Project will give the default join table name of “developers_projects” because “D” precedes “P” alphabetically. Note that this precedence is calculated using the < operator for String. This means that if the strings are of different lengths, and the strings are equal when compared up to the shortest length, then the longer string is considered of higher lexical precedence than the shorter one. For example, one would expect the tables “paper_boxes” and “papers” to generate a join table name of “papers_paper_boxes” because of the length of the name “paper_boxes”, but it in fact generates a join table name of “paper_boxes_papers”. Be aware of this caveat, and use the custom :join_table option if you need to. If your tables share a common prefix, it will only appear once at the beginning. For example, the tables “catalog_categories” and “catalog_products” generate a join table name of “catalog_categories_products”.

    The join table should not have a primary key or a model associated with it. You must manually generate the join table with a migration such as this:

    @@ -1333,8 +1322,7 @@

    Options

    has_and_belongs_to_many :categories, -> { readonly } has_and_belongs_to_many :categories, strict_loading: true
    -
    - +
    @@ -1393,15 +1381,10 @@

    Options

    -

    - - has_many(name, scope = nil, **options, &extension) - -

    +

    has_many(name, scope = nil, **options, &extension)

    - -
    -

    Specifies a one-to-many association. The following methods for retrieval and query of collections of associated objects will be added:

    +
    +

    Specifies a one-to-many association. The following methods for retrieval and query of collections of associated objects will be added:

    collection is a placeholder for the symbol passed as the name argument, so has_many :clients would add among others clients.empty?.

    collection
    @@ -1634,8 +1617,7 @@

    Options

    has_many :comments, query_constraints: [:blog_id, :post_id] has_many :comments, index_errors: :nested_attributes_order -
    - +
    @@ -1661,15 +1643,10 @@

    Options

    -

    - - has_one(name, scope = nil, **options) - -

    +

    has_one(name, scope = nil, **options)

    - -
    -

    Specifies a one-to-one association with another class. This method should only be used if the other class contains the foreign key. If the current class contains the foreign key, then you should use belongs_to instead. See Is it a belongs_to or has_one association? for more detail on when to use has_one and when to use belongs_to.

    +
    +

    Specifies a one-to-one association with another class. This method should only be used if the other class contains the foreign key. If the current class contains the foreign key, then you should use belongs_to instead. See Is it a belongs_to or has_one association? for more detail on when to use has_one and when to use belongs_to.

    The following methods for retrieval and query of a single associated object will be added:

    @@ -1838,8 +1815,7 @@

    Options

    has_one :credit_card, strict_loading: true has_one :employment_record_book, query_constraints: [:organization_id, :employee_id] -
    - +
    diff --git a/src/classes/ActiveRecord/Associations/CollectionProxy.html b/src/classes/ActiveRecord/Associations/CollectionProxy.html index 365f5e4b93..cf04a69c3d 100644 --- a/src/classes/ActiveRecord/Associations/CollectionProxy.html +++ b/src/classes/ActiveRecord/Associations/CollectionProxy.html @@ -268,15 +268,10 @@

    Methods

    Instance Public methods

    -

    - - <<(*records) - -

    +

    <<(*records)

    - -
    -

    Adds one or more records to the collection by setting their foreign keys to the association’s primary key. Since << flattens its argument list and inserts each record, push and concat behave identically. Returns self so several appends may be chained together.

    +
    +

    Adds one or more records to the collection by setting their foreign keys to the association’s primary key. Since << flattens its argument list and inserts each record, push and concat behave identically. Returns self so several appends may be chained together.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -295,13 +290,14 @@ 

    # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # ]

    -
    - +
    -
    - Also aliased as: push, append, concat -
    +

    + Also aliased as: + + push, append, concat. +

    @@ -325,15 +321,10 @@

    -

    - - ==(other) - -

    +

    ==(other)

    - -
    -

    Equivalent to Array#==. Returns true if the two arrays contain the same number of elements and if each element is equal to the corresponding element in the other array, otherwise returns false.

    +
    +

    Equivalent to Array#==. Returns true if the two arrays contain the same number of elements and if each element is equal to the corresponding element in the other array, otherwise returns false.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -358,8 +349,7 @@ 

    person.pets == other # => true

    -
    - +
    @@ -384,16 +374,11 @@

    -

    - - any?() +

    any?() +

    - - - - -
    -

    Returns true if the collection is not empty.

    +
    +

    Returns true if the collection is not empty.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -424,8 +409,7 @@ 

    end # => true

    -
    - +
    @@ -438,24 +422,17 @@

    -

    - - append(*records) - -

    +

    append(*records)

    -
    - -
    - -
    - Alias for: << -
    +

    + Alias for: + <<. +

    @@ -463,15 +440,10 @@

    -

    - - build(attributes = {}, &block) - -

    +

    build(attributes = {}, &block)

    - -
    -

    Returns a new object of the collection type that has been instantiated with attributes and linked to this object, but have not yet been saved. You can pass an array of attributes hashes, this will return an array with the new objects.

    +
    +

    Returns a new object of the collection type that has been instantiated with attributes and linked to this object, but have not yet been saved. You can pass an array of attributes hashes, this will return an array with the new objects.

    class Person
       has_many :pets
    @@ -493,13 +465,14 @@ 

    person.pets.size # => 5 # size of the collection person.pets.count # => 0 # count from database

    -
    - +
    -
    - Also aliased as: new -
    +

    + Also aliased as: + + new. +

    @@ -523,17 +496,9 @@

    -

    - - calculate(operation, column_name) - -

    +

    calculate(operation, column_name)

    -
    - -
    - @@ -558,17 +523,11 @@

    -

    - - clear() - -

    +

    clear()

    - -
    -

    Equivalent to delete_all. The difference is that returns self, instead of an array with the deleted objects, so methods can be chained. See delete_all for more information. Note that because delete_all removes records by directly running an SQL query into the database, the updated_at column of the object is not changed.

    -
    - +
    +

    Equivalent to delete_all. The difference is that returns self, instead of an array with the deleted objects, so methods can be chained. See delete_all for more information. Note that because delete_all removes records by directly running an SQL query into the database, the updated_at column of the object is not changed.

    +
    @@ -594,24 +553,17 @@

    -

    - - concat(*records) - -

    +

    concat(*records)

    -
    - -
    - -
    - Alias for: << -
    +

    + Alias for: + <<. +

    @@ -619,16 +571,11 @@

    -

    - - count(column_name = nil, &block) +

    count(column_name = nil, &block) +

    - - - - -
    -

    Count all records.

    +
    +

    Count all records.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -648,8 +595,7 @@ 

    person.pets.count { |pet| pet.name.include?('-') } # => 2
     
    -

    - +
    @@ -662,15 +608,10 @@

    -

    - - create(attributes = {}, &block) - -

    +

    create(attributes = {}, &block)

    - -
    -

    Returns a new object of the collection type that has been instantiated with attributes, linked to this object and that has already been saved (if it passes the validations).

    +
    +

    Returns a new object of the collection type that has been instantiated with attributes, linked to this object and that has already been saved (if it passes the validations).

    class Person
       has_many :pets
    @@ -695,8 +636,7 @@ 

    # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # ]

    -
    - +
    @@ -721,15 +661,10 @@

    -

    - - create!(attributes = {}, &block) - -

    +

    create!(attributes = {}, &block)

    - -
    -

    Like create, except that if the record is invalid, raises an exception.

    +
    +

    Like create, except that if the record is invalid, raises an exception.

    class Person
       has_many :pets
    @@ -742,8 +677,7 @@ 

    person.pets.create!(name: nil) # => ActiveRecord::RecordInvalid: Validation failed: Name can't be blank

    -
    - +
    @@ -768,15 +702,10 @@

    -

    - - delete(*records) - -

    +

    delete(*records)

    - -
    -

    Deletes the records supplied from the collection according to the strategy specified by the :dependent option. If no :dependent option is given, then it will follow the default strategy. Returns an array with the deleted records.

    +
    +

    Deletes the records supplied from the collection according to the strategy specified by the :dependent option. If no :dependent option is given, then it will follow the default strategy. Returns an array with the deleted records.

    For has_many :through associations, the default deletion strategy is :delete_all.

    @@ -887,8 +816,7 @@

    # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # ] -

    - +
    @@ -913,15 +841,10 @@

    -

    - - delete_all(dependent = nil) - -

    +

    delete_all(dependent = nil)

    - -
    -

    Deletes all the records from the collection according to the strategy specified by the :dependent option. If no :dependent option is given, then it will follow the default strategy.

    +
    +

    Deletes all the records from the collection according to the strategy specified by the :dependent option. If no :dependent option is given, then it will follow the default strategy.

    For has_many :through associations, the default deletion strategy is :delete_all.

    @@ -996,8 +919,7 @@

    Pet.find(1, 2, 3) # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (1, 2, 3) -

    - +
    @@ -1022,15 +944,10 @@

    -

    - - destroy(*records) - -

    +

    destroy(*records)

    - -
    -

    Destroys the records supplied and removes them from the collection. This method will always remove record from the database ignoring the :dependent option. Returns an array with the removed records.

    +
    +

    Destroys the records supplied and removes them from the collection. This method will always remove record from the database ignoring the :dependent option. Returns an array with the removed records.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1097,8 +1014,7 @@ 

    Pet.find(4, 5, 6) # => ActiveRecord::RecordNotFound: Couldn't find all Pets with 'id': (4, 5, 6)

    -
    - +
    @@ -1123,15 +1039,10 @@

    -

    - - destroy_all() - -

    +

    destroy_all()

    - -
    -

    Deletes the records of the collection directly from the database ignoring the :dependent option. Records are instantiated and it invokes before_remove, after_remove, before_destroy, and after_destroy callbacks.

    +
    +

    Deletes the records of the collection directly from the database ignoring the :dependent option. Records are instantiated and it invokes before_remove, after_remove, before_destroy, and after_destroy callbacks.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1152,8 +1063,7 @@ 

    Pet.find(1) # => Couldn't find Pet with id=1

    -
    - +
    @@ -1178,16 +1088,11 @@

    -

    - - distinct(value = true) +

    distinct(value = true) +

    - - - - -
    -

    Specifies whether the records should be unique or not.

    +
    +

    Specifies whether the records should be unique or not.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1208,8 +1113,7 @@ 

    # #<Pet name: "Fancy-Fancy"> # ]

    -
    - +
    @@ -1222,15 +1126,10 @@

    -

    - - empty?() - -

    +

    empty?()

    - -
    -

    Returns true if the collection is empty. If the collection has been loaded it is equivalent to collection.size.zero?. If the collection has not been loaded, it is equivalent to !collection.exists?. If the collection has not already been loaded and you are going to fetch the records anyway it is better to check collection.load.empty?.

    +
    +

    Returns true if the collection is empty. If the collection has been loaded it is equivalent to collection.size.zero?. If the collection has not been loaded, it is equivalent to !collection.exists?. If the collection has not already been loaded and you are going to fetch the records anyway it is better to check collection.load.empty?.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1244,8 +1143,7 @@ 

    person.pets.count # => 0 person.pets.empty? # => true

    -
    - +
    @@ -1270,18 +1168,12 @@

    -

    - - fifth() +

    fifth() +

    - - - - -
    -

    Same as first except returns only the fifth record.

    -
    - +
    +

    Same as first except returns only the fifth record.

    +
    @@ -1294,15 +1186,10 @@

    -

    - - find(*args) - -

    +

    find(*args)

    - -
    -

    Finds an object in the collection responding to the id. Uses the same rules as ActiveRecord::FinderMethods.find. Raises ActiveRecord::RecordNotFound error if the object cannot be found.

    +
    +

    Finds an object in the collection responding to the id. Uses the same rules as ActiveRecord::FinderMethods.find. Raises ActiveRecord::RecordNotFound error if the object cannot be found.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1327,8 +1214,7 @@ 

    # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # ]

    -
    - +
    @@ -1354,16 +1240,11 @@

    -

    - - first(limit = nil) +

    first(limit = nil) +

    - - - - -
    -

    Returns the first record, or the first n records, from the collection. If the collection is empty, the first form returns nil, and the second form returns an empty array.

    +
    +

    Returns the first record, or the first n records, from the collection. If the collection is empty, the first form returns nil, and the second form returns an empty array.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1388,8 +1269,7 @@ 

    another_person_without.pets.first # => nil another_person_without.pets.first(3) # => []

    -
    - +
    @@ -1402,18 +1282,12 @@

    -

    - - forty_two() - - -

    +

    forty_two() +

    - -
    -

    Same as first except returns only the forty second record. Also known as accessing “the reddit”.

    -
    - +
    +

    Same as first except returns only the forty second record. Also known as accessing “the reddit”.

    +
    @@ -1426,18 +1300,12 @@

    -

    - - fourth() - - -

    +

    fourth() +

    - -
    -

    Same as first except returns only the fourth record.

    -
    - +
    +

    Same as first except returns only the fourth record.

    +
    @@ -1450,15 +1318,10 @@

    -

    - - include?(record) - -

    +

    include?(record)

    - -
    -

    Returns true if the given record is present in the collection.

    +
    +

    Returns true if the given record is present in the collection.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1469,8 +1332,7 @@ 

    person.pets.include?(Pet.find(20)) # => true person.pets.include?(Pet.find(21)) # => false

    -
    - +
    @@ -1495,15 +1357,10 @@

    -

    - - last(limit = nil) - -

    +

    last(limit = nil)

    - -
    -

    Returns the last record, or the last n records, from the collection. If the collection is empty, the first form returns nil, and the second form returns an empty array.

    +
    +

    Returns the last record, or the last n records, from the collection. If the collection is empty, the first form returns nil, and the second form returns an empty array.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1528,8 +1385,7 @@ 

    another_person_without.pets.last # => nil another_person_without.pets.last(3) # => []

    -
    - +
    @@ -1555,16 +1411,11 @@

    -

    - - length() +

    length() +

    - - - - -
    -

    Returns the size of the collection calling size on the target. If the collection has been already loaded, length and size are equivalent. If not and you are going to need the records anyway this method will take one less query. Otherwise size is more efficient.

    +
    +

    Returns the size of the collection calling size on the target. If the collection has been already loaded, length and size are equivalent. If not and you are going to need the records anyway this method will take one less query. Otherwise size is more efficient.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1582,8 +1433,7 @@ 

    # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # ]

    -
    - +
    @@ -1596,17 +1446,9 @@

    -

    - - load_target() - -

    +

    load_target()

    -
    - -
    - @@ -1631,24 +1473,17 @@

    -

    - - loaded() - -

    +

    loaded()

    -
    - -
    - -
    - Alias for: loaded? -
    +

    + Alias for: + loaded?. +

    @@ -1656,27 +1491,23 @@

    -

    - - loaded?() - -

    +

    loaded?()

    - -
    -

    Returns true if the association has been loaded, otherwise false.

    +
    +

    Returns true if the association has been loaded, otherwise false.

    person.pets.loaded? # => false
     person.pets.records
     person.pets.loaded? # => true
     
    -
    - +
    -
    - Also aliased as: loaded -
    +

    + Also aliased as: + + loaded. +

    @@ -1700,16 +1531,11 @@

    -

    - - many?() - - -

    +

    many?() +

    - -
    -

    Returns true if the collection has more than one record. Equivalent to collection.size > 1.

    +
    +

    Returns true if the collection has more than one record. Equivalent to collection.size > 1.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1742,8 +1568,7 @@ 

    end # => true

    -
    - +
    @@ -1756,24 +1581,17 @@

    -

    - - new(attributes = {}, &block) - -

    +

    new(attributes = {}, &block)

    -
    - -
    - -
    - Alias for: build -
    +

    + Alias for: + build. +

    @@ -1781,17 +1599,9 @@

    -

    - - pluck(*column_names) - -

    +

    pluck(*column_names)

    -
    - -
    - @@ -1816,15 +1626,10 @@

    -

    - - proxy_association() - -

    +

    proxy_association()

    - -
    -

    Returns the association object for the collection.

    +
    +

    Returns the association object for the collection.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1837,8 +1642,7 @@ 

    Returns the same object as person.association(:pets), allowing you to make calls like person.pets.proxy_association.owner.

    See Association extensions at Associations::ClassMethods for more.

    -

    - +
    @@ -1863,24 +1667,17 @@

    -

    - - push(*records) - -

    +

    push(*records)

    -
    - -
    - -
    - Alias for: << -
    +

    + Alias for: + <<. +

    @@ -1888,15 +1685,10 @@

    -

    - - reload() - -

    +

    reload()

    - -
    -

    Reloads the collection from the database. Returns self.

    +
    +

    Reloads the collection from the database. Returns self.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1911,8 +1703,7 @@ 

    person.pets.reload # fetches pets from the database # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>]

    -
    - +
    @@ -1938,15 +1729,10 @@

    -

    - - replace(other_array) - -

    +

    replace(other_array)

    - -
    -

    Replaces this collection with other_array. This will perform a diff and delete/add only records that have changed.

    +
    +

    Replaces this collection with other_array. This will perform a diff and delete/add only records that have changed.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -1968,8 +1754,7 @@ 

    person.pets.replace(["doo", "ggie", "gaga"])
     # => ActiveRecord::AssociationTypeMismatch: Pet expected, got String
     
    -

    - +
    @@ -1994,15 +1779,10 @@

    -

    - - reset() - -

    +

    reset()

    - -
    -

    Unloads the association. Returns self.

    +
    +

    Unloads the association. Returns self.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -2019,8 +1799,7 @@ 

    person.pets # fetches pets from the database # => [#<Pet id: 1, name: "Snoop", group: "dogs", person_id: 1>]

    -
    - +
    @@ -2047,17 +1826,11 @@

    -

    - - scope() - -

    +

    scope()

    - -
    -

    Returns a Relation object for the records in this association

    -
    - +
    +

    Returns a Relation object for the records in this association

    +
    @@ -2082,18 +1855,12 @@

    -

    - - second() +

    second() +

    - - - - -
    -

    Same as first except returns only the second record.

    -
    - +
    +

    Same as first except returns only the second record.

    +
    @@ -2106,18 +1873,12 @@

    -

    - - second_to_last() - - -

    +

    second_to_last() +

    - -
    -

    Same as last except returns only the second-to-last record.

    -
    - +
    +

    Same as last except returns only the second-to-last record.

    +
    @@ -2130,16 +1891,11 @@

    -

    - - select(*fields, &block) - - -

    +

    select(*fields, &block) +

    - -
    -

    Works in two ways.

    +
    +

    Works in two ways.

    First: Specify a subset of fields to be selected from the result set.

    @@ -2183,8 +1939,7 @@

    # #<Pet id: 3, name: "Choo-Choo", person_id: 1> # ] -

    - +
    @@ -2197,15 +1952,10 @@

    -

    - - size() - -

    +

    size()

    - -
    -

    Returns the size of the collection. If the collection hasn’t been loaded, it executes a SELECT COUNT(*) query. Else it calls collection.size.

    +
    +

    Returns the size of the collection. If the collection hasn’t been loaded, it executes a SELECT COUNT(*) query. Else it calls collection.size.

    If the collection has been already loaded size and length are equivalent. If not and you are going to need the records anyway length will take one less query. Otherwise size is more efficient.

    @@ -2227,8 +1977,7 @@

    # Because the collection is already loaded, this will behave like # collection.size and no SQL count query is executed. -

    - +
    @@ -2253,15 +2002,10 @@

    -

    - - take(limit = nil) - -

    +

    take(limit = nil)

    - -
    -

    Gives a record (or N records if a parameter is supplied) from the collection using the same rules as ActiveRecord::FinderMethods.take.

    +
    +

    Gives a record (or N records if a parameter is supplied) from the collection using the same rules as ActiveRecord::FinderMethods.take.

    class Person < ActiveRecord::Base
       has_many :pets
    @@ -2286,8 +2030,7 @@ 

    another_person_without.pets.take # => nil another_person_without.pets.take(2) # => []

    -
    - +
    @@ -2313,17 +2056,9 @@

    -

    - - target() - -

    +

    target()

    -
    - -
    - @@ -2348,18 +2083,12 @@

    -

    - - third() +

    third() +

    - - - - -
    -

    Same as first except returns only the third record.

    -
    - +
    +

    Same as first except returns only the third record.

    +
    @@ -2372,18 +2101,12 @@

    -

    - - third_to_last() - - -

    +

    third_to_last() +

    - -
    -

    Same as last except returns only the third-to-last record.

    -
    - +
    +

    Same as last except returns only the third-to-last record.

    +
    diff --git a/src/classes/ActiveRecord/Associations/NestedError.html b/src/classes/ActiveRecord/Associations/NestedError.html index 17d5108f49..38fff4faa8 100644 --- a/src/classes/ActiveRecord/Associations/NestedError.html +++ b/src/classes/ActiveRecord/Associations/NestedError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(association, inner_error) - -

    +

    new(association, inner_error)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/AttributeAssignmentError.html b/src/classes/ActiveRecord/AttributeAssignmentError.html index 29bb04c690..574887c76b 100644 --- a/src/classes/ActiveRecord/AttributeAssignmentError.html +++ b/src/classes/ActiveRecord/AttributeAssignmentError.html @@ -91,17 +91,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, exception = nil, attribute = nil) - -

    +

    new(message = nil, exception = nil, attribute = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/AttributeMethods.html b/src/classes/ActiveRecord/AttributeMethods.html index af44f3524d..4f63eb2197 100644 --- a/src/classes/ActiveRecord/AttributeMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods.html @@ -236,15 +236,10 @@

    Constants

    Instance Public methods

    -

    - - [](attr_name) - -

    +

    [](attr_name)

    - -
    -

    Returns the value of the attribute identified by attr_name after it has been type cast. (For information about specific type casting behavior, see the types under ActiveModel::Type.)

    +
    +

    Returns the value of the attribute identified by attr_name after it has been type cast. (For information about specific type casting behavior, see the types under ActiveModel::Type.)

    class Person < ActiveRecord::Base
       belongs_to :organization
    @@ -264,8 +259,7 @@ 

    person[:organization_id] # => ActiveModel::MissingAttributeError: missing attribute 'organization_id' for Person person[:id] # => nil

    -
    - +
    @@ -290,15 +284,10 @@

    -

    - - []=(attr_name, value) - -

    +

    []=(attr_name, value)

    - -
    -

    Updates the attribute identified by attr_name using the specified value. The attribute value will be type cast upon being read.

    +
    +

    Updates the attribute identified by attr_name using the specified value. The attribute value will be type cast upon being read.

    class Person < ActiveRecord::Base
     end
    @@ -307,8 +296,7 @@ 

    person[:date_of_birth] = "2004-12-12" person[:date_of_birth] # => Date.new(2004, 12, 12)

    -
    - +
    @@ -333,15 +321,10 @@

    -

    - - accessed_fields() - -

    +

    accessed_fields()

    - -
    -

    Returns the name of all database fields which have been read from this model. This can be useful in development mode to determine which fields need to be selected. For performance critical pages, selecting only the required fields can be an easy performance win (assuming you aren’t using all of the fields on the model).

    +
    +

    Returns the name of all database fields which have been read from this model. This can be useful in development mode to determine which fields need to be selected. For performance critical pages, selecting only the required fields can be an easy performance win (assuming you aren’t using all of the fields on the model).

    For example:

    @@ -367,8 +350,7 @@

    end end -

    - +
    @@ -393,15 +375,10 @@

    -

    - - attribute_for_inspect(attr_name) - -

    +

    attribute_for_inspect(attr_name)

    - -
    -

    Returns an inspect-like string for the value of the attribute attr_name. String attributes are truncated up to 50 characters. Other attributes return the value of inspect without modification.

    +
    +

    Returns an inspect-like string for the value of the attribute attr_name. String attributes are truncated up to 50 characters. Other attributes return the value of inspect without modification.

    person = Person.create!(name: 'David Heinemeier Hansson ' * 3)
     
    @@ -414,8 +391,7 @@ 

    person.attribute_for_inspect(:tag_ids) # => "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]"

    -
    - +
    @@ -443,15 +419,10 @@

    -

    - - attribute_names() - -

    +

    attribute_names()

    - -
    -

    Returns an array of names for the attributes available on this object.

    +
    +

    Returns an array of names for the attributes available on this object.

    class Person < ActiveRecord::Base
     end
    @@ -460,8 +431,7 @@ 

    person.attribute_names # => ["id", "created_at", "updated_at", "name", "age"]

    -
    - +
    @@ -486,15 +456,10 @@

    -

    - - attribute_present?(attr_name) - -

    +

    attribute_present?(attr_name)

    - -
    -

    Returns true if the specified attribute has been set by the user or by a database load and is neither nil nor empty? (the latter only applies to objects that respond to empty?, most notably Strings). Otherwise, false. Note that it always returns true with boolean attributes.

    +
    +

    Returns true if the specified attribute has been set by the user or by a database load and is neither nil nor empty? (the latter only applies to objects that respond to empty?, most notably Strings). Otherwise, false. Note that it always returns true with boolean attributes.

    class Task < ActiveRecord::Base
     end
    @@ -507,8 +472,7 @@ 

    task.attribute_present?(:title) # => true task.attribute_present?(:is_done) # => true

    -
    - +
    @@ -536,15 +500,10 @@

    -

    - - attributes() - -

    +

    attributes()

    - -
    -

    Returns a hash of all the attributes with their names as keys and the values of the attributes as values.

    +
    +

    Returns a hash of all the attributes with their names as keys and the values of the attributes as values.

    class Person < ActiveRecord::Base
     end
    @@ -553,8 +512,7 @@ 

    person.attributes # => {"id"=>3, "created_at"=>Sun, 21 Oct 2012 04:53:04, "updated_at"=>Sun, 21 Oct 2012 04:53:04, "name"=>"Francesco", "age"=>22}

    -
    - +
    @@ -579,15 +537,10 @@

    -

    - - has_attribute?(attr_name) - -

    +

    has_attribute?(attr_name)

    - -
    -

    Returns true if the given attribute is in the attributes hash, otherwise false.

    +
    +

    Returns true if the given attribute is in the attributes hash, otherwise false.

    class Person < ActiveRecord::Base
       alias_attribute :new_name, :name
    @@ -599,8 +552,7 @@ 

    person.has_attribute?('age') # => true person.has_attribute?(:nothing) # => false

    -
    - +
    @@ -627,15 +579,10 @@

    -

    - - respond_to?(name, include_private = false) - -

    +

    respond_to?(name, include_private = false)

    - -
    -

    A Person object with a name attribute can ask person.respond_to?(:name), person.respond_to?(:name=), and person.respond_to?(:name?) which will all return true. It also defines the attribute methods if they have not been generated.

    +
    +

    A Person object with a name attribute can ask person.respond_to?(:name), person.respond_to?(:name=), and person.respond_to?(:name?) which will all return true. It also defines the attribute methods if they have not been generated.

    class Person < ActiveRecord::Base
     end
    @@ -649,8 +596,7 @@ 

    person.respond_to?('age?') # => true person.respond_to?(:nothing) # => false

    -
    - +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html b/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html index e1ab88e86f..d83b67514d 100644 --- a/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html +++ b/src/classes/ActiveRecord/AttributeMethods/BeforeTypeCast.html @@ -97,15 +97,10 @@

    Methods

    Instance Public methods

    -

    - - attributes_before_type_cast() - -

    +

    attributes_before_type_cast()

    - -
    -

    Returns a hash of attributes before typecasting and deserialization.

    +
    +

    Returns a hash of attributes before typecasting and deserialization.

    class Task < ActiveRecord::Base
     end
    @@ -116,8 +111,7 @@ 

    task.attributes_before_type_cast # => {"id"=>nil, "title"=>nil, "is_done"=>true, "completed_on"=>"2012-10-21", "created_at"=>nil, "updated_at"=>nil}

    -
    - +
    @@ -142,17 +136,11 @@

    -

    - - attributes_for_database() - -

    +

    attributes_for_database()

    - -
    -

    Returns a hash of attributes for assignment to the database.

    -
    - +
    +

    Returns a hash of attributes for assignment to the database.

    +
    @@ -177,15 +165,10 @@

    -

    - - read_attribute_before_type_cast(attr_name) - -

    +

    read_attribute_before_type_cast(attr_name)

    - -
    -

    Returns the value of the attribute identified by attr_name before typecasting and deserialization.

    +
    +

    Returns the value of the attribute identified by attr_name before typecasting and deserialization.

    class Task < ActiveRecord::Base
     end
    @@ -197,8 +180,7 @@ 

    task.read_attribute_before_type_cast('completed_on') # => "2012-10-21" task.read_attribute_before_type_cast(:completed_on) # => "2012-10-21"

    -
    - +
    @@ -226,15 +208,10 @@

    -

    - - read_attribute_for_database(attr_name) - -

    +

    read_attribute_for_database(attr_name)

    - -
    -

    Returns the value of the attribute identified by attr_name after serialization.

    +
    +

    Returns the value of the attribute identified by attr_name after serialization.

    class Book < ActiveRecord::Base
       enum :status, { draft: 1, published: 2 }
    @@ -244,8 +221,7 @@ 

    book.read_attribute(:status) # => "published" book.read_attribute_for_database(:status) # => 2

    -
    - +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html index ebe3c9b8db..20a734faf3 100644 --- a/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods/ClassMethods.html @@ -78,15 +78,10 @@

    Methods

    Instance Public methods

    -

    - - alias_attribute(new_name, old_name) - -

    +

    alias_attribute(new_name, old_name)

    - -
    -

    Allows you to make aliases for attributes.

    +
    +

    Allows you to make aliases for attributes.

    class Person < ActiveRecord::Base
       alias_attribute :nickname, :name
    @@ -102,8 +97,7 @@ 

    Person.where(nickname: "Bob")
     # SELECT "people".* FROM "people" WHERE "people"."name" = "Bob"
     
    -

    - +
    @@ -134,15 +128,10 @@

    -

    - - attribute_method?(attribute) - -

    +

    attribute_method?(attribute)

    - -
    -

    Returns true if attribute is an attribute method and table exists, false otherwise.

    +
    +

    Returns true if attribute is an attribute method and table exists, false otherwise.

    class Person < ActiveRecord::Base
     end
    @@ -151,8 +140,7 @@ 

    Person.attribute_method?(:age=) # => true Person.attribute_method?(:nothing) # => false

    -
    - +
    @@ -177,15 +165,10 @@

    -

    - - attribute_names() - -

    +

    attribute_names()

    - -
    -

    Returns an array of column names as strings if it’s not an abstract class and table exists. Otherwise it returns an empty array.

    +
    +

    Returns an array of column names as strings if it’s not an abstract class and table exists. Otherwise it returns an empty array.

    class Person < ActiveRecord::Base
     end
    @@ -193,8 +176,7 @@ 

    Person.attribute_names # => ["id", "created_at", "updated_at", "name", "age"]

    -
    - +
    @@ -223,17 +205,11 @@

    -

    - - dangerous_class_method?(method_name) - -

    +

    dangerous_class_method?(method_name)

    - -
    -

    A class method is ‘dangerous’ if it is already (re)defined by Active Record, but not by any ancestors. (So ‘puts’ is not dangerous but ‘new’ is.)

    -
    - +
    +

    A class method is ‘dangerous’ if it is already (re)defined by Active Record, but not by any ancestors. (So ‘puts’ is not dangerous but ‘new’ is.)

    +
    @@ -268,15 +244,10 @@

    -

    - - has_attribute?(attr_name) - -

    +

    has_attribute?(attr_name)

    - -
    -

    Returns true if the given attribute exists, otherwise false.

    +
    +

    Returns true if the given attribute exists, otherwise false.

    class Person < ActiveRecord::Base
       alias_attribute :new_name, :name
    @@ -287,8 +258,7 @@ 

    Person.has_attribute?(:age) # => true Person.has_attribute?(:nothing) # => false

    -
    - +
    @@ -315,15 +285,10 @@

    -

    - - instance_method_already_implemented?(method_name) - -

    +

    instance_method_already_implemented?(method_name)

    - -
    -

    Raises an ActiveRecord::DangerousAttributeError exception when an Active Record method is defined in the model, otherwise false.

    +
    +

    Raises an ActiveRecord::DangerousAttributeError exception when an Active Record method is defined in the model, otherwise false.

    class Person < ActiveRecord::Base
       def save
    @@ -337,8 +302,7 @@ 

    Person.instance_method_already_implemented?(:name) # => false

    -
    - +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/Dirty.html b/src/classes/ActiveRecord/AttributeMethods/Dirty.html index 9003d7c83f..06baec28f0 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Dirty.html +++ b/src/classes/ActiveRecord/AttributeMethods/Dirty.html @@ -157,19 +157,13 @@

    Included Modules

    Instance Public methods

    -

    - - attribute_before_last_save(attr_name) - -

    +

    attribute_before_last_save(attr_name)

    - -
    -

    Returns the original value of an attribute before the last save.

    +
    +

    Returns the original value of an attribute before the last save.

    This method is useful in after callbacks to get the original value of an attribute before the save that triggered the callbacks to run. It can be invoked as name_before_last_save instead of attribute_before_last_save("name").

    -
    - +
    @@ -194,21 +188,15 @@

    -

    - - attribute_change_to_be_saved(attr_name) - -

    +

    attribute_change_to_be_saved(attr_name)

    - -
    -

    Returns the change to an attribute that will be persisted during the next save.

    +
    +

    Returns the change to an attribute that will be persisted during the next save.

    This method is useful in validations and before callbacks, to see the change to an attribute that will occur when the record is saved. It can be invoked as name_change_to_be_saved instead of attribute_change_to_be_saved("name").

    If the attribute will change, the result will be an array containing the original value and the new value about to be saved.

    -
    - +
    @@ -233,19 +221,13 @@

    -

    - - attribute_in_database(attr_name) - -

    +

    attribute_in_database(attr_name)

    - -
    -

    Returns the value of an attribute in the database, as opposed to the in-memory value that will be persisted the next time the record is saved.

    +
    +

    Returns the value of an attribute in the database, as opposed to the in-memory value that will be persisted the next time the record is saved.

    This method is useful in validations and before callbacks, to see the original value of an attribute prior to any changes about to be saved. It can be invoked as name_in_database instead of attribute_in_database("name").

    -
    - +
    @@ -270,19 +252,13 @@

    -

    - - attributes_in_database() - -

    +

    attributes_in_database()

    - -
    -

    Returns a hash of the attributes that will change when the record is next saved.

    +
    +

    Returns a hash of the attributes that will change when the record is next saved.

    The hash keys are the attribute names, and the hash values are the original attribute values in the database (as opposed to the in-memory values about to be saved).

    -
    - +
    @@ -307,17 +283,11 @@

    -

    - - changed_attribute_names_to_save() - -

    +

    changed_attribute_names_to_save()

    - -
    -

    Returns an array of the names of any attributes that will change when the record is next saved.

    -
    - +
    +

    Returns an array of the names of any attributes that will change when the record is next saved.

    +
    @@ -342,17 +312,11 @@

    -

    - - changes_to_save() - -

    +

    changes_to_save()

    - -
    -

    Returns a hash containing all the changes that will be persisted during the next save.

    -
    - +
    +

    Returns a hash containing all the changes that will be persisted during the next save.

    +
    @@ -377,17 +341,11 @@

    -

    - - has_changes_to_save?() - -

    +

    has_changes_to_save?()

    - -
    -

    Will the next call to save have any changes to persist?

    -
    - +
    +

    Will the next call to save have any changes to persist?

    +
    @@ -412,17 +370,11 @@

    -

    - - reload(*) - -

    +

    reload(*)

    - -
    -

    reload the record and clears changed attributes.

    -
    - +
    +

    reload the record and clears changed attributes.

    +
    @@ -450,19 +402,13 @@

    -

    - - saved_change_to_attribute(attr_name) - -

    +

    saved_change_to_attribute(attr_name)

    - -
    -

    Returns the change to an attribute during the last save. If the attribute was changed, the result will be an array containing the original value and the saved value.

    +
    +

    Returns the change to an attribute during the last save. If the attribute was changed, the result will be an array containing the original value and the saved value.

    This method is useful in after callbacks, to see the change in an attribute during the save that triggered the callbacks to run. It can be invoked as saved_change_to_name instead of saved_change_to_attribute("name").

    -
    - +
    @@ -487,15 +433,10 @@

    -

    - - saved_change_to_attribute?(attr_name, **options) - -

    +

    saved_change_to_attribute?(attr_name, **options)

    - -
    -

    Did this attribute change when we last saved?

    +
    +

    Did this attribute change when we last saved?

    This method is useful in after callbacks to determine if an attribute was changed during the save that triggered the callbacks to run. It can be invoked as saved_change_to_name? instead of saved_change_to_attribute?("name").

    @@ -507,8 +448,7 @@

    Options

    When specified, this method will return false unless the value will be changed to the given value.

    -
    - +
    @@ -533,17 +473,11 @@

    Options

    -

    - - saved_changes() - -

    +

    saved_changes()

    - -
    -

    Returns a hash containing all the changes that were just saved.

    -
    - +
    +

    Returns a hash containing all the changes that were just saved.

    +
    @@ -568,17 +502,11 @@

    -

    - - saved_changes?() - -

    +

    saved_changes?()

    - -
    -

    Did the last call to save have any changes to change?

    -
    - +
    +

    Did the last call to save have any changes to change?

    +
    @@ -603,15 +531,10 @@

    -

    - - will_save_change_to_attribute?(attr_name, **options) - -

    +

    will_save_change_to_attribute?(attr_name, **options)

    - -
    -

    Will this attribute change the next time we save?

    +
    +

    Will this attribute change the next time we save?

    This method is useful in validations and before callbacks to determine if the next call to save will change a particular attribute. It can be invoked as will_save_change_to_name? instead of will_save_change_to_attribute?("name").

    @@ -623,8 +546,7 @@

    Options

    When specified, this method will return false unless the value will be changed to the given value.

    -
    - +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html index ccd7cc93dc..3bc26fd9ab 100644 --- a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html +++ b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey.html @@ -101,17 +101,11 @@

    Methods

    Instance Public methods

    -

    - - id() - -

    +

    id()

    - -
    -

    Returns the primary key column’s value. If the primary key is composite, returns an array of the primary key column values.

    -
    - +
    +

    Returns the primary key column’s value. If the primary key is composite, returns an array of the primary key column values.

    +
    @@ -136,17 +130,11 @@

    -

    - - id=(value) - -

    +

    id=(value)

    - -
    -

    Sets the primary key column’s value. If the primary key is composite, raises TypeError when the set value not enumerable.

    -
    - +
    +

    Sets the primary key column’s value. If the primary key is composite, raises TypeError when the set value not enumerable.

    +
    @@ -171,17 +159,11 @@

    -

    - - id?() - -

    +

    id?()

    - -
    -

    Queries the primary key column’s value. If the primary key is composite, all primary key column values must be queryable.

    -
    - +
    +

    Queries the primary key column’s value. If the primary key is composite, all primary key column values must be queryable.

    +
    @@ -206,17 +188,11 @@

    -

    - - id_before_type_cast() - -

    +

    id_before_type_cast()

    - -
    -

    Returns the primary key column’s value before type cast. If the primary key is composite, returns an array of primary key column values before type cast.

    -
    - +
    +

    Returns the primary key column’s value before type cast. If the primary key is composite, returns an array of primary key column values before type cast.

    +
    @@ -241,17 +217,11 @@

    -

    - - id_in_database() - -

    +

    id_in_database()

    - -
    -

    Returns the primary key column’s value from the database. If the primary key is composite, returns an array of primary key column values from database.

    -
    - +
    +

    Returns the primary key column’s value from the database. If the primary key is composite, returns an array of primary key column values from database.

    +
    @@ -276,17 +246,11 @@

    -

    - - id_was() - -

    +

    id_was()

    - -
    -

    Returns the primary key column’s previous value. If the primary key is composite, returns an array of primary key column previous values.

    -
    - +
    +

    Returns the primary key column’s previous value. If the primary key is composite, returns an array of primary key column previous values.

    +
    @@ -311,17 +275,11 @@

    -

    - - to_key() - -

    +

    to_key()

    - -
    -

    Returns this record’s primary key value wrapped in an array if one is available.

    -
    - +
    +

    Returns this record’s primary key value wrapped in an array if one is available.

    +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html index 8fc68f595c..f7367d1aa2 100644 --- a/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods/PrimaryKey/ClassMethods.html @@ -94,17 +94,9 @@

    Constants

    Instance Public methods

    -

    - - dangerous_attribute_method?(method_name) - -

    +

    dangerous_attribute_method?(method_name)

    -
    - -
    - @@ -129,17 +121,9 @@

    -

    - - instance_method_already_implemented?(method_name) - -

    +

    instance_method_already_implemented?(method_name)

    -
    - -
    - @@ -164,17 +148,11 @@

    -

    - - primary_key() - -

    +

    primary_key()

    - -
    -

    Defines the primary key field – can be overridden in subclasses. Overwriting will negate any effect of the primary_key_prefix_type setting, though.

    -
    - +
    +

    Defines the primary key field – can be overridden in subclasses. Overwriting will negate any effect of the primary_key_prefix_type setting, though.

    +
    @@ -200,15 +178,10 @@

    -

    - - primary_key=(value) - -

    +

    primary_key=(value)

    - -
    -

    Sets the name of the primary key column.

    +
    +

    Sets the name of the primary key column.

    class Project < ActiveRecord::Base
       self.primary_key = 'sysid'
    @@ -225,8 +198,7 @@ 

    Project.primary_key # => "foo_id"

    -
    - +
    @@ -259,17 +231,11 @@

    -

    - - quoted_primary_key() - -

    +

    quoted_primary_key()

    - -
    -

    Returns a quoted version of the primary key name.

    -
    - +
    +

    Returns a quoted version of the primary key name.

    +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/Query.html b/src/classes/ActiveRecord/AttributeMethods/Query.html index 5dcc947390..ad93627b69 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Query.html +++ b/src/classes/ActiveRecord/AttributeMethods/Query.html @@ -95,22 +95,18 @@

    Methods

    Instance Public methods

    -

    - - query_attribute(attr_name) - -

    +

    query_attribute(attr_name)

    - -
    -

    Returns true or false for the attribute identified by attr_name, depending on the attribute type and value.

    -
    - +
    +

    Returns true or false for the attribute identified by attr_name, depending on the attribute type and value.

    +
    -
    - Also aliased as: attribute? -
    +

    + Also aliased as: + + attribute?. +

    diff --git a/src/classes/ActiveRecord/AttributeMethods/Read.html b/src/classes/ActiveRecord/AttributeMethods/Read.html index 08d16b1096..30d5e3dfa9 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Read.html +++ b/src/classes/ActiveRecord/AttributeMethods/Read.html @@ -64,17 +64,11 @@

    Methods

    Instance Public methods

    -

    - - read_attribute(attr_name, &block) - -

    +

    read_attribute(attr_name, &block)

    - -
    -

    Returns the value of the attribute identified by attr_name after it has been type cast. For example, a date attribute will cast “2004-12-12” to Date.new(2004, 12, 12). (For information about specific type casting behavior, see the types under ActiveModel::Type.)

    -
    - +
    +

    Returns the value of the attribute identified by attr_name after it has been type cast. For example, a date attribute will cast “2004-12-12” to Date.new(2004, 12, 12). (For information about specific type casting behavior, see the types under ActiveModel::Type.)

    +
    diff --git a/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html b/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html index 8979f3033c..9ffd831297 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - serialize(attr_name, coder: nil, type: Object, comparable: false, yaml: {}, **options) - -

    +

    serialize(attr_name, coder: nil, type: Object, comparable: false, yaml: {}, **options)

    - -
    -

    If you have an attribute that needs to be saved to the database as a serialized object, and retrieved by deserializing into the same object, then specify the name of that attribute using this method and serialization will be handled automatically.

    +
    +

    If you have an attribute that needs to be saved to the database as a serialized object, and retrieved by deserializing into the same object, then specify the name of that attribute using this method and serialization will be handled automatically.

    The serialization format may be YAML, JSON, or any custom format using a custom coder class.

    @@ -216,8 +211,7 @@
    Methods

    Class Public methods

    -

    - - new(name, type) - -

    +

    new(name, type)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/AttributeMethods/Write.html b/src/classes/ActiveRecord/AttributeMethods/Write.html index 214659c729..7812f5fab5 100644 --- a/src/classes/ActiveRecord/AttributeMethods/Write.html +++ b/src/classes/ActiveRecord/AttributeMethods/Write.html @@ -64,17 +64,11 @@

    Methods

    Instance Public methods

    -

    - - write_attribute(attr_name, value) - -

    +

    write_attribute(attr_name, value)

    - -
    -

    Updates the attribute identified by attr_name using the specified value. The attribute value will be type cast upon being read.

    -
    - +
    +

    Updates the attribute identified by attr_name using the specified value. The attribute value will be type cast upon being read.

    +
    diff --git a/src/classes/ActiveRecord/Attributes/ClassMethods.html b/src/classes/ActiveRecord/Attributes/ClassMethods.html index 879f428f4d..cd9a22015c 100644 --- a/src/classes/ActiveRecord/Attributes/ClassMethods.html +++ b/src/classes/ActiveRecord/Attributes/ClassMethods.html @@ -76,16 +76,11 @@

    Methods

    Instance Public methods

    -

    - - attribute(name, cast_type = nil, **options) - - -

    +

    attribute(name, cast_type = nil, **options) +

    - -
    -

    Defines an attribute with a type on this model. It will override the type of existing attributes if needed. This allows control over how values are converted to and from SQL when assigned to a model. It also changes the behavior of values passed to ActiveRecord::Base.where. This will let you use your domain objects across much of Active Record, without having to rely on implementation details or monkey patching.

    +
    +

    Defines an attribute with a type on this model. It will override the type of existing attributes if needed. This allows control over how values are converted to and from SQL when assigned to a model. It also changes the behavior of values passed to ActiveRecord::Base.where. This will let you use your domain objects across much of Active Record, without having to rely on implementation details or monkey patching.

    Parameters

    name
    @@ -264,8 +259,7 @@

    Querying

    Dirty Tracking

    The type of an attribute is given the opportunity to change how dirty tracking is performed. The methods changed? and changed_in_place? will be called from ActiveModel::Dirty. See the documentation for those methods in ActiveModel::Type::Value for more details.

    -
    - +
    @@ -278,15 +272,10 @@

    Dirty Tracking

    -

    - - define_attribute( name, cast_type, default: NO_DEFAULT_PROVIDED, user_provided_default: true ) - -

    +

    define_attribute( name, cast_type, default: NO_DEFAULT_PROVIDED, user_provided_default: true )

    - -
    -

    This API only accepts type objects, and will do its work immediately instead of waiting for the schema to load. While this method is provided so it can be used by plugin authors, application code should probably use ClassMethods#attribute.

    +
    +

    This API only accepts type objects, and will do its work immediately instead of waiting for the schema to load. While this method is provided so it can be used by plugin authors, application code should probably use ClassMethods#attribute.

    Parameters

    name
    @@ -302,8 +291,7 @@

    Parameters

    Whether the default value should be cast using cast or deserialize.

    -
    - +
    @@ -334,20 +322,14 @@

    Parameters

    -

    - - type_for_attribute(attribute_name, &block) +

    type_for_attribute(attribute_name, &block) +

    - - - - -
    -

    See ActiveModel::Attributes::ClassMethods#type_for_attribute.

    +
    +

    See ActiveModel::Attributes::ClassMethods#type_for_attribute.

    This method will access the database and load the model’s schema if necessary.

    -
    - +
    @@ -363,17 +345,9 @@

    Instance Protected methods

    -

    - - reload_schema_from_cache(*) - -

    +

    reload_schema_from_cache(*)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/AutosaveAssociation.html b/src/classes/ActiveRecord/AutosaveAssociation.html index 7b49036418..9c7fd9f44e 100644 --- a/src/classes/ActiveRecord/AutosaveAssociation.html +++ b/src/classes/ActiveRecord/AutosaveAssociation.html @@ -213,17 +213,9 @@

    Methods

    Instance Public methods

    -

    - - autosaving_belongs_to_for?(association) - -

    +

    autosaving_belongs_to_for?(association)

    -
    - -
    - @@ -249,17 +241,11 @@

    -

    - - changed_for_autosave?() - -

    +

    changed_for_autosave?()

    - -
    -

    Returns whether or not this record has been changed in any way (including whether any of its nested autosave associations are likewise changed)

    -
    - +
    +

    Returns whether or not this record has been changed in any way (including whether any of its nested autosave associations are likewise changed)

    +
    @@ -284,19 +270,13 @@

    -

    - - destroyed_by_association() - -

    +

    destroyed_by_association()

    - -
    -

    Returns the association for the parent being destroyed.

    +
    +

    Returns the association for the parent being destroyed.

    Used to avoid updating the counter cache unnecessarily.

    -
    - +
    @@ -321,17 +301,11 @@

    -

    - - destroyed_by_association=(reflection) - -

    +

    destroyed_by_association=(reflection)

    - -
    -

    Records the association that is being destroyed and destroying this record in the process.

    -
    - +
    +

    Records the association that is being destroyed and destroying this record in the process.

    +
    @@ -356,19 +330,13 @@

    -

    - - mark_for_destruction() - -

    +

    mark_for_destruction()

    - -
    -

    Marks this record to be destroyed as part of the parent’s save transaction. This does not actually destroy the record instantly, rather child record will be destroyed when parent.save is called.

    +
    +

    Marks this record to be destroyed as part of the parent’s save transaction. This does not actually destroy the record instantly, rather child record will be destroyed when parent.save is called.

    Only useful if the :autosave option on the parent is enabled for this associated model.

    -
    - +
    @@ -393,19 +361,13 @@

    -

    - - marked_for_destruction?() - -

    +

    marked_for_destruction?()

    - -
    -

    Returns whether or not this record will be destroyed as part of the parent’s save transaction.

    +
    +

    Returns whether or not this record will be destroyed as part of the parent’s save transaction.

    Only useful if the :autosave option on the parent is enabled for this associated model.

    -
    - +
    @@ -430,17 +392,11 @@

    -

    - - reload(options = nil) - -

    +

    reload(options = nil)

    - -
    -

    Reloads the attributes of the object as usual and clears marked_for_destruction flag.

    -
    - +
    +

    Reloads the attributes of the object as usual and clears marked_for_destruction flag.

    +
    @@ -467,17 +423,9 @@

    -

    - - validating_belongs_to_for?(association) - -

    +

    validating_belongs_to_for?(association)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Batches.html b/src/classes/ActiveRecord/Batches.html index 65b808fdb4..4dc709771d 100644 --- a/src/classes/ActiveRecord/Batches.html +++ b/src/classes/ActiveRecord/Batches.html @@ -107,15 +107,10 @@

    Constants

    Instance Public methods

    -

    - - find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, cursor: primary_key, order: DEFAULT_ORDER, &block) - -

    +

    find_each(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, cursor: primary_key, order: DEFAULT_ORDER, &block)

    - -
    -

    Looping through a collection of records from the database (using the Scoping::Named::ClassMethods.all method, for example) is very inefficient since it will try to instantiate all the objects at once.

    +
    +

    Looping through a collection of records from the database (using the Scoping::Named::ClassMethods.all method, for example) is very inefficient since it will try to instantiate all the objects at once.

    In that case, batch processing methods allow you to work with the records in batches, thereby greatly reducing memory consumption.

    @@ -181,8 +176,7 @@

    Options

    NOTE: When using custom columns for batching, they should include at least one unique column (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, all columns should be static (unchangeable after it was set).

    NOTE: By its nature, batch processing is subject to race conditions if other processes are modifying the database.

    -
    - +
    @@ -217,15 +211,10 @@

    Options

    -

    - - find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, cursor: primary_key, order: DEFAULT_ORDER) - -

    +

    find_in_batches(start: nil, finish: nil, batch_size: 1000, error_on_ignore: nil, cursor: primary_key, order: DEFAULT_ORDER)

    - -
    -

    Yields each batch of records that was found by the find options as an array.

    +
    +

    Yields each batch of records that was found by the find options as an array.

    Person.where("age > 21").find_in_batches do |group|
       sleep(50) # Make sure it doesn't get too crowded in there!
    @@ -282,8 +271,7 @@ 

    Options

    NOTE: When using custom columns for batching, they should include at least one unique column (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, all columns should be static (unchangeable after it was set).

    NOTE: By its nature, batch processing is subject to race conditions if other processes are modifying the database.

    -
    - +
    @@ -319,15 +307,10 @@

    Options

    -

    - - in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, cursor: primary_key, order: DEFAULT_ORDER, use_ranges: nil, &block) - -

    +

    in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, cursor: primary_key, order: DEFAULT_ORDER, use_ranges: nil, &block)

    - -
    -

    Yields ActiveRecord::Relation objects to work with a batch of records.

    +
    +

    Yields ActiveRecord::Relation objects to work with a batch of records.

    Person.where("age > 21").in_batches do |relation|
       relation.delete_all
    @@ -405,8 +388,7 @@ 

    Options

    NOTE: When using custom columns for batching, they should include at least one unique column (e.g. primary key) as a tiebreaker. Also, to reduce the likelihood of race conditions, all columns should be static (unchangeable after it was set).

    NOTE: By its nature, batch processing is subject to race conditions if other processes are modifying the database.

    -
    - +
    diff --git a/src/classes/ActiveRecord/Batches/BatchEnumerator.html b/src/classes/ActiveRecord/Batches/BatchEnumerator.html index 78a92ce3ca..a91bb4ffeb 100644 --- a/src/classes/ActiveRecord/Batches/BatchEnumerator.html +++ b/src/classes/ActiveRecord/Batches/BatchEnumerator.html @@ -132,17 +132,11 @@

    Attributes

    Instance Public methods

    -

    - - batch_size() - -

    +

    batch_size()

    - -
    -

    The size of the batches yielded by the BatchEnumerator.

    -
    - +
    +

    The size of the batches yielded by the BatchEnumerator.

    +
    @@ -167,22 +161,16 @@

    -

    - - delete_all() - -

    +

    delete_all()

    - -
    -

    Deletes records in batches. Returns the total number of rows affected.

    +
    +

    Deletes records in batches. Returns the total number of rows affected.

    Person.in_batches.delete_all
     

    See Relation#delete_all for details of how each batch is deleted.

    -
    - +
    @@ -207,22 +195,16 @@

    -

    - - destroy_all() - -

    +

    destroy_all()

    - -
    -

    Destroys records in batches. Returns the total number of rows affected.

    +
    +

    Destroys records in batches. Returns the total number of rows affected.

    Person.where("age < 10").in_batches.destroy_all
     

    See Relation#destroy_all for details of how each batch is destroyed.

    -
    - +
    @@ -249,22 +231,16 @@

    -

    - - each(&block) - -

    +

    each(&block)

    - -
    -

    Yields an ActiveRecord::Relation object for each batch of records.

    +
    +

    Yields an ActiveRecord::Relation object for each batch of records.

    Person.in_batches.each do |relation|
       relation.update_all(awesome: true)
     end
     
    -
    - +
    @@ -291,15 +267,10 @@

    -

    - - each_record(&block) - -

    +

    each_record(&block)

    - -
    -

    Looping through a collection of records from the database (using the all method, for example) is very inefficient since it will try to instantiate all the objects at once.

    +
    +

    Looping through a collection of records from the database (using the all method, for example) is very inefficient since it will try to instantiate all the objects at once.

    In that case, batch processing methods allow you to work with the records in batches, thereby greatly reducing memory consumption.

    @@ -318,8 +289,7 @@

    person.award_trophy(index + 1) end -

    - +
    @@ -348,22 +318,16 @@

    -

    - - touch_all(...) - -

    +

    touch_all(...)

    - -
    -

    Touches records in batches. Returns the total number of rows affected.

    +
    +

    Touches records in batches. Returns the total number of rows affected.

    Person.in_batches.touch_all
     

    See Relation#touch_all for details of how each batch is touched.

    -
    - +
    @@ -390,22 +354,16 @@

    -

    - - update_all(updates) - -

    +

    update_all(updates)

    - -
    -

    Updates records in batches. Returns the total number of rows affected.

    +
    +

    Updates records in batches. Returns the total number of rows affected.

    Person.in_batches.update_all("age = age + 1")
     

    See Relation#update_all for details of how each batch is updated.

    -
    - +
    diff --git a/src/classes/ActiveRecord/Calculations.html b/src/classes/ActiveRecord/Calculations.html index df114ae0a2..4a0386df26 100644 --- a/src/classes/ActiveRecord/Calculations.html +++ b/src/classes/ActiveRecord/Calculations.html @@ -132,17 +132,11 @@

    Methods

    Instance Public methods

    -

    - - async_average(column_name) - -

    +

    async_average(column_name)

    - -
    -

    Same as average, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as average, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -167,17 +161,11 @@

    -

    - - async_count(column_name = nil) - -

    +

    async_count(column_name = nil)

    - -
    -

    Same as count, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as count, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -202,17 +190,11 @@

    -

    - - async_ids() - -

    +

    async_ids()

    - -
    -

    Same as ids, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as ids, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -237,17 +219,11 @@

    -

    - - async_maximum(column_name) - -

    +

    async_maximum(column_name)

    - -
    -

    Same as maximum, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as maximum, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -272,17 +248,11 @@

    -

    - - async_minimum(column_name) - -

    +

    async_minimum(column_name)

    - -
    -

    Same as minimum, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as minimum, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -307,17 +277,11 @@

    -

    - - async_pick(*column_names) - -

    +

    async_pick(*column_names)

    - -
    -

    Same as pick, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as pick, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -342,17 +306,11 @@

    -

    - - async_pluck(*column_names) - -

    +

    async_pluck(*column_names)

    - -
    -

    Same as pluck, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as pluck, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -377,17 +335,11 @@

    -

    - - async_sum(identity_or_column = nil) - -

    +

    async_sum(identity_or_column = nil)

    - -
    -

    Same as sum, but performs the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as sum, but performs the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -412,20 +364,14 @@

    -

    - - average(column_name) - -

    +

    average(column_name)

    - -
    -

    Calculates the average value on a given column. Returns nil if there’s no row. See calculate for examples with options.

    +
    +

    Calculates the average value on a given column. Returns nil if there’s no row. See calculate for examples with options.

    Person.average(:age) # => 35.8
     
    -
    - +
    @@ -450,15 +396,10 @@

    -

    - - calculate(operation, column_name) - -

    +

    calculate(operation, column_name)

    - -
    -

    This calculates aggregate values in the given column. Methods for count, sum, average, minimum, and maximum have been added as shortcuts.

    +
    +

    This calculates aggregate values in the given column. Methods for count, sum, average, minimum, and maximum have been added as shortcuts.

    Person.calculate(:count, :all) # The same as Person.count
     Person.average(:age) # SELECT AVG(age) FROM people...
    @@ -489,8 +430,7 @@ 

    end

    -
    - +
    @@ -543,15 +483,10 @@

    -

    - - count(column_name = nil) - -

    +

    count(column_name = nil)

    - -
    -

    Count the records.

    +
    +

    Count the records.

    Person.count
     # => the total count of all people
    @@ -593,8 +528,7 @@ 

    If the relation hasn’t been loaded yet, calling count with a block will load all records in the relation. If there are a lot of records in the relation, loading all records could result in performance issues.

    -
    - +
    @@ -627,21 +561,15 @@

    -

    - - ids() - -

    +

    ids()

    - -
    -

    Returns the base model’s ID’s for the relation using the table’s primary key

    +
    +

    Returns the base model’s ID’s for the relation using the table’s primary key

    Person.ids # SELECT people.id FROM people
     Person.joins(:company).ids # SELECT people.id FROM people INNER JOIN companies ON companies.id = people.company_id
     
    -
    - +
    @@ -698,20 +626,14 @@

    -

    - - maximum(column_name) - -

    +

    maximum(column_name)

    - -
    -

    Calculates the maximum value on a given column. The value is returned with the same data type of the column, or nil if there’s no row. See calculate for examples with options.

    +
    +

    Calculates the maximum value on a given column. The value is returned with the same data type of the column, or nil if there’s no row. See calculate for examples with options.

    Person.maximum(:age) # => 93
     
    -
    - +
    @@ -736,20 +658,14 @@

    -

    - - minimum(column_name) - -

    +

    minimum(column_name)

    - -
    -

    Calculates the minimum value on a given column. The value is returned with the same data type of the column, or nil if there’s no row. See calculate for examples with options.

    +
    +

    Calculates the minimum value on a given column. The value is returned with the same data type of the column, or nil if there’s no row. See calculate for examples with options.

    Person.minimum(:age) # => 7
     
    -
    - +
    @@ -774,15 +690,10 @@

    -

    - - pick(*column_names) - -

    +

    pick(*column_names)

    - -
    -

    Pick the value(s) from the named column(s) in the current relation. This is short-hand for relation.limit(1).pluck(*column_names).first, and is primarily useful when you have a relation that’s already narrowed down to a single row.

    +
    +

    Pick the value(s) from the named column(s) in the current relation. This is short-hand for relation.limit(1).pluck(*column_names).first, and is primarily useful when you have a relation that’s already narrowed down to a single row.

    Just like pluck, pick will only load the actual value, not the entire record object, so it’s also more efficient. The value is, again like with pluck, typecast by the column type.

    @@ -794,8 +705,7 @@

    # SELECT people.name, people.email_address FROM people WHERE id = 1 LIMIT 1 # => [ 'David', 'david@loudthinking.com' ] -

    - +
    @@ -825,15 +735,10 @@

    -

    - - pluck(*column_names) - -

    +

    pluck(*column_names)

    - -
    -

    Use pluck as a shortcut to select one or more attributes without loading an entire record object per row.

    +
    +

    Use pluck as a shortcut to select one or more attributes without loading an entire record object per row.

    Person.pluck(:name)
     
    @@ -881,8 +786,7 @@

    See also ids.

    -

    - +
    @@ -944,15 +848,10 @@

    -

    - - sum(initial_value_or_column = 0, &block) - -

    +

    sum(initial_value_or_column = 0, &block)

    - -
    -

    Calculates the sum of values on a given column. The value is returned with the same data type of the column, 0 if there’s no row. See calculate for examples with options.

    +
    +

    Calculates the sum of values on a given column. The value is returned with the same data type of the column, 0 if there’s no row. See calculate for examples with options.

    Person.sum(:age) # => 4562
     
    @@ -964,8 +863,7 @@

    If the relation hasn’t been loaded yet, calling sum with a block will load all records in the relation. If there are a lot of records in the relation, loading all records could result in performance issues.

    -

    - +
    @@ -997,17 +895,9 @@

    Instance Protected methods

    -

    - - aggregate_column(column_name) - -

    +

    aggregate_column(column_name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Callbacks/ClassMethods.html b/src/classes/ActiveRecord/Callbacks/ClassMethods.html index 6805b712d7..90b4901b45 100644 --- a/src/classes/ActiveRecord/Callbacks/ClassMethods.html +++ b/src/classes/ActiveRecord/Callbacks/ClassMethods.html @@ -128,18 +128,12 @@

    Included Modules

    Instance Public methods

    -

    - - after_create(*args, &block) - - -

    +

    after_create(*args, &block) +

    - -
    -

    Registers a callback to be called after a record is created. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is created. See ActiveRecord::Callbacks for more information.

    +
    @@ -152,18 +146,12 @@

    -

    - - after_destroy(*args, &block) - - -

    +

    after_destroy(*args, &block) +

    - -
    -

    Registers a callback to be called after a record is destroyed. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is destroyed. See ActiveRecord::Callbacks for more information.

    +
    @@ -176,18 +164,12 @@

    -

    - - after_find(*args, &block) - - -

    +

    after_find(*args, &block) +

    - -
    -

    Registers a callback to be called after a record is instantiated via a finder. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is instantiated via a finder. See ActiveRecord::Callbacks for more information.

    +
    @@ -200,18 +182,12 @@

    -

    - - after_initialize(*args, &block) - - -

    +

    after_initialize(*args, &block) +

    - -
    -

    Registers a callback to be called after a record is instantiated. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is instantiated. See ActiveRecord::Callbacks for more information.

    +
    @@ -224,18 +200,12 @@

    -

    - - after_save(*args, &block) - - -

    +

    after_save(*args, &block) +

    - -
    -

    Registers a callback to be called after a record is saved. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is saved. See ActiveRecord::Callbacks for more information.

    +
    @@ -248,18 +218,12 @@

    -

    - - after_touch(*args, &block) +

    after_touch(*args, &block) +

    - - - - -
    -

    Registers a callback to be called after a record is touched. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is touched. See ActiveRecord::Callbacks for more information.

    +
    @@ -272,18 +236,12 @@

    -

    - - after_update(*args, &block) +

    after_update(*args, &block) +

    - - - - -
    -

    Registers a callback to be called after a record is updated. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called after a record is updated. See ActiveRecord::Callbacks for more information.

    +
    @@ -296,18 +254,12 @@

    -

    - - around_create(*args, &block) - - -

    +

    around_create(*args, &block) +

    - -
    -

    Registers a callback to be called around the creation of a record. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called around the creation of a record. See ActiveRecord::Callbacks for more information.

    +
    @@ -320,18 +272,12 @@

    -

    - - around_destroy(*args, &block) - - -

    +

    around_destroy(*args, &block) +

    - -
    -

    Registers a callback to be called around the destruction of a record. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called around the destruction of a record. See ActiveRecord::Callbacks for more information.

    +
    @@ -344,18 +290,12 @@

    -

    - - around_save(*args, &block) - - -

    +

    around_save(*args, &block) +

    - -
    -

    Registers a callback to be called around the save of a record. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called around the save of a record. See ActiveRecord::Callbacks for more information.

    +
    @@ -368,18 +308,12 @@

    -

    - - around_update(*args, &block) - - -

    +

    around_update(*args, &block) +

    - -
    -

    Registers a callback to be called around the update of a record. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called around the update of a record. See ActiveRecord::Callbacks for more information.

    +
    @@ -392,18 +326,12 @@

    -

    - - before_create(*args, &block) +

    before_create(*args, &block) +

    - - - - -
    -

    Registers a callback to be called before a record is created. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called before a record is created. See ActiveRecord::Callbacks for more information.

    +
    @@ -416,18 +344,12 @@

    -

    - - before_destroy(*args, &block) +

    before_destroy(*args, &block) +

    - - - - -
    -

    Registers a callback to be called before a record is destroyed. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called before a record is destroyed. See ActiveRecord::Callbacks for more information.

    +
    @@ -440,18 +362,12 @@

    -

    - - before_save(*args, &block) +

    before_save(*args, &block) +

    - - - - -
    -

    Registers a callback to be called before a record is saved. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called before a record is saved. See ActiveRecord::Callbacks for more information.

    +
    @@ -464,18 +380,12 @@

    -

    - - before_update(*args, &block) +

    before_update(*args, &block) +

    - - - - -
    -

    Registers a callback to be called before a record is updated. See ActiveRecord::Callbacks for more information.

    -
    - +
    +

    Registers a callback to be called before a record is updated. See ActiveRecord::Callbacks for more information.

    +
    diff --git a/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html b/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html index e839534510..b915030767 100644 --- a/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html +++ b/src/classes/ActiveRecord/Coders/YAMLColumn/SafeCoder.html @@ -71,17 +71,9 @@

    Methods

    Class Public methods

    -

    - - new(permitted_classes: [], unsafe_load: nil) - -

    +

    new(permitted_classes: [], unsafe_load: nil)

    -
    - -
    - @@ -111,17 +103,9 @@

    Instance Public methods

    -

    - - dump(object) - -

    +

    dump(object)

    -
    - -
    - @@ -154,17 +138,9 @@

    -

    - - load(payload) - -

    +

    load(payload)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters.html b/src/classes/ActiveRecord/ConnectionAdapters.html index 74e0a6325e..de5598be6a 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters.html +++ b/src/classes/ActiveRecord/ConnectionAdapters.html @@ -323,15 +323,10 @@

    Methods

    Class Public methods

    -

    - - register(name, class_name, path = class_name.underscore) - -

    +

    register(name, class_name, path = class_name.underscore)

    - -
    -

    Registers a custom database adapter.

    +
    +

    Registers a custom database adapter.

    Can also be used to define aliases.

    @@ -341,8 +336,7 @@

    Example

    ActiveRecord::ConnectionAdapters.register("mysql", "ActiveRecord::ConnectionAdapters::TrilogyAdapter", "active_record/connection_adapters/trilogy_adapter") -
    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html index 163554cf4a..5bd27d8b50 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html @@ -557,17 +557,11 @@

    Attributes

    Class Public methods

    -

    - - database_exists?(config) - -

    +

    database_exists?(config)

    - -
    -

    Does the database for this adapter exist?

    -
    - +
    +

    Does the database for this adapter exist?

    +
    @@ -592,17 +586,11 @@

    -

    - - dbconsole(config, options = {}) - -

    +

    dbconsole(config, options = {})

    - -
    -

    Opens a database console session.

    -
    - +
    +

    Opens a database console session.

    +
    @@ -627,17 +615,9 @@

    -

    - - find_cmd_and_exec(commands, *args) - -

    +

    find_cmd_and_exec(commands, *args)

    -
    - -
    - @@ -686,17 +666,9 @@

    -

    - - type_cast_config_to_boolean(config) - -

    +

    type_cast_config_to_boolean(config)

    -
    - -
    - @@ -725,17 +697,9 @@

    -

    - - type_cast_config_to_integer(config) - -

    +

    type_cast_config_to_integer(config)

    -
    - -
    - @@ -766,17 +730,9 @@

    -

    - - validate_default_timezone(config) - -

    +

    validate_default_timezone(config)

    -
    - -
    - @@ -811,17 +767,11 @@

    Instance Public methods

    -

    - - active?() - -

    +

    active?()

    - -
    -

    Checks whether the connection to the database is still active. This includes checking whether the database is actually capable of responding, i.e. whether the connection isn’t stale.

    -
    - +
    +

    Checks whether the connection to the database is still active. This includes checking whether the database is actually capable of responding, i.e. whether the connection isn’t stale.

    +
    @@ -845,17 +795,11 @@

    -

    - - adapter_name() - -

    +

    adapter_name()

    - -
    -

    Returns the human-readable name of the adapter. Use mixed case - one can always use downcase if needed.

    -
    - +
    +

    Returns the human-readable name of the adapter. Use mixed case - one can always use downcase if needed.

    +
    @@ -880,17 +824,11 @@

    -

    - - check_all_foreign_keys_valid!() - -

    +

    check_all_foreign_keys_valid!()

    - -
    -

    Override to check all foreign key constraints in a database. The adapter should raise a ActiveRecord::StatementInvalid if foreign key constraints are not met.

    -
    - +
    +

    Override to check all foreign key constraints in a database. The adapter should raise a ActiveRecord::StatementInvalid if foreign key constraints are not met.

    +
    @@ -914,17 +852,11 @@

    -

    - - clear_cache!(new_connection: false) - -

    +

    clear_cache!(new_connection: false)

    - -
    -

    Clear any caching the database adapter may be doing.

    -
    - +
    +

    Clear any caching the database adapter may be doing.

    +
    @@ -957,17 +889,11 @@

    -

    - - close() - -

    +

    close()

    - -
    -

    Check the connection back in to the connection pool

    -
    - +
    +

    Check the connection back in to the connection pool

    +
    @@ -992,17 +918,9 @@

    -

    - - connect!() - -

    +

    connect!()

    -
    - -
    - @@ -1028,17 +946,11 @@

    -

    - - connected?() - -

    +

    connected?()

    - -
    -

    Checks whether the connection to the database was established. This doesn’t include checking whether the database is actually capable of responding, i.e. whether the connection is stale.

    -
    - +
    +

    Checks whether the connection to the database was established. This doesn’t include checking whether the database is actually capable of responding, i.e. whether the connection is stale.

    +
    @@ -1063,17 +975,9 @@

    -

    - - connection_retries() - -

    +

    connection_retries()

    -
    - -
    - @@ -1098,17 +1002,9 @@

    -

    - - database_exists?() - -

    +

    database_exists?()

    -
    - -
    - @@ -1136,17 +1032,9 @@

    -

    - - default_timezone() - -

    +

    default_timezone()

    -
    - -
    - @@ -1171,17 +1059,11 @@

    -

    - - disable_extension(name, **) - -

    +

    disable_extension(name, **)

    - -
    -

    This is meant to be implemented by the adapters that support extensions

    -
    - +
    +

    This is meant to be implemented by the adapters that support extensions

    +
    @@ -1205,17 +1087,11 @@

    -

    - - disable_referential_integrity() - -

    +

    disable_referential_integrity()

    - -
    -

    Override to turn off referential integrity while executing &block.

    -
    - +
    +

    Override to turn off referential integrity while executing &block.

    +
    @@ -1240,19 +1116,13 @@

    -

    - - discard!() - -

    +

    discard!()

    - -
    -

    Immediately forget this connection ever existed. Unlike disconnect!, this will not communicate with the server.

    +
    +

    Immediately forget this connection ever existed. Unlike disconnect!, this will not communicate with the server.

    After calling this method, the behavior of all other methods becomes undefined. This is called internally just before a forked process gets rid of a connection that belonged to its parent.

    -
    - +
    @@ -1277,17 +1147,11 @@

    -

    - - disconnect!() - -

    +

    disconnect!()

    - -
    -

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    -
    - +
    +

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    +
    @@ -1317,17 +1181,11 @@

    -

    - - enable_extension(name, **) - -

    +

    enable_extension(name, **)

    - -
    -

    This is meant to be implemented by the adapters that support extensions

    -
    - +
    +

    This is meant to be implemented by the adapters that support extensions

    +
    @@ -1351,17 +1209,11 @@

    -

    - - extensions() - -

    +

    extensions()

    - -
    -

    A list of extensions, to be filled in by adapters that support them.

    -
    - +
    +

    A list of extensions, to be filled in by adapters that support them.

    +
    @@ -1386,17 +1238,11 @@

    -

    - - index_algorithms() - -

    +

    index_algorithms()

    - -
    -

    A list of index algorithms, to be filled by adapters that support them.

    -
    - +
    +

    A list of index algorithms, to be filled by adapters that support them.

    +
    @@ -1421,17 +1267,11 @@

    -

    - - lease() - -

    +

    lease()

    - -
    -

    this method must only be called while holding connection pool’s mutex

    -
    - +
    +

    this method must only be called while holding connection pool’s mutex

    +
    @@ -1467,17 +1307,9 @@

    -

    - - max_jitter() - -

    +

    max_jitter()

    -
    - -
    - @@ -1502,17 +1334,9 @@

    -

    - - pool=(value) - -

    +

    pool=(value)

    -
    - -
    - @@ -1539,17 +1363,9 @@

    -

    - - pool_jitter(duration) - -

    +

    pool_jitter(duration)

    -
    - -
    - @@ -1574,17 +1390,11 @@

    -

    - - prefetch_primary_key?(table_name = nil) - -

    +

    prefetch_primary_key?(table_name = nil)

    - -
    -

    Should primary key values be selected from their corresponding sequence before the insert statement? If true, next_sequence_value is called before each insert to set the record’s primary key.

    -
    - +
    +

    Should primary key values be selected from their corresponding sequence before the insert statement? If true, next_sequence_value is called before each insert to set the record’s primary key.

    +
    @@ -1609,24 +1419,17 @@

    -

    - - prepared_statements() - -

    +

    prepared_statements()

    -
    - -
    - -
    - Alias for: prepared_statements? -
    +

    + Alias for: + prepared_statements?. +

    @@ -1634,22 +1437,16 @@

    -

    - - prepared_statements?() - -

    +

    prepared_statements?()

    -
    - -
    - -
    - Also aliased as: prepared_statements -
    +

    + Also aliased as: + + prepared_statements. +

    @@ -1673,19 +1470,13 @@

    -

    - - preventing_writes?() - -

    +

    preventing_writes?()

    - -
    -

    Determines whether writes are currently being prevented.

    +
    +

    Determines whether writes are currently being prevented.

    Returns true if the connection is a replica or returns the value of current_preventing_writes.

    -
    - +
    @@ -1713,21 +1504,15 @@

    -

    - - raw_connection() - -

    +

    raw_connection()

    - -
    -

    Provides access to the underlying database driver for this adapter. For example, this method returns a Mysql2::Client object in case of Mysql2Adapter, and a PG::Connection object in case of PostgreSQLAdapter.

    +
    +

    Provides access to the underlying database driver for this adapter. For example, this method returns a Mysql2::Client object in case of Mysql2Adapter, and a PG::Connection object in case of PostgreSQLAdapter.

    This is useful for when you need to call a proprietary method such as PostgreSQL’s lo_* methods.

    Active Record cannot track if the database is getting modified using this client. If that is the case, generally you’ll want to invalidate the query cache using ActiveRecord::Base.clear_query_cache.

    -
    - +
    @@ -1756,17 +1541,11 @@

    -

    - - reconnect!(restore_transactions: false) - -

    +

    reconnect!(restore_transactions: false)

    - -
    -

    Disconnects from the database if already connected, and establishes a new connection with the database. Implementors should define private reconnect instead.

    -
    - +
    +

    Disconnects from the database if already connected, and establishes a new connection with the database. Implementors should define private reconnect instead.

    +
    @@ -1826,17 +1605,9 @@

    -

    - - replica?() - -

    +

    replica?()

    -
    - -
    - @@ -1861,17 +1632,11 @@

    -

    - - requires_reloading?() - -

    +

    requires_reloading?()

    - -
    -

    Returns true if its required to reload the connection between requests for development mode.

    -
    - +
    +

    Returns true if its required to reload the connection between requests for development mode.

    +
    @@ -1896,19 +1661,13 @@

    -

    - - reset!() - -

    +

    reset!()

    - -
    -

    Reset the state of this connection, directing the DBMS to clear transactions and other connection-related server-side state. Usually a database-dependent operation.

    +
    +

    Reset the state of this connection, directing the DBMS to clear transactions and other connection-related server-side state. Usually a database-dependent operation.

    If a database driver or protocol does not support such a feature, implementors may alias this to reconnect!. Otherwise, implementors should call super immediately after resetting the connection (and while still holding @lock).

    -
    - +
    @@ -1935,17 +1694,9 @@

    -

    - - retry_deadline() - -

    +

    retry_deadline()

    -
    - -
    - @@ -1974,17 +1725,11 @@

    -

    - - role() - -

    +

    role()

    - -
    -

    The role (e.g. :writing) for the current connection. In a non-multi role application, :writing is returned.

    -
    - +
    +

    The role (e.g. :writing) for the current connection. In a non-multi role application, :writing is returned.

    +
    @@ -2009,17 +1754,11 @@

    -

    - - savepoint_errors_invalidate_transactions?() - -

    +

    savepoint_errors_invalidate_transactions?()

    - -
    -

    Do TransactionRollbackErrors on savepoints affect the parent transaction?

    -
    - +
    +

    Do TransactionRollbackErrors on savepoints affect the parent transaction?

    +
    @@ -2044,17 +1783,9 @@

    -

    - - schema_cache() - -

    +

    schema_cache()

    -
    - -
    - @@ -2079,17 +1810,11 @@

    -

    - - schema_version() - -

    +

    schema_version()

    - -
    -

    Returns the version identifier of the schema currently available in the database. This is generally equal to the number of the highest- numbered migration that has been executed, or 0 if no schema information is present / the database is empty.

    -
    - +
    +

    Returns the version identifier of the schema currently available in the database. This is generally equal to the number of the highest- numbered migration that has been executed, or 0 if no schema information is present / the database is empty.

    +
    @@ -2114,17 +1839,11 @@

    -

    - - shard() - -

    +

    shard()

    - -
    -

    The shard (e.g. :default) for the current connection. In a non-sharded application, :default is returned.

    -
    - +
    +

    The shard (e.g. :default) for the current connection. In a non-sharded application, :default is returned.

    +
    @@ -2149,17 +1868,11 @@

    -

    - - supports_advisory_locks?() - -

    +

    supports_advisory_locks?()

    - -
    -

    Does this adapter support application-enforced advisory locking?

    -
    - +
    +

    Does this adapter support application-enforced advisory locking?

    +
    @@ -2184,17 +1897,9 @@

    -

    - - supports_bulk_alter?() - -

    +

    supports_bulk_alter?()

    -
    - -
    - @@ -2219,17 +1924,11 @@

    -

    - - supports_check_constraints?() - -

    +

    supports_check_constraints?()

    - -
    -

    Does this adapter support creating check constraints?

    -
    - +
    +

    Does this adapter support creating check constraints?

    +
    @@ -2254,17 +1953,11 @@

    -

    - - supports_comments?() - -

    +

    supports_comments?()

    - -
    -

    Does this adapter support metadata comments on database objects (tables, columns, indexes)?

    -
    - +
    +

    Does this adapter support metadata comments on database objects (tables, columns, indexes)?

    +
    @@ -2289,17 +1982,11 @@

    -

    - - supports_comments_in_create?() - -

    +

    supports_comments_in_create?()

    - -
    -

    Can comments for tables, columns, and indexes be specified in create/alter table statements?

    -
    - +
    +

    Can comments for tables, columns, and indexes be specified in create/alter table statements?

    +
    @@ -2324,17 +2011,9 @@

    -

    - - supports_common_table_expressions?() - -

    +

    supports_common_table_expressions?()

    -
    - -
    - @@ -2359,17 +2038,9 @@

    -

    - - supports_concurrent_connections?() - -

    +

    supports_concurrent_connections?()

    -
    - -
    - @@ -2394,17 +2065,11 @@

    -

    - - supports_datetime_with_precision?() - -

    +

    supports_datetime_with_precision?()

    - -
    -

    Does this adapter support datetime with precision?

    -
    - +
    +

    Does this adapter support datetime with precision?

    +
    @@ -2429,17 +2094,11 @@

    -

    - - supports_ddl_transactions?() - -

    +

    supports_ddl_transactions?()

    - -
    -

    Does this adapter support DDL rollbacks in transactions? That is, would CREATE TABLE or ALTER TABLE get rolled back by a transaction?

    -
    - +
    +

    Does this adapter support DDL rollbacks in transactions? That is, would CREATE TABLE or ALTER TABLE get rolled back by a transaction?

    +
    @@ -2464,17 +2123,11 @@

    -

    - - supports_deferrable_constraints?() - -

    +

    supports_deferrable_constraints?()

    - -
    -

    Does this adapter support creating deferrable constraints?

    -
    - +
    +

    Does this adapter support creating deferrable constraints?

    +
    @@ -2499,17 +2152,9 @@

    -

    - - supports_disabling_indexes?() - -

    +

    supports_disabling_indexes?()

    -
    - -
    - @@ -2534,17 +2179,11 @@

    -

    - - supports_exclusion_constraints?() - -

    +

    supports_exclusion_constraints?()

    - -
    -

    Does this adapter support creating exclusion constraints?

    -
    - +
    +

    Does this adapter support creating exclusion constraints?

    +
    @@ -2569,17 +2208,11 @@

    -

    - - supports_explain?() - -

    +

    supports_explain?()

    - -
    -

    Does this adapter support explain?

    -
    - +
    +

    Does this adapter support explain?

    +
    @@ -2604,17 +2237,11 @@

    -

    - - supports_expression_index?() - -

    +

    supports_expression_index?()

    - -
    -

    Does this adapter support expression indices?

    -
    - +
    +

    Does this adapter support expression indices?

    +
    @@ -2639,17 +2266,11 @@

    -

    - - supports_extensions?() - -

    +

    supports_extensions?()

    - -
    -

    Does this adapter support database extensions?

    -
    - +
    +

    Does this adapter support database extensions?

    +
    @@ -2674,17 +2295,11 @@

    -

    - - supports_foreign_keys?() - -

    +

    supports_foreign_keys?()

    - -
    -

    Does this adapter support creating foreign key constraints?

    -
    - +
    +

    Does this adapter support creating foreign key constraints?

    +
    @@ -2709,17 +2324,11 @@

    -

    - - supports_foreign_tables?() - -

    +

    supports_foreign_tables?()

    - -
    -

    Does this adapter support foreign/external tables?

    -
    - +
    +

    Does this adapter support foreign/external tables?

    +
    @@ -2744,17 +2353,11 @@

    -

    - - supports_index_include?() - -

    +

    supports_index_include?()

    - -
    -

    Does this adapter support including non-key columns?

    -
    - +
    +

    Does this adapter support including non-key columns?

    +
    @@ -2779,17 +2382,11 @@

    -

    - - supports_index_sort_order?() - -

    +

    supports_index_sort_order?()

    - -
    -

    Does this adapter support index sort order?

    -
    - +
    +

    Does this adapter support index sort order?

    +
    @@ -2814,17 +2411,11 @@

    -

    - - supports_indexes_in_create?() - -

    +

    supports_indexes_in_create?()

    - -
    -

    Does this adapter support creating indexes in the same statement as creating the table?

    -
    - +
    +

    Does this adapter support creating indexes in the same statement as creating the table?

    +
    @@ -2849,17 +2440,9 @@

    -

    - - supports_insert_conflict_target?() - -

    +

    supports_insert_conflict_target?()

    -
    - -
    - @@ -2884,17 +2467,9 @@

    -

    - - supports_insert_on_duplicate_skip?() - -

    +

    supports_insert_on_duplicate_skip?()

    -
    - -
    - @@ -2919,17 +2494,9 @@

    -

    - - supports_insert_on_duplicate_update?() - -

    +

    supports_insert_on_duplicate_update?()

    -
    - -
    - @@ -2954,17 +2521,9 @@

    -

    - - supports_insert_returning?() - -

    +

    supports_insert_returning?()

    -
    - -
    - @@ -2989,17 +2548,11 @@

    -

    - - supports_json?() - -

    +

    supports_json?()

    - -
    -

    Does this adapter support JSON data type?

    -
    - +
    +

    Does this adapter support JSON data type?

    +
    @@ -3024,17 +2577,9 @@

    -

    - - supports_lazy_transactions?() - -

    +

    supports_lazy_transactions?()

    -
    - -
    - @@ -3059,17 +2604,11 @@

    -

    - - supports_materialized_views?() - -

    +

    supports_materialized_views?()

    - -
    -

    Does this adapter support materialized views?

    -
    - +
    +

    Does this adapter support materialized views?

    +
    @@ -3094,17 +2633,9 @@

    -

    - - supports_nulls_not_distinct?() - -

    +

    supports_nulls_not_distinct?()

    -
    - -
    - @@ -3129,17 +2660,11 @@

    -

    - - supports_optimizer_hints?() - -

    +

    supports_optimizer_hints?()

    - -
    -

    Does this adapter support optimizer hints?

    -
    - +
    +

    Does this adapter support optimizer hints?

    +
    @@ -3164,17 +2689,11 @@

    -

    - - supports_partial_index?() - -

    +

    supports_partial_index?()

    - -
    -

    Does this adapter support partial indices?

    -
    - +
    +

    Does this adapter support partial indices?

    +
    @@ -3199,17 +2718,9 @@

    -

    - - supports_partitioned_indexes?() - -

    +

    supports_partitioned_indexes?()

    -
    - -
    - @@ -3234,17 +2745,9 @@

    -

    - - supports_restart_db_transaction?() - -

    +

    supports_restart_db_transaction?()

    -
    - -
    - @@ -3269,17 +2772,11 @@

    -

    - - supports_savepoints?() - -

    +

    supports_savepoints?()

    - -
    -

    Does this adapter support savepoints?

    -
    - +
    +

    Does this adapter support savepoints?

    +
    @@ -3304,17 +2801,11 @@

    -

    - - supports_transaction_isolation?() - -

    +

    supports_transaction_isolation?()

    - -
    -

    Does this adapter support setting the isolation level for a transaction?

    -
    - +
    +

    Does this adapter support setting the isolation level for a transaction?

    +
    @@ -3339,17 +2830,11 @@

    -

    - - supports_unique_constraints?() - -

    +

    supports_unique_constraints?()

    - -
    -

    Does this adapter support creating unique constraints?

    -
    - +
    +

    Does this adapter support creating unique constraints?

    +
    @@ -3374,17 +2859,11 @@

    -

    - - supports_validate_constraints?() - -

    +

    supports_validate_constraints?()

    - -
    -

    Does this adapter support creating invalid constraints?

    -
    - +
    +

    Does this adapter support creating invalid constraints?

    +
    @@ -3409,17 +2888,11 @@

    -

    - - supports_views?() - -

    +

    supports_views?()

    - -
    -

    Does this adapter support views?

    -
    - +
    +

    Does this adapter support views?

    +
    @@ -3444,17 +2917,11 @@

    -

    - - supports_virtual_columns?() - -

    +

    supports_virtual_columns?()

    - -
    -

    Does this adapter support virtual columns?

    -
    - +
    +

    Does this adapter support virtual columns?

    +
    @@ -3479,17 +2946,11 @@

    -

    - - throw_away!() - -

    +

    throw_away!()

    - -
    -

    Removes the connection from the pool and disconnect it.

    -
    - +
    +

    Removes the connection from the pool and disconnect it.

    +
    @@ -3515,17 +2976,9 @@

    -

    - - unprepared_statement() - -

    +

    unprepared_statement()

    -
    - -
    - @@ -3553,17 +3006,11 @@

    -

    - - verify!() - -

    +

    verify!()

    - -
    -

    Checks whether the connection to the database is still active (i.e. not stale). This is done under the hood by calling active?. If the connection is no longer active, then this method will reconnect to the database.

    -
    - +
    +

    Checks whether the connection to the database is still active (i.e. not stale). This is done under the hood by calling active?. If the connection is no longer active, then this method will reconnect to the database.

    +
    @@ -3605,17 +3052,9 @@

    -

    - - verify_timeout() - -

    +

    verify_timeout()

    -
    - -
    - @@ -3643,17 +3082,9 @@

    Instance Private methods

    -

    - - log(sql, name = "SQL", binds = [], type_casted_binds = [], async: false, allow_retry: false, &block) - -

    +

    log(sql, name = "SQL", binds = [], type_casted_binds = [], async: false, allow_retry: false, &block)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html index 9666b91889..b78d2fa7aa 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter/Version.html @@ -97,17 +97,9 @@

    Attributes

    Class Public methods

    -

    - - new(version_string, full_version_string = nil) - -

    +

    new(version_string, full_version_string = nil)

    -
    - -
    - @@ -137,17 +129,9 @@

    Instance Public methods

    -

    - - <=>(version_string) - -

    +

    <=>(version_string)

    -
    - -
    - @@ -172,17 +156,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html index 6d69c85ea5..2bd885e536 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/AbstractMysqlAdapter.html @@ -436,17 +436,9 @@

    Constants

    Class Public methods

    -

    - - dbconsole(config, options = {}) - -

    +

    dbconsole(config, options = {})

    -
    - -
    - @@ -495,20 +487,14 @@

    -

    - - emulate_booleans - -

    +

    emulate_booleans

    - -
    -

    By default, the Mysql2Adapter will consider all columns of type tinyint(1) as boolean. If you wish to disable this emulation you can add the following line to your application.rb file:

    +
    +

    By default, the Mysql2Adapter will consider all columns of type tinyint(1) as boolean. If you wish to disable this emulation you can add the following line to your application.rb file:

    ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false
     
    -
    - +
    @@ -536,17 +522,11 @@

    Instance Public methods

    -

    - - charset() - -

    +

    charset()

    - -
    -

    Returns the database character set.

    -
    - +
    +

    Returns the database character set.

    +
    @@ -571,17 +551,9 @@

    -

    - - check_constraints(table_name) - -

    +

    check_constraints(table_name)

    -
    - -
    - @@ -641,17 +613,11 @@

    -

    - - collation() - -

    +

    collation()

    - -
    -

    Returns the database collation strategy.

    -
    - +
    +

    Returns the database collation strategy.

    +
    @@ -676,15 +642,10 @@

    -

    - - create_database(name, options = {}) - -

    +

    create_database(name, options = {})

    - -
    -

    Create a new MySQL database with optional :charset and :collation. Charset defaults to utf8mb4.

    +
    +

    Create a new MySQL database with optional :charset and :collation. Charset defaults to utf8mb4.

    Example:

    @@ -692,8 +653,7 @@

    create_database 'matt_development' create_database 'matt_development', charset: :big5 -

    - +
    @@ -726,17 +686,9 @@

    -

    - - current_database() - -

    +

    current_database()

    -
    - -
    - @@ -761,15 +713,10 @@

    -

    - - drop_table(*table_names, **options) - -

    +

    drop_table(*table_names, **options)

    - -
    -

    Drops a table or tables from the database.

    +
    +

    Drops a table or tables from the database.

    :force

    Set to :cascade to drop dependent objects as well. Defaults to false.

    @@ -782,8 +729,7 @@

    Although this command ignores most options and the block if one is given, it can be helpful to provide these in a migration’s change method so it can be reverted. In that case, options and the block will be used by create_table except if you provide more than one table which is not supported.

    -
    - +
    @@ -809,17 +755,9 @@

    -

    - - foreign_keys(table_name) - -

    +

    foreign_keys(table_name)

    -
    - -
    - @@ -885,17 +823,9 @@

    -

    - - index_algorithms() - -

    +

    index_algorithms()

    -
    - -
    - @@ -925,17 +855,11 @@

    -

    - - quote_string(string) - -

    +

    quote_string(string)

    - -
    -

    Quotes strings for use in SQL input.

    -
    - +
    +

    Quotes strings for use in SQL input.

    +
    @@ -962,17 +886,11 @@

    -

    - - recreate_database(name, options = {}) - -

    +

    recreate_database(name, options = {})

    - -
    -

    Drops the database specified on the name attribute and creates it again using the provided options.

    -
    - +
    +

    Drops the database specified on the name attribute and creates it again using the provided options.

    +
    @@ -1000,17 +918,9 @@

    -

    - - rename_index(table_name, old_name, new_name) - -

    +

    rename_index(table_name, old_name, new_name)

    -
    - -
    - @@ -1041,22 +951,16 @@

    -

    - - rename_table(table_name, new_name, **options) - -

    +

    rename_table(table_name, new_name, **options)

    - -
    -

    Renames a table.

    +
    +

    Renames a table.

    Example:

    rename_table('octopuses', 'octopi')
     
    -
    - +
    @@ -1085,17 +989,11 @@

    -

    - - show_variable(name) - -

    +

    show_variable(name)

    - -
    -

    SHOW VARIABLES LIKE ‘name’

    -
    - +
    +

    SHOW VARIABLES LIKE ‘name’

    +
    @@ -1122,17 +1020,9 @@

    -

    - - strict_mode?() - -

    +

    strict_mode?()

    -
    - -
    - @@ -1157,17 +1047,9 @@

    -

    - - supports_advisory_locks?() - -

    +

    supports_advisory_locks?()

    -
    - -
    - @@ -1192,17 +1074,9 @@

    -

    - - supports_bulk_alter?() - -

    +

    supports_bulk_alter?()

    -
    - -
    - @@ -1227,17 +1101,9 @@

    -

    - - supports_check_constraints?() - -

    +

    supports_check_constraints?()

    -
    - -
    - @@ -1266,17 +1132,9 @@

    -

    - - supports_common_table_expressions?() - -

    +

    supports_common_table_expressions?()

    -
    - -
    - @@ -1305,17 +1163,9 @@

    -

    - - supports_datetime_with_precision?() - -

    +

    supports_datetime_with_precision?()

    -
    - -
    - @@ -1340,17 +1190,11 @@

    -

    - - supports_disabling_indexes?() - -

    +

    supports_disabling_indexes?()

    - -
    -

    See dev.mysql.com/doc/refman/8.0/en/invisible-indexes.html for more details on MySQL feature. See mariadb.com/kb/en/ignored-indexes/ for more details on the MariaDB feature.

    -
    - +
    +

    See dev.mysql.com/doc/refman/8.0/en/invisible-indexes.html for more details on MySQL feature. See mariadb.com/kb/en/ignored-indexes/ for more details on the MariaDB feature.

    +
    @@ -1379,17 +1223,9 @@

    -

    - - supports_explain?() - -

    +

    supports_explain?()

    -
    - -
    - @@ -1414,17 +1250,9 @@

    -

    - - supports_expression_index?() - -

    +

    supports_expression_index?()

    -
    - -
    - @@ -1449,17 +1277,9 @@

    -

    - - supports_foreign_keys?() - -

    +

    supports_foreign_keys?()

    -
    - -
    - @@ -1484,17 +1304,9 @@

    -

    - - supports_index_sort_order?() - -

    +

    supports_index_sort_order?()

    -
    - -
    - @@ -1519,17 +1331,9 @@

    -

    - - supports_indexes_in_create?() - -

    +

    supports_indexes_in_create?()

    -
    - -
    - @@ -1554,17 +1358,9 @@

    -

    - - supports_insert_on_duplicate_skip?() - -

    +

    supports_insert_on_duplicate_skip?()

    -
    - -
    - @@ -1589,17 +1385,9 @@

    -

    - - supports_insert_on_duplicate_update?() - -

    +

    supports_insert_on_duplicate_update?()

    -
    - -
    - @@ -1624,17 +1412,9 @@

    -

    - - supports_insert_returning?() - -

    +

    supports_insert_returning?()

    -
    - -
    - @@ -1659,17 +1439,11 @@

    -

    - - supports_optimizer_hints?() - -

    +

    supports_optimizer_hints?()

    - - - + @@ -1694,17 +1468,9 @@

    -

    - - supports_restart_db_transaction?() - -

    +

    supports_restart_db_transaction?()

    -
    - -
    - @@ -1729,17 +1495,9 @@

    -

    - - supports_transaction_isolation?() - -

    +

    supports_transaction_isolation?()

    -
    - -
    - @@ -1764,17 +1522,9 @@

    -

    - - supports_views?() - -

    +

    supports_views?()

    -
    - -
    - @@ -1799,17 +1549,9 @@

    -

    - - supports_virtual_columns?() - -

    +

    supports_virtual_columns?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html b/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html index 8dcbb20c55..5f3372a1c0 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection.html @@ -136,17 +136,9 @@

    Methods

    Class Public methods

    -

    - - new(abstract_schema_reflection, pool) - -

    +

    new(abstract_schema_reflection, pool)

    -
    - -
    - @@ -176,17 +168,9 @@

    Instance Public methods

    -

    - - add(name) - -

    +

    add(name)

    -
    - -
    - @@ -211,17 +195,9 @@

    -

    - - cached?(table_name) - -

    +

    cached?(table_name)

    -
    - -
    - @@ -246,17 +222,9 @@

    -

    - - clear!() - -

    +

    clear!()

    -
    - -
    - @@ -281,17 +249,9 @@

    -

    - - clear_data_source_cache!(name) - -

    +

    clear_data_source_cache!(name)

    -
    - -
    - @@ -316,17 +276,9 @@

    -

    - - columns(table_name) - -

    +

    columns(table_name)

    -
    - -
    - @@ -351,17 +303,9 @@

    -

    - - columns_hash(table_name) - -

    +

    columns_hash(table_name)

    -
    - -
    - @@ -386,17 +330,9 @@

    -

    - - columns_hash?(table_name) - -

    +

    columns_hash?(table_name)

    -
    - -
    - @@ -421,17 +357,9 @@

    -

    - - data_source_exists?(name) - -

    +

    data_source_exists?(name)

    -
    - -
    - @@ -456,17 +384,9 @@

    -

    - - data_sources(name) - -

    +

    data_sources(name)

    -
    - -
    - @@ -491,17 +411,9 @@

    -

    - - dump_to(filename) - -

    +

    dump_to(filename)

    -
    - -
    - @@ -526,17 +438,9 @@

    -

    - - indexes(table_name) - -

    +

    indexes(table_name)

    -
    - -
    - @@ -561,17 +465,9 @@

    -

    - - load!() - -

    +

    load!()

    -
    - -
    - @@ -596,17 +492,9 @@

    -

    - - primary_keys(table_name) - -

    +

    primary_keys(table_name)

    -
    - -
    - @@ -631,17 +519,9 @@

    -

    - - size() - -

    +

    size()

    -
    - -
    - @@ -666,17 +546,9 @@

    -

    - - version() - -

    +

    version()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection/FakePool.html b/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection/FakePool.html index 27d4eeae7f..21e6880280 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection/FakePool.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/BoundSchemaReflection/FakePool.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(connection) - -

    +

    new(connection)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - with_connection() - -

    +

    with_connection()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html index 7b7b60cf03..d14077a614 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ColumnMethods.html @@ -58,17 +58,11 @@

    Methods

    Instance Public methods

    -

    - - primary_key(name, type = :primary_key, **options) - -

    +

    primary_key(name, type = :primary_key, **options)

    - -
    -

    Appends a primary key definition to the table definition. Can be called multiple times, but this is probably not a good idea.

    -
    - +
    +

    Appends a primary key definition to the table definition. Can be called multiple times, but this is probably not a good idea.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html index 1415ae992f..c1a0a21870 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionHandler.html @@ -155,17 +155,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -195,17 +187,11 @@

    Instance Public methods

    -

    - - active_connections?(role = nil) - -

    +

    active_connections?(role = nil)

    - -
    -

    Returns true if there are any active connections among the connection pools that the ConnectionHandler is managing.

    -
    - +
    +

    Returns true if there are any active connections among the connection pools that the ConnectionHandler is managing.

    +
    @@ -230,17 +216,11 @@

    -

    - - clear_active_connections!(role = nil) - -

    +

    clear_active_connections!(role = nil)

    - -
    -

    Returns any connections in use by the current thread back to the pool.

    -
    - +
    +

    Returns any connections in use by the current thread back to the pool.

    +
    @@ -268,17 +248,9 @@

    -

    - - clear_all_connections!(role = nil) - -

    +

    clear_all_connections!(role = nil)

    -
    - -
    - @@ -303,19 +275,13 @@

    -

    - - clear_reloadable_connections!(role = nil) - -

    +

    clear_reloadable_connections!(role = nil)

    - -
    -

    Clears reloadable connection caches in all connection pools.

    +
    +

    Clears reloadable connection caches in all connection pools.

    See ConnectionPool#clear_reloadable_connections! for details.

    -
    - +
    @@ -340,17 +306,11 @@

    -

    - - connected?(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard) - -

    +

    connected?(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)

    - -
    -

    Returns true if a connection that’s accessible to this class has already been opened.

    -
    - +
    +

    Returns true if a connection that’s accessible to this class has already been opened.

    +
    @@ -376,22 +336,18 @@

    -

    - - connection_pool_list(role = nil) - -

    +

    connection_pool_list(role = nil)

    - -
    -

    Returns the pools for a connection handler and given role. If :all is passed, all pools belonging to the connection handler will be returned.

    -
    - +
    +

    Returns the pools for a connection handler and given role. If :all is passed, all pools belonging to the connection handler will be returned.

    +
    -
    - Also aliased as: connection_pools -
    +

    + Also aliased as: + + connection_pools. +

    @@ -419,24 +375,17 @@

    -

    - - connection_pools(role = nil) - -

    +

    connection_pools(role = nil)

    -
    - -
    - -
    - Alias for: connection_pool_list -
    +

    + Alias for: + connection_pool_list. +

    @@ -444,17 +393,9 @@

    -

    - - establish_connection(config, owner_name: Base, role: Base.current_role, shard: Base.current_shard, clobber: false) - -

    +

    establish_connection(config, owner_name: Base, role: Base.current_role, shard: Base.current_shard, clobber: false)

    -
    - -
    - @@ -515,19 +456,13 @@

    -

    - - flush_idle_connections!(role = nil) - -

    +

    flush_idle_connections!(role = nil)

    - -
    -

    Disconnects all currently idle connections.

    +
    +

    Disconnects all currently idle connections.

    See ConnectionPool#flush! for details.

    -
    - +
    @@ -552,17 +487,9 @@

    -

    - - remove_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard) - -

    +

    remove_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard)

    -
    - -
    - @@ -589,17 +516,11 @@

    -

    - - retrieve_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard, strict: false) - -

    +

    retrieve_connection_pool(connection_name, role: ActiveRecord::Base.current_role, shard: ActiveRecord::Base.current_shard, strict: false)

    - -
    -

    Retrieving the connection pool happens a lot, so we cache it in @connection_name_to_pool_manager. This makes retrieving the connection pool O(1) once the process is warm. When a connection is established or removed, we invalidate the cache.

    -
    - +
    +

    Retrieving the connection pool happens a lot, so we cache it in @connection_name_to_pool_manager. This makes retrieving the connection pool O(1) once the process is warm. When a connection is established or removed, we invalidate the cache.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html index 25ddc7c224..e377fcaedc 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html @@ -381,17 +381,9 @@

    Attributes

    Class Public methods

    -

    - - install_executor_hooks(executor = ActiveSupport::Executor) - -

    +

    install_executor_hooks(executor = ActiveSupport::Executor)

    -
    - -
    - @@ -416,19 +408,13 @@

    -

    - - new(pool_config) - -

    +

    new(pool_config)

    - -
    -

    Creates a new ConnectionPool object. pool_config is a PoolConfig object which describes database connection information (e.g. adapter, host name, username, password, etc), as well as the maximum size for this ConnectionPool.

    +
    +

    Creates a new ConnectionPool object. pool_config is a PoolConfig object which describes database connection information (e.g. adapter, host name, username, password, etc), as well as the maximum size for this ConnectionPool.

    The default ConnectionPool maximum size is 5.

    -
    - +
    @@ -512,17 +498,9 @@

    Instance Public methods

    -

    - - activate() - -

    +

    activate()

    -
    - -
    - @@ -547,17 +525,9 @@

    -

    - - activated?() - -

    +

    activated?()

    -
    - -
    - @@ -582,19 +552,13 @@

    -

    - - active_connection?() - -

    +

    active_connection?()

    - -
    -

    Returns true if there is an open connection being used for the current thread.

    +
    +

    Returns true if there is an open connection being used for the current thread.

    This method only works for connections that have been obtained through lease_connection or with_connection methods. Connections obtained through checkout will not be detected by active_connection?

    -
    - +
    @@ -619,19 +583,13 @@

    -

    - - checkin(conn) - -

    +

    checkin(conn)

    - -
    -

    Check-in a database connection back into the pool, indicating that you no longer need this connection.

    +
    +

    Check-in a database connection back into the pool, indicating that you no longer need this connection.

    conn: an AbstractAdapter object, which was obtained by earlier by calling checkout on this pool.

    -
    - +
    @@ -664,15 +622,10 @@

    -

    - - checkout(checkout_timeout = @checkout_timeout) - -

    +

    checkout(checkout_timeout = @checkout_timeout)

    - -
    -

    Check-out a database connection from the pool, indicating that you want to use it. You should call checkin when you no longer need this.

    +
    +

    Check-out a database connection from the pool, indicating that you want to use it. You should call checkin when you no longer need this.

    This is done by either returning and leasing existing connection, or by creating a new connection and leasing it.

    @@ -684,8 +637,7 @@

    -

    - +
    @@ -729,22 +681,16 @@

    -

    - - clear_reloadable_connections(raise_on_acquisition_timeout = true) - -

    +

    clear_reloadable_connections(raise_on_acquisition_timeout = true)

    - -
    -

    Clears reloadable connections from the pool and re-connects connections that require reloading.

    +
    +

    Clears reloadable connections from the pool and re-connects connections that require reloading.

    Raises:

    -
    - +
    @@ -781,19 +727,13 @@

    -

    - - clear_reloadable_connections!() - -

    +

    clear_reloadable_connections!()

    - -
    -

    Clears reloadable connections from the pool and re-connects connections that require reloading.

    +
    +

    Clears reloadable connections from the pool and re-connects connections that require reloading.

    The pool first tries to gain ownership of all connections. If unable to do so within a timeout interval (default duration is spec.db_config.checkout_timeout * 2 seconds), then the pool forcefully clears the cache and reloads connections without any regard for other connection owning threads.

    -
    - +
    @@ -818,17 +758,11 @@

    -

    - - connected?() - -

    +

    connected?()

    - -
    -

    Returns true if a connection has already been opened.

    -
    - +
    +

    Returns true if a connection has already been opened.

    +
    @@ -853,21 +787,15 @@

    -

    - - connections() - -

    +

    connections()

    - -
    -

    Returns an array containing the connections currently in the pool. Access to the array does not require synchronization on the pool because the array is newly created and not retained by the pool.

    +
    +

    Returns an array containing the connections currently in the pool. Access to the array does not require synchronization on the pool because the array is newly created and not retained by the pool.

    However; this method bypasses the ConnectionPool’s thread-safe connection access pattern. A returned connection may be owned by another thread, unowned, or by happen-stance owned by the calling thread.

    Calling methods on a connection without ownership is subject to the thread-safety guarantees of the underlying method. Many of the methods on connection adapter classes are inherently multi-thread unsafe.

    -
    - +
    @@ -892,22 +820,16 @@

    -

    - - disconnect(raise_on_acquisition_timeout = true) - -

    +

    disconnect(raise_on_acquisition_timeout = true)

    - -
    -

    Disconnects all connections in the pool, and clears the pool.

    +
    +

    Disconnects all connections in the pool, and clears the pool.

    Raises:

    -
    - +
    @@ -953,19 +875,13 @@

    -

    - - disconnect!() - -

    +

    disconnect!()

    - -
    -

    Disconnects all connections in the pool, and clears the pool.

    +
    +

    Disconnects all connections in the pool, and clears the pool.

    The pool first tries to gain ownership of all connections. If unable to do so within a timeout interval (default duration is spec.db_config.checkout_timeout * 2 seconds), then the pool is forcefully disconnected without any regard for other connection owning threads.

    -
    - +
    @@ -990,17 +906,11 @@

    -

    - - flush(minimum_idle = @idle_timeout) - -

    +

    flush(minimum_idle = @idle_timeout)

    - -
    -

    Disconnect all connections that have been idle for at least minimum_idle seconds. Connections currently checked out, or that were checked in less than minimum_idle seconds ago, are unaffected.

    -
    - +
    +

    Disconnect all connections that have been idle for at least minimum_idle seconds. Connections currently checked out, or that were checked in less than minimum_idle seconds ago, are unaffected.

    +
    @@ -1057,17 +967,11 @@

    -

    - - flush!() - -

    +

    flush!()

    - -
    -

    Disconnect all currently idle connections. Connections currently checked out are unaffected. The pool will stop maintaining its minimum size until it is reactivated (such as by a subsequent checkout).

    -
    - +
    +

    Disconnect all currently idle connections. Connections currently checked out are unaffected. The pool will stop maintaining its minimum size until it is reactivated (such as by a subsequent checkout).

    +
    @@ -1096,17 +1000,11 @@

    -

    - - keep_alive(threshold = @keepalive) - -

    +

    keep_alive(threshold = @keepalive)

    - -
    -

    Prod any connections that have been idle for longer than the configured keepalive time. This will incidentally verify the connection is still alive, but the main purpose is to show the server (and any intermediate network hops) that we’re still here and using the connection.

    -
    - +
    +

    Prod any connections that have been idle for longer than the configured keepalive time. This will incidentally verify the connection is still alive, but the main purpose is to show the server (and any intermediate network hops) that we’re still here and using the connection.

    +
    @@ -1140,19 +1038,13 @@

    -

    - - lease_connection() - -

    +

    lease_connection()

    - -
    -

    Retrieve the connection associated with the current thread, or call checkout to obtain one if necessary.

    +
    +

    Retrieve the connection associated with the current thread, or call checkout to obtain one if necessary.

    lease_connection can be called any number of times; the connection is held in a cache keyed by a thread.

    -
    - +
    @@ -1180,17 +1072,9 @@

    -

    - - pool_transaction_isolation_level() - -

    +

    pool_transaction_isolation_level()

    -
    - -
    - @@ -1216,17 +1100,9 @@

    -

    - - pool_transaction_isolation_level=(isolation_level) - -

    +

    pool_transaction_isolation_level=(isolation_level)

    -
    - -
    - @@ -1252,17 +1128,11 @@

    -

    - - preconnect() - -

    +

    preconnect()

    - -
    -

    Preconnect all connections in the pool. This saves pool users from having to wait for a connection to be established when first using it after checkout.

    -
    - +
    +

    Preconnect all connections in the pool. This saves pool users from having to wait for a connection to be established when first using it after checkout.

    +
    @@ -1294,17 +1164,11 @@

    -

    - - prepopulate() - -

    +

    prepopulate()

    - -
    -

    Ensure that the pool contains at least the configured minimum number of connections.

    -
    - +
    +

    Ensure that the pool contains at least the configured minimum number of connections.

    +
    @@ -1346,17 +1210,11 @@

    -

    - - reap() - -

    +

    reap()

    - -
    -

    Recover lost connections for the pool. A lost connection can occur if a programmer forgets to checkin a connection at the end of a thread or a thread dies unexpectedly.

    -
    - +
    +

    Recover lost connections for the pool. A lost connection can occur if a programmer forgets to checkin a connection at the end of a thread or a thread dies unexpectedly.

    +
    @@ -1397,17 +1255,11 @@

    -

    - - recycle!() - -

    +

    recycle!()

    - -
    -

    Immediately mark all current connections as due for replacement, equivalent to them having reached max_age – even if there is no max_age configured.

    -
    - +
    +

    Immediately mark all current connections as due for replacement, equivalent to them having reached max_age – even if there is no max_age configured.

    +
    @@ -1440,19 +1292,13 @@

    -

    - - release_connection(existing_lease = nil) - -

    +

    release_connection(existing_lease = nil)

    - -
    -

    Signal that the thread is finished with the current connection. release_connection releases the connection-thread association and returns the connection to the pool.

    +
    +

    Signal that the thread is finished with the current connection. release_connection releases the connection-thread association and returns the connection to the pool.

    This method only works for connections that have been obtained through lease_connection or with_connection methods, connections obtained through checkout will not be automatically released.

    -
    - +
    @@ -1483,17 +1329,11 @@

    -

    - - remove(conn) - -

    +

    remove(conn)

    - -
    -

    Remove a connection from the connection pool. The connection will remain open and active but will no longer be managed by this pool.

    -
    - +
    +

    Remove a connection from the connection pool. The connection will remain open and active but will no longer be managed by this pool.

    +
    @@ -1543,17 +1383,9 @@

    -

    - - retire_old_connections(max_age = @max_age) - -

    +

    retire_old_connections(max_age = @max_age)

    -
    - -
    - @@ -1584,17 +1416,9 @@

    -

    - - schema_cache() - -

    +

    schema_cache()

    -
    - -
    - @@ -1619,17 +1443,9 @@

    -

    - - schema_reflection=(schema_reflection) - -

    +

    schema_reflection=(schema_reflection)

    -
    - -
    - @@ -1655,20 +1471,14 @@

    -

    - - stat() - -

    +

    stat()

    - -
    -

    Returns the connection pool’s usage statistic.

    +
    +

    Returns the connection pool’s usage statistic.

    ActiveRecord::Base.connection_pool.stat # => { size: 15, connections: 1, busy: 1, dead: 0, idle: 0, waiting: 0, checkout_timeout: 5 }
     
    -
    - +
    @@ -1703,17 +1513,11 @@

    -

    - - with_connection(prevent_permanent_checkout: false) - -

    +

    with_connection(prevent_permanent_checkout: false)

    - -
    -

    Yields a connection from the connection pool to the block. If no connection is already checked out by the current thread, a connection will be checked out from the pool, yielded to the block, and then returned to the pool when the block is finished. If a connection has already been checked out on the current thread, such as via lease_connection or with_connection, that existing connection will be the one yielded and it will not be returned to the pool automatically at the end of the block; it is expected that such an existing connection will be properly returned to the pool by the code that checked it out.

    -
    - +
    +

    Yields a connection from the connection pool to the block. If no connection is already checked out by the current thread, a connection will be checked out from the pool, yielded to the block, and then returned to the pool when the block is finished. If a connection has already been checked out on the current thread, such as via lease_connection or with_connection, that existing connection will be the one yielded and it will not be returned to the pool automatically at the end of the block; it is expected that such an existing connection will be properly returned to the pool by the code that checked it out.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html index edcf42d4fd..9c717e4e36 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Queue.html @@ -103,17 +103,9 @@

    Methods

    Class Public methods

    -

    - - new(lock = Monitor.new) - -

    +

    new(lock = Monitor.new)

    -
    - -
    - @@ -145,17 +137,11 @@

    Instance Public methods

    -

    - - add(element) - -

    +

    add(element)

    - -
    -

    Add element to the queue. Never blocks.

    -
    - +
    +

    Add element to the queue. Never blocks.

    +
    @@ -183,17 +169,11 @@

    -

    - - add_back(element) - -

    +

    add_back(element)

    - -
    -

    Add element to the back of the queue. Never blocks.

    -
    - +
    +

    Add element to the back of the queue. Never blocks.

    +
    @@ -221,17 +201,11 @@

    -

    - - any_waiting?() - -

    +

    any_waiting?()

    - -
    -

    Test if any threads are currently waiting on the queue.

    -
    - +
    +

    Test if any threads are currently waiting on the queue.

    +
    @@ -258,17 +232,11 @@

    -

    - - clear() - -

    +

    clear()

    - -
    -

    Remove all elements from the queue.

    -
    - +
    +

    Remove all elements from the queue.

    +
    @@ -295,17 +263,11 @@

    -

    - - delete(element) - -

    +

    delete(element)

    - -
    -

    If element is in the queue, remove and return it, or nil.

    -
    - +
    +

    If element is in the queue, remove and return it, or nil.

    +
    @@ -332,17 +294,11 @@

    -

    - - num_waiting() - -

    +

    num_waiting()

    - -
    -

    Returns the number of threads currently waiting on this queue.

    -
    - +
    +

    Returns the number of threads currently waiting on this queue.

    +
    @@ -369,15 +325,10 @@

    -

    - - poll(timeout = nil) - -

    +

    poll(timeout = nil)

    - -
    -

    Remove the head of the queue.

    +
    +

    Remove the head of the queue.

    If timeout is not given, remove and return the head of the queue if the number of available elements is strictly greater than the number of threads currently waiting (that is, don’t jump ahead in line). Otherwise, return nil.

    @@ -389,8 +340,7 @@

    becomes available within timeout seconds,

    -

    - +
    @@ -415,17 +365,11 @@

    -

    - - size() - -

    +

    size()

    - -
    -

    Number of elements in the queue.

    -
    - +
    +

    Number of elements in the queue.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html index 7f81e4c3c7..338a7d2dd4 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/ConnectionPool/Reaper.html @@ -111,17 +111,9 @@

    Attributes

    Class Public methods

    -

    - - new(pool, frequency) - -

    +

    new(pool, frequency)

    -
    - -
    - @@ -151,17 +143,9 @@

    Instance Public methods

    -

    - - run() - -

    +

    run()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html index 4d224d1c6b..7cc5be631a 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseLimits.html @@ -66,17 +66,11 @@

    Methods

    Instance Public methods

    -

    - - index_name_length() - -

    +

    index_name_length()

    - -
    -

    Returns the maximum length of an index name.

    -
    - +
    +

    Returns the maximum length of an index name.

    +
    @@ -101,17 +95,11 @@

    -

    - - table_alias_length() - -

    +

    table_alias_length()

    - -
    -

    Returns the maximum length of a table alias.

    -
    - +
    +

    Returns the maximum length of a table alias.

    +
    @@ -136,17 +124,11 @@

    -

    - - table_name_length() - -

    +

    table_name_length()

    - -
    -

    Returns the maximum length of a table name.

    -
    - +
    +

    Returns the maximum length of a table name.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html index 5202bbbb55..2d9afdee0a 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/DatabaseStatements.html @@ -193,17 +193,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -233,17 +225,11 @@

    Instance Public methods

    -

    - - add_transaction_record(record, ensure_finalize = true) - -

    +

    add_transaction_record(record, ensure_finalize = true)

    - -
    -

    Register a record with the current transaction so that its after_commit and after_rollback callbacks can be called.

    -
    - +
    +

    Register a record with the current transaction so that its after_commit and after_rollback callbacks can be called.

    +
    @@ -268,17 +254,11 @@

    -

    - - begin_db_transaction() - -

    +

    begin_db_transaction()

    - -
    -

    Begins the transaction (and turns off auto-committing).

    -
    - +
    +

    Begins the transaction (and turns off auto-committing).

    +
    @@ -301,17 +281,11 @@

    -

    - - begin_isolated_db_transaction(isolation) - -

    +

    begin_isolated_db_transaction(isolation)

    - -
    -

    Begins the transaction with the isolation level set. Raises an error by default; adapters that support setting the isolation level should implement this method.

    -
    - +
    +

    Begins the transaction with the isolation level set. Raises an error by default; adapters that support setting the isolation level should implement this method.

    +
    @@ -336,17 +310,11 @@

    -

    - - commit_db_transaction() - -

    +

    commit_db_transaction()

    - -
    -

    Commits the transaction (and turns on auto-committing).

    -
    - +
    +

    Commits the transaction (and turns on auto-committing).

    +
    @@ -369,24 +337,17 @@

    -

    - - create(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [], returning: nil) - -

    +

    create(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [], returning: nil)

    -
    - -
    - -
    - Alias for: insert -
    +

    + Alias for: + insert. +

    @@ -394,17 +355,9 @@

    -

    - - default_sequence_name(table, column) - -

    +

    default_sequence_name(table, column)

    -
    - -
    - @@ -429,17 +382,11 @@

    -

    - - delete(arel, name = nil, binds = []) - -

    +

    delete(arel, name = nil, binds = [])

    - -
    -

    Executes the delete statement and returns the number of rows affected.

    -
    - +
    +

    Executes the delete statement and returns the number of rows affected.

    +
    @@ -465,17 +412,9 @@

    -

    - - empty_insert_statement_value(primary_key = nil) - -

    +

    empty_insert_statement_value(primary_key = nil)

    -
    - -
    - @@ -500,17 +439,11 @@

    -

    - - exec_delete(sql, name = nil, binds = []) - -

    +

    exec_delete(sql, name = nil, binds = [])

    - -
    -

    Executes delete sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

    -
    - +
    +

    Executes delete sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

    +
    @@ -535,17 +468,11 @@

    -

    - - exec_insert(sql, name = nil, binds = [], pk = nil, sequence_name = nil, returning: nil) - -

    +

    exec_insert(sql, name = nil, binds = [], pk = nil, sequence_name = nil, returning: nil)

    - -
    -

    Executes insert sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement. Some adapters support the ‘returning` keyword argument which allows to control the result of the query: `nil` is the default value and maintains default behavior. If an array of column names is passed - the result will contain values of the specified columns from the inserted row.

    -
    - +
    +

    Executes insert sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement. Some adapters support the ‘returning` keyword argument which allows to control the result of the query: `nil` is the default value and maintains default behavior. If an array of column names is passed - the result will contain values of the specified columns from the inserted row.

    +
    @@ -571,19 +498,13 @@

    -

    - - exec_query(sql, name = "SQL", binds = [], prepare: false) - -

    +

    exec_query(sql, name = "SQL", binds = [], prepare: false)

    - -
    -

    Executes sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

    +
    +

    Executes sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

    Note: the query is assumed to have side effects and the query cache will be cleared. If the query is read-only, consider using select_all instead.

    -
    - +
    @@ -608,17 +529,11 @@

    -

    - - exec_update(sql, name = nil, binds = []) - -

    +

    exec_update(sql, name = nil, binds = [])

    - -
    -

    Executes update sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

    -
    - +
    +

    Executes update sql statement in the context of this connection using binds as the bind substitutes. name is logged along with the executed sql statement.

    +
    @@ -643,23 +558,17 @@

    -

    - - execute(sql, name = nil, allow_retry: false) - -

    +

    execute(sql, name = nil, allow_retry: false)

    - -
    -

    Executes the SQL statement in the context of this connection and returns the raw result from the connection adapter.

    +
    +

    Executes the SQL statement in the context of this connection and returns the raw result from the connection adapter.

    Setting allow_retry to true causes the db to reconnect and retry executing the SQL statement in case of a connection-related exception. This option should only be enabled for known idempotent queries.

    Note: the query is assumed to have side effects and the query cache will be cleared. If the query is read-only, consider using select_all instead.

    Note: depending on your database connector, the result returned by this method may be manually memory managed. Consider using exec_query wrapper instead.

    -
    - +
    @@ -684,19 +593,13 @@

    -

    - - high_precision_current_timestamp() - -

    +

    high_precision_current_timestamp()

    - -
    -

    Returns an Arel SQL literal for the CURRENT_TIMESTAMP for usage with arbitrary precision date/time columns.

    +
    +

    Returns an Arel SQL literal for the CURRENT_TIMESTAMP for usage with arbitrary precision date/time columns.

    Adapters supporting datetime with precision should override this to provide as much precision as is available.

    -
    - +
    @@ -721,26 +624,22 @@

    -

    - - insert(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [], returning: nil) - -

    +

    insert(arel, name = nil, pk = nil, id_value = nil, sequence_name = nil, binds = [], returning: nil)

    - -
    -

    Executes an INSERT query and returns the new record’s ID

    +
    +

    Executes an INSERT query and returns the new record’s ID

    id_value will be returned unless the value is nil, in which case the database will attempt to calculate the last inserted id and return that value.

    If the next id was calculated in advance (as in Oracle), it should be passed in as id_value. Some adapters support the ‘returning` keyword argument which allows defining the return value of the method: `nil` is the default value and maintains default behavior. If an array of column names is passed - an array of is returned from the method representing values of the specified columns from the inserted row.

    -
    - +
    -
    - Also aliased as: create -
    +

    + Also aliased as: + + create. +

    @@ -769,17 +668,11 @@

    -

    - - insert_fixture(fixture, table_name) - -

    +

    insert_fixture(fixture, table_name)

    - -
    -

    Inserts the given fixture into the table. Overridden in adapters that require something beyond a simple insert (e.g. Oracle). Most of adapters should implement insert_fixtures_set that leverages bulk SQL insert. We keep this method to provide fallback for databases like SQLite that do not support bulk inserts.

    -
    - +
    +

    Inserts the given fixture into the table. Overridden in adapters that require something beyond a simple insert (e.g. Oracle). Most of adapters should implement insert_fixtures_set that leverages bulk SQL insert. We keep this method to provide fallback for databases like SQLite that do not support bulk inserts.

    +
    @@ -804,17 +697,9 @@

    -

    - - insert_fixtures_set(fixture_set, tables_to_delete = []) - -

    +

    insert_fixtures_set(fixture_set, tables_to_delete = [])

    -
    - -
    - @@ -847,17 +732,11 @@

    -

    - - reset_isolation_level() - -

    +

    reset_isolation_level()

    - -
    -

    Hook point called after an isolated DB transaction is committed or rolled back. Most adapters don’t need to implement anything because the isolation level is set on a per transaction basis. But some databases like SQLite set it on a per connection level and need to explicitly reset it after commit or rollback.

    -
    - +
    +

    Hook point called after an isolated DB transaction is committed or rolled back. Most adapters don’t need to implement anything because the isolation level is set on a per transaction basis. But some databases like SQLite set it on a per connection level and need to explicitly reset it after commit or rollback.

    +
    @@ -881,17 +760,11 @@

    -

    - - reset_sequence!(table, column, sequence = nil) - -

    +

    reset_sequence!(table, column, sequence = nil)

    - -
    -

    Set the sequence to the max value of the table’s column.

    -
    - +
    +

    Set the sequence to the max value of the table’s column.

    +
    @@ -916,17 +789,9 @@

    -

    - - restart_db_transaction() - -

    +

    restart_db_transaction()

    -
    - -
    - @@ -951,17 +816,11 @@

    -

    - - rollback_db_transaction() - -

    +

    rollback_db_transaction()

    - -
    -

    Rolls back the transaction (and turns on auto-committing). Must be done if the transaction block raises an exception or returns false.

    -
    - +
    +

    Rolls back the transaction (and turns on auto-committing). Must be done if the transaction block raises an exception or returns false.

    +
    @@ -988,17 +847,9 @@

    -

    - - rollback_to_savepoint(name = nil) - -

    +

    rollback_to_savepoint(name = nil)

    -
    - -
    - @@ -1023,17 +874,11 @@

    -

    - - select_all(arel, name = nil, binds = [], preparable: nil, async: false, allow_retry: false) - -

    +

    select_all(arel, name = nil, binds = [], preparable: nil, async: false, allow_retry: false)

    - -
    -

    Returns an ActiveRecord::Result instance.

    -
    - +
    +

    Returns an ActiveRecord::Result instance.

    +
    @@ -1067,17 +912,11 @@

    -

    - - select_one(arel, name = nil, binds = [], async: false) - -

    +

    select_one(arel, name = nil, binds = [], async: false)

    - -
    -

    Returns a record hash with the column names as keys and column values as values.

    -
    - +
    +

    Returns a record hash with the column names as keys and column values as values.

    +
    @@ -1102,17 +941,11 @@

    -

    - - select_rows(arel, name = nil, binds = [], async: false) - -

    +

    select_rows(arel, name = nil, binds = [], async: false)

    - -
    -

    Returns an array of arrays containing the field values. Order is the same as that returned by columns.

    -
    - +
    +

    Returns an array of arrays containing the field values. Order is the same as that returned by columns.

    +
    @@ -1137,17 +970,11 @@

    -

    - - select_value(arel, name = nil, binds = [], async: false) - -

    +

    select_value(arel, name = nil, binds = [], async: false)

    - -
    -

    Returns a single value from a record

    -
    - +
    +

    Returns a single value from a record

    +
    @@ -1172,20 +999,14 @@

    -

    - - select_values(arel, name = nil, binds = []) - -

    +

    select_values(arel, name = nil, binds = [])

    - -
    -

    Returns an array of the values of the first column in a select:

    +
    +

    Returns an array of the values of the first column in a select:

    select_values("SELECT id FROM companies LIMIT 3") => [1,2,3]
     
    -
    - +
    @@ -1210,17 +1031,11 @@

    -

    - - to_sql(arel_or_sql_string, binds = []) - -

    +

    to_sql(arel_or_sql_string, binds = [])

    - -
    -

    Converts an arel AST to SQL

    -
    - +
    +

    Converts an arel AST to SQL

    +
    @@ -1246,15 +1061,10 @@

    -

    - - transaction(requires_new: nil, isolation: nil, &block) - -

    +

    transaction(requires_new: nil, isolation: nil, &block)

    - -
    -

    Runs the given block in a database transaction, and returns the result of the block.

    +
    +

    Runs the given block in a database transaction, and returns the result of the block.

    Transaction callbacks

    @@ -1359,8 +1169,7 @@

    -

    - - transaction_isolation_levels() - -

    +

    transaction_isolation_levels()

    -
    - -
    - @@ -1445,17 +1246,9 @@

    -

    - - transaction_open?() - -

    +

    transaction_open?()

    -
    - -
    - @@ -1480,17 +1273,11 @@

    -

    - - truncate(table_name, name = nil) - -

    +

    truncate(table_name, name = nil)

    - -
    -

    Executes the truncate statement.

    -
    - +
    +

    Executes the truncate statement.

    +
    @@ -1515,17 +1302,11 @@

    -

    - - update(arel, name = nil, binds = []) - -

    +

    update(arel, name = nil, binds = [])

    - -
    -

    Executes the update statement and returns the number of rows affected.

    -
    - +
    +

    Executes the update statement and returns the number of rows affected.

    +
    @@ -1551,17 +1332,11 @@

    -

    - - write_query?(sql) - -

    +

    write_query?(sql)

    - -
    -

    Determines whether the SQL statement is a write query.

    -
    - +
    +

    Determines whether the SQL statement is a write query.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html index df91192d44..adec89e5ba 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable.html @@ -75,24 +75,17 @@

    Methods

    Instance Public methods

    -

    - - deduplicate() - -

    +

    deduplicate()

    -
    - -
    - -
    - Also aliased as: -@ -
    +

    + Also aliased as: + + -@. +

    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html index 005d5d0067..a10fbbb7d6 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Deduplicable/ClassMethods.html @@ -62,17 +62,9 @@

    Methods

    Instance Public methods

    -

    - - new(*, **) - -

    +

    new(*, **)

    -
    - -
    - @@ -97,17 +89,9 @@

    -

    - - registry() - -

    +

    registry()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html index 79842102d3..4239e09527 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/ColumnMethods.html @@ -90,17 +90,9 @@

    Methods

    Instance Public methods

    -

    - - blob(*names, **options) - -

    +

    blob(*names, **options)

    -
    - -
    - @@ -113,17 +105,9 @@

    -

    - - longblob(*names, **options) - -

    +

    longblob(*names, **options)

    -
    - -
    - @@ -136,17 +120,9 @@

    -

    - - longtext(*names, **options) - -

    +

    longtext(*names, **options)

    -
    - -
    - @@ -159,17 +135,9 @@

    -

    - - mediumblob(*names, **options) - -

    +

    mediumblob(*names, **options)

    -
    - -
    - @@ -182,17 +150,9 @@

    -

    - - mediumtext(*names, **options) - -

    +

    mediumtext(*names, **options)

    -
    - -
    - @@ -205,17 +165,9 @@

    -

    - - tinyblob(*names, **options) - -

    +

    tinyblob(*names, **options)

    -
    - -
    - @@ -228,17 +180,9 @@

    -

    - - tinytext(*names, **options) - -

    +

    tinytext(*names, **options)

    -
    - -
    - @@ -251,17 +195,9 @@

    -

    - - unsigned_bigint(*names, **options) - -

    +

    unsigned_bigint(*names, **options)

    -
    - -
    - @@ -286,17 +222,9 @@

    -

    - - unsigned_integer(*names, **options) - -

    +

    unsigned_integer(*names, **options)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html index c34a87afad..f0b709b333 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/DatabaseStatements.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - build_explain_clause(options = []) - -

    +

    build_explain_clause(options = [])

    -
    - -
    - @@ -109,17 +101,9 @@

    -

    - - explain(arel, binds = [], options = []) - -

    +

    explain(arel, binds = [], options = [])

    -
    - -
    - @@ -149,17 +133,9 @@

    -

    - - high_precision_current_timestamp() - -

    +

    high_precision_current_timestamp()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/Table.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/Table.html index c2c7d798e4..1603e54b57 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/Table.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/Table.html @@ -88,15 +88,10 @@

    Included Modules

    Instance Public methods

    -

    - - disable_index(index_name) - -

    +

    disable_index(index_name)

    - -
    -

    Disables an index not to be used by query optimizers.

    +
    +

    Disables an index not to be used by query optimizers.

    t.disable_index(:email)
     
    @@ -104,8 +99,7 @@

    Note: only supported by MySQL version 8.0.0 and greater, and MariaDB version 10.6.0 and greater.

    See connection.disable_index

    -

    - +
    @@ -130,15 +124,10 @@

    -

    - - enable_index(index_name) - -

    +

    enable_index(index_name)

    - -
    -

    Enables an index to be used by query optimizers.

    +
    +

    Enables an index to be used by query optimizers.

    t.enable_index(:email)
     
    @@ -146,8 +135,7 @@

    Note: only supported by MySQL version 8.0.0 and greater, and MariaDB version 10.6.0 and greater.

    See connection.enable_index

    -

    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html index 4de9a62ded..8fca80aaa8 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/MySQL/TableDefinition.html @@ -105,17 +105,9 @@

    Attributes

    Class Public methods

    -

    - - new(conn, name, charset: nil, collation: nil, **) - -

    +

    new(conn, name, charset: nil, collation: nil, **)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html b/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html index 575c52ff04..19a43ff348 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Mysql2Adapter.html @@ -189,17 +189,9 @@

    Constants

    Class Public methods

    -

    - - new(...) - -

    +

    new(...)

    -
    - -
    - @@ -235,17 +227,9 @@

    -

    - - new_client(config) - -

    +

    new_client(config)

    -
    - -
    - @@ -285,17 +269,9 @@

    Instance Public methods

    -

    - - active?() - -

    +

    active?()

    -
    - -
    - @@ -327,17 +303,9 @@

    -

    - - connected?() - -

    +

    connected?()

    -
    - -
    - @@ -362,17 +330,11 @@

    -

    - - disconnect!() - -

    +

    disconnect!()

    - -
    -

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    -
    - +
    +

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    +
    @@ -401,17 +363,9 @@

    -

    - - error_number(exception) - -

    +

    error_number(exception)

    -
    - -
    - @@ -436,17 +390,9 @@

    -

    - - savepoint_errors_invalidate_transactions?() - -

    +

    savepoint_errors_invalidate_transactions?()

    -
    - -
    - @@ -471,17 +417,9 @@

    -

    - - supports_comments?() - -

    +

    supports_comments?()

    -
    - -
    - @@ -506,17 +444,9 @@

    -

    - - supports_comments_in_create?() - -

    +

    supports_comments_in_create?()

    -
    - -
    - @@ -541,17 +471,9 @@

    -

    - - supports_json?() - -

    +

    supports_json?()

    -
    - -
    - @@ -576,17 +498,9 @@

    -

    - - supports_lazy_transactions?() - -

    +

    supports_lazy_transactions?()

    -
    - -
    - @@ -611,17 +525,9 @@

    -

    - - supports_savepoints?() - -

    +

    supports_savepoints?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/NullPool/NullConfig.html b/src/classes/ActiveRecord/ConnectionAdapters/NullPool/NullConfig.html index e0a01d1351..875d04e7ab 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/NullPool/NullConfig.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/NullPool/NullConfig.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - method_missing(...) - -

    +

    method_missing(...)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html index 9b4ae589f7..b7baf19e26 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/AlterTable.html @@ -111,17 +111,9 @@

    Attributes

    Class Public methods

    -

    - - new(td) - -

    +

    new(td)

    -
    - -
    - @@ -153,17 +145,9 @@

    Instance Public methods

    -

    - - add_exclusion_constraint(expression, options) - -

    +

    add_exclusion_constraint(expression, options)

    -
    - -
    - @@ -188,17 +172,9 @@

    -

    - - add_unique_constraint(column_name, options) - -

    +

    add_unique_constraint(column_name, options)

    -
    - -
    - @@ -223,17 +199,9 @@

    -

    - - validate_constraint(name) - -

    +

    validate_constraint(name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html index 3fe2206c1d..08faf221e5 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/ColumnMethods.html @@ -186,17 +186,9 @@

    Methods

    Instance Public methods

    -

    - - bigserial(*names, **options) - -

    +

    bigserial(*names, **options)

    -
    - -
    - @@ -209,17 +201,9 @@

    -

    - - bit(*names, **options) - -

    +

    bit(*names, **options)

    -
    - -
    - @@ -232,17 +216,9 @@

    -

    - - bit_varying(*names, **options) - -

    +

    bit_varying(*names, **options)

    -
    - -
    - @@ -255,17 +231,9 @@

    -

    - - box(*names, **options) - -

    +

    box(*names, **options)

    -
    - -
    - @@ -278,17 +246,9 @@

    -

    - - cidr(*names, **options) - -

    +

    cidr(*names, **options)

    -
    - -
    - @@ -301,17 +261,9 @@

    -

    - - circle(*names, **options) - -

    +

    circle(*names, **options)

    -
    - -
    - @@ -324,17 +276,9 @@

    -

    - - citext(*names, **options) - -

    +

    citext(*names, **options)

    -
    - -
    - @@ -347,17 +291,9 @@

    -

    - - daterange(*names, **options) - -

    +

    daterange(*names, **options)

    -
    - -
    - @@ -370,17 +306,9 @@

    -

    - - enum(*names, **options) - -

    +

    enum(*names, **options)

    -
    - -
    - @@ -407,17 +335,9 @@

    -

    - - hstore(*names, **options) - -

    +

    hstore(*names, **options)

    -
    - -
    - @@ -430,17 +350,9 @@

    -

    - - inet(*names, **options) - -

    +

    inet(*names, **options)

    -
    - -
    - @@ -453,17 +365,9 @@

    -

    - - int4range(*names, **options) - -

    +

    int4range(*names, **options)

    -
    - -
    - @@ -476,17 +380,9 @@

    -

    - - int8range(*names, **options) - -

    +

    int8range(*names, **options)

    -
    - -
    - @@ -499,17 +395,9 @@

    -

    - - interval(*names, **options) - -

    +

    interval(*names, **options)

    -
    - -
    - @@ -522,17 +410,9 @@

    -

    - - jsonb(*names, **options) - -

    +

    jsonb(*names, **options)

    -
    - -
    - @@ -545,17 +425,9 @@

    -

    - - line(*names, **options) - -

    +

    line(*names, **options)

    -
    - -
    - @@ -568,17 +440,9 @@

    -

    - - lseg(*names, **options) - -

    +

    lseg(*names, **options)

    -
    - -
    - @@ -591,17 +455,9 @@

    -

    - - ltree(*names, **options) - -

    +

    ltree(*names, **options)

    -
    - -
    - @@ -614,17 +470,9 @@

    -

    - - macaddr(*names, **options) - -

    +

    macaddr(*names, **options)

    -
    - -
    - @@ -637,17 +485,9 @@

    -

    - - money(*names, **options) - -

    +

    money(*names, **options)

    -
    - -
    - @@ -660,17 +500,9 @@

    -

    - - numrange(*names, **options) - -

    +

    numrange(*names, **options)

    -
    - -
    - @@ -683,17 +515,9 @@

    -

    - - oid(*names, **options) - -

    +

    oid(*names, **options)

    -
    - -
    - @@ -706,17 +530,9 @@

    -

    - - path(*names, **options) - -

    +

    path(*names, **options)

    -
    - -
    - @@ -729,17 +545,9 @@

    -

    - - point(*names, **options) - -

    +

    point(*names, **options)

    -
    - -
    - @@ -752,17 +560,9 @@

    -

    - - polygon(*names, **options) - -

    +

    polygon(*names, **options)

    -
    - -
    - @@ -775,15 +575,10 @@

    -

    - - primary_key(name, type = :primary_key, **options) - -

    +

    primary_key(name, type = :primary_key, **options)

    - -
    -

    Defines the primary key field. Use of the native PostgreSQL UUID type is supported, and can be used by defining your tables as such:

    +
    +

    Defines the primary key field. Use of the native PostgreSQL UUID type is supported, and can be used by defining your tables as such:

    create_table :stuffs, id: :uuid do |t|
       t.string :content
    @@ -805,8 +600,7 @@ 

    You may also pass a custom stored procedure that returns a UUID or use a different UUID generation function from another library.

    Note that setting the UUID primary key default value to nil will require you to assure that you always provide a UUID value before saving a record (as primary keys cannot be nil). This might be done via the SecureRandom.uuid method and a before_save callback, for instance.

    -

    - +
    @@ -835,17 +629,9 @@

    -

    - - serial(*names, **options) - -

    +

    serial(*names, **options)

    -
    - -
    - @@ -858,17 +644,9 @@

    -

    - - timestamptz(*names, **options) - -

    +

    timestamptz(*names, **options)

    -
    - -
    - @@ -881,17 +659,9 @@

    -

    - - tsrange(*names, **options) - -

    +

    tsrange(*names, **options)

    -
    - -
    - @@ -904,17 +674,9 @@

    -

    - - tstzrange(*names, **options) - -

    +

    tstzrange(*names, **options)

    -
    - -
    - @@ -927,17 +689,9 @@

    -

    - - tsvector(*names, **options) - -

    +

    tsvector(*names, **options)

    -
    - -
    - @@ -950,17 +704,9 @@

    -

    - - uuid(*names, **options) - -

    +

    uuid(*names, **options)

    -
    - -
    - @@ -973,17 +719,9 @@

    -

    - - xml(*names, **options) - -

    +

    xml(*names, **options)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html index 6004b24748..d3bf8f4d45 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/DatabaseStatements.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - build_explain_clause(options = []) - -

    +

    build_explain_clause(options = [])

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - explain(arel, binds = [], options = []) - -

    +

    explain(arel, binds = [], options = [])

    -
    - -
    - @@ -144,17 +128,9 @@

    -

    - - high_precision_current_timestamp() - -

    +

    high_precision_current_timestamp()

    -
    - -
    - @@ -179,15 +155,10 @@

    -

    - - set_constraints(deferred, *constraints) - -

    +

    set_constraints(deferred, *constraints)

    - -
    -

    Set when constraints will be checked for the current transaction.

    +
    +

    Set when constraints will be checked for the current transaction.

    Not passing any specific constraint names will set the value for all deferrable constraints.

    deferred
    @@ -196,8 +167,7 @@

    See www.postgresql.org/docs/current/sql-set-constraints.html

    -
    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html index 3134b85bd5..cbc6b52562 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/OID/Bit/Data.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(value) - -

    +

    new(value)

    -
    - -
    - @@ -114,17 +106,9 @@

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -149,17 +133,9 @@

    -

    - - hex?() - -

    +

    hex?()

    -
    - -
    - @@ -184,17 +160,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html index 192c32919e..148f6db3fe 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting.html @@ -87,17 +87,9 @@

    Methods

    Instance Public methods

    -

    - - check_int_in_range(value) - -

    +

    check_int_in_range(value)

    -
    - -
    - @@ -134,17 +126,11 @@

    -

    - - escape_bytea(value) - -

    +

    escape_bytea(value)

    - -
    -

    Escapes binary strings for bytea input to the database.

    -
    - +
    +

    Escapes binary strings for bytea input to the database.

    +
    @@ -169,17 +155,11 @@

    -

    - - quote_schema_name(schema_name) - -

    +

    quote_schema_name(schema_name)

    - -
    -

    Quotes schema names for use in SQL queries.

    -
    - +
    +

    Quotes schema names for use in SQL queries.

    +
    @@ -204,17 +184,9 @@

    -

    - - quote_table_name_for_assignment(table, attr) - -

    +

    quote_table_name_for_assignment(table, attr)

    -
    - -
    - @@ -239,17 +211,11 @@

    -

    - - unescape_bytea(value) - -

    +

    unescape_bytea(value)

    - -
    -

    Unescapes bytea output from a database to the binary string it represents. NOTE: This is NOT an inverse of escape_bytea! This is only to be used on escaped binary output from database drive.

    -
    - +
    +

    Unescapes bytea output from a database to the binary string it represents. NOTE: This is NOT an inverse of escape_bytea! This is only to be used on escaped binary output from database drive.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html index 61e6e6d7fb..4ac656e66e 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Quoting/IntegerOutOf64BitRange.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(msg) - -

    +

    new(msg)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html index c6d4394f84..55a28b4e1d 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/SchemaStatements.html @@ -182,15 +182,10 @@

    Methods

    Instance Public methods

    -

    - - add_exclusion_constraint(table_name, expression, **options) - -

    +

    add_exclusion_constraint(table_name, expression, **options)

    - -
    -

    Adds a new exclusion constraint to the table. expression is a String representation of a list of exclusion elements and operators.

    +
    +

    Adds a new exclusion constraint to the table. expression is a String representation of a list of exclusion elements and operators.

    add_exclusion_constraint :products, "price WITH =, availability_range WITH &&", using: :gist, name: "price_check"
     
    @@ -214,8 +209,7 @@

    Specify an exclusion constraint on a subset of the table (internally PostgreSQL creates a partial index for this).

    -

    - +
    @@ -244,17 +238,9 @@

    -

    - - add_foreign_key(from_table, to_table, **options) - -

    +

    add_foreign_key(from_table, to_table, **options)

    -
    - -
    - @@ -281,15 +267,10 @@

    -

    - - add_unique_constraint(table_name, column_name = nil, **options) - -

    +

    add_unique_constraint(table_name, column_name = nil, **options)

    - -
    -

    Adds a new unique constraint to the table.

    +
    +

    Adds a new unique constraint to the table.

    add_unique_constraint :sections, [:position], deferrable: :deferred, name: "unique_position", nulls_not_distinct: true
     
    @@ -318,8 +299,7 @@

    Create a unique constraint where NULLs are treated equally. Note: only supported by PostgreSQL version 15.0.0 and greater.

    -

    - +
    @@ -348,17 +328,11 @@

    -

    - - client_min_messages() - -

    +

    client_min_messages()

    - -
    -

    Returns the current client message level.

    -
    - +
    +

    Returns the current client message level.

    +
    @@ -383,17 +357,11 @@

    -

    - - client_min_messages=(level) - -

    +

    client_min_messages=(level)

    - -
    -

    Set the client message level.

    -
    - +
    +

    Set the client message level.

    +
    @@ -418,17 +386,11 @@

    -

    - - collation() - -

    +

    collation()

    - -
    -

    Returns the current database collation.

    -
    - +
    +

    Returns the current database collation.

    +
    @@ -453,23 +415,17 @@

    -

    - - create_database(name, options = {}) - -

    +

    create_database(name, options = {})

    - -
    -

    Create a new PostgreSQL database. Options include :owner, :template, :encoding (defaults to utf8), :locale_provider, :locale, :collation, :ctype, :tablespace, and :connection_limit (note that MySQL uses :charset while PostgreSQL uses :encoding).

    +
    +

    Create a new PostgreSQL database. Options include :owner, :template, :encoding (defaults to utf8), :locale_provider, :locale, :collation, :ctype, :tablespace, and :connection_limit (note that MySQL uses :charset while PostgreSQL uses :encoding).

    Example:

    create_database config[:database], config
     create_database 'foo_development', encoding: 'unicode'
     
    -
    - +
    @@ -521,17 +477,11 @@

    -

    - - create_schema(schema_name, force: nil, if_not_exists: nil) - -

    +

    create_schema(schema_name, force: nil, if_not_exists: nil)

    - -
    -

    Creates a schema for the given schema name.

    -
    - +
    +

    Creates a schema for the given schema name.

    +
    @@ -564,17 +514,11 @@

    -

    - - ctype() - -

    +

    ctype()

    - -
    -

    Returns the current database ctype.

    -
    - +
    +

    Returns the current database ctype.

    +
    @@ -599,17 +543,11 @@

    -

    - - current_database() - -

    +

    current_database()

    - -
    -

    Returns the current database name.

    -
    - +
    +

    Returns the current database name.

    +
    @@ -634,17 +572,11 @@

    -

    - - current_schema() - -

    +

    current_schema()

    - -
    -

    Returns the current schema name.

    -
    - +
    +

    Returns the current schema name.

    +
    @@ -669,17 +601,11 @@

    -

    - - drop_schema(schema_name, **options) - -

    +

    drop_schema(schema_name, **options)

    - -
    -

    Drops the schema for the given schema name.

    -
    - +
    +

    Drops the schema for the given schema name.

    +
    @@ -704,17 +630,11 @@

    -

    - - encoding() - -

    +

    encoding()

    - -
    -

    Returns the current database encoding format.

    -
    - +
    +

    Returns the current database encoding format.

    +
    @@ -739,17 +659,11 @@

    -

    - - exclusion_constraints(table_name) - -

    +

    exclusion_constraints(table_name)

    - -
    -

    Returns an array of exclusion constraints for the given table. The exclusion constraints are represented as ExclusionConstraintDefinition objects.

    -
    - +
    +

    Returns an array of exclusion constraints for the given table. The exclusion constraints are represented as ExclusionConstraintDefinition objects.

    +
    @@ -802,17 +716,9 @@

    -

    - - foreign_keys(table_name) - -

    +

    foreign_keys(table_name)

    -
    - -
    - @@ -887,17 +793,9 @@

    -

    - - foreign_table_exists?(table_name) - -

    +

    foreign_table_exists?(table_name)

    -
    - -
    - @@ -922,17 +820,9 @@

    -

    - - foreign_tables() - -

    +

    foreign_tables()

    -
    - -
    - @@ -957,17 +847,11 @@

    -

    - - index_name_exists?(table_name, index_name) - -

    +

    index_name_exists?(table_name, index_name)

    - -
    -

    Verifies existence of an index with a given name.

    -
    - +
    +

    Verifies existence of an index with a given name.

    +
    @@ -1005,22 +889,16 @@

    -

    - - remove_exclusion_constraint(table_name, expression = nil, **options) - -

    +

    remove_exclusion_constraint(table_name, expression = nil, **options)

    - -
    -

    Removes the given exclusion constraint from the table.

    +
    +

    Removes the given exclusion constraint from the table.

    remove_exclusion_constraint :products, name: "price_check"
     

    The expression parameter will be ignored if present. It can be helpful to provide this in a migration’s change method so it can be reverted. In that case, expression will be used by add_exclusion_constraint.

    -
    - +
    @@ -1047,22 +925,16 @@

    -

    - - remove_unique_constraint(table_name, column_name = nil, **options) - -

    +

    remove_unique_constraint(table_name, column_name = nil, **options)

    - -
    -

    Removes the given unique constraint from the table.

    +
    +

    Removes the given unique constraint from the table.

    remove_unique_constraint :sections, name: "unique_position"
     

    The column_name parameter will be ignored if present. It can be helpful to provide this in a migration’s change method so it can be reverted. In that case, column_name will be used by add_unique_constraint.

    -
    - +
    @@ -1089,17 +961,11 @@

    -

    - - rename_index(table_name, old_name, new_name) - -

    +

    rename_index(table_name, old_name, new_name)

    - -
    -

    Renames an index of a table. Raises error if length of new index name is greater than allowed limit.

    -
    - +
    +

    Renames an index of a table. Raises error if length of new index name is greater than allowed limit.

    +
    @@ -1127,17 +993,11 @@

    -

    - - rename_schema(schema_name, new_name) - -

    +

    rename_schema(schema_name, new_name)

    - -
    -

    Renames the schema for the given schema name.

    -
    - +
    +

    Renames the schema for the given schema name.

    +
    @@ -1162,22 +1022,16 @@

    -

    - - rename_table(table_name, new_name, **options) - -

    +

    rename_table(table_name, new_name, **options)

    - -
    -

    Renames a table. Also renames a table’s primary key sequence if the sequence name exists and matches the Active Record default.

    +
    +

    Renames a table. Also renames a table’s primary key sequence if the sequence name exists and matches the Active Record default.

    Example:

    rename_table('octopuses', 'octopi')
     
    -
    - +
    @@ -1224,17 +1078,11 @@

    -

    - - schema_exists?(name) - -

    +

    schema_exists?(name)

    - -
    -

    Returns true if schema exists.

    -
    - +
    +

    Returns true if schema exists.

    +
    @@ -1259,17 +1107,11 @@

    -

    - - schema_names() - -

    +

    schema_names()

    - -
    -

    Returns an array of schema names.

    -
    - +
    +

    Returns an array of schema names.

    +
    @@ -1300,17 +1142,11 @@

    -

    - - schema_search_path() - -

    +

    schema_search_path()

    - -
    -

    Returns the active schema search path.

    -
    - +
    +

    Returns the active schema search path.

    +
    @@ -1335,19 +1171,13 @@

    -

    - - schema_search_path=(schema_csv) - -

    +

    schema_search_path=(schema_csv)

    - -
    -

    Sets the schema search path to a string of comma-separated schema names. Names beginning with $ have to be quoted (e.g. $user => ‘$user’). See: www.postgresql.org/docs/current/static/ddl-schemas.html

    +
    +

    Sets the schema search path to a string of comma-separated schema names. Names beginning with $ have to be quoted (e.g. $user => ‘$user’). See: www.postgresql.org/docs/current/static/ddl-schemas.html

    This should be not be called manually but set in database.yml.

    -
    - +
    @@ -1376,17 +1206,9 @@

    -

    - - serial_sequence(table, column) - -

    +

    serial_sequence(table, column)

    -
    - -
    - @@ -1411,17 +1233,11 @@

    -

    - - unique_constraints(table_name) - -

    +

    unique_constraints(table_name)

    - -
    -

    Returns an array of unique constraints for the given table. The unique constraints are represented as UniqueConstraintDefinition objects.

    -
    - +
    +

    Returns an array of unique constraints for the given table. The unique constraints are represented as UniqueConstraintDefinition objects.

    +
    @@ -1480,22 +1296,16 @@

    -

    - - validate_check_constraint(table_name, **options) - -

    +

    validate_check_constraint(table_name, **options)

    - -
    -

    Validates the given check constraint.

    +
    +

    Validates the given check constraint.

    validate_check_constraint :products, name: "price_check"
     

    The options hash accepts the same keys as add_check_constraint.

    -
    - +
    @@ -1522,22 +1332,16 @@

    -

    - - validate_constraint(table_name, constraint_name) - -

    +

    validate_constraint(table_name, constraint_name)

    - -
    -

    Validates the given constraint.

    +
    +

    Validates the given constraint.

    Validates the constraint named constraint_name on accounts.

    validate_constraint :accounts, :constraint_name
     
    -
    - +
    @@ -1565,15 +1369,10 @@

    -

    - - validate_foreign_key(from_table, to_table = nil, **options) - -

    +

    validate_foreign_key(from_table, to_table = nil, **options)

    - -
    -

    Validates the given foreign key.

    +
    +

    Validates the given foreign key.

    Validates the foreign key on accounts.branch_id.

    @@ -1591,8 +1390,7 @@

    The options hash accepts the same keys as SchemaStatements#add_foreign_key.

    -

    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html index 7f3e33ef69..c0f636a608 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/Table.html @@ -104,22 +104,16 @@

    Included Modules

    Instance Public methods

    -

    - - exclusion_constraint(...) - -

    +

    exclusion_constraint(...)

    - -
    -

    Adds an exclusion constraint.

    +
    +

    Adds an exclusion constraint.

    t.exclusion_constraint("price WITH =, availability_range WITH &&", using: :gist, name: "price_check")
     

    See connection.add_exclusion_constraint

    -
    - +
    @@ -144,22 +138,16 @@

    -

    - - remove_exclusion_constraint(...) - -

    +

    remove_exclusion_constraint(...)

    - -
    -

    Removes the given exclusion constraint from the table.

    +
    +

    Removes the given exclusion constraint from the table.

    t.remove_exclusion_constraint(name: "price_check")
     

    See connection.remove_exclusion_constraint

    -
    - +
    @@ -184,22 +172,16 @@

    -

    - - remove_unique_constraint(...) - -

    +

    remove_unique_constraint(...)

    - -
    -

    Removes the given unique constraint from the table.

    +
    +

    Removes the given unique constraint from the table.

    t.remove_unique_constraint(name: "unique_position")
     

    See connection.remove_unique_constraint

    -
    - +
    @@ -224,22 +206,16 @@

    -

    - - unique_constraint(...) - -

    +

    unique_constraint(...)

    - -
    -

    Adds a unique constraint.

    +
    +

    Adds a unique constraint.

    t.unique_constraint(:position, name: 'unique_position', deferrable: :deferred, nulls_not_distinct: true)
     

    See connection.add_unique_constraint

    -
    - +
    @@ -264,23 +240,17 @@

    -

    - - validate_check_constraint(...) - -

    +

    validate_check_constraint(...)

    - -
    -

    Validates the given check constraint on the table

    +
    +

    Validates the given check constraint on the table

    t.check_constraint("price > 0", name: "price_check", validate: false)
     t.validate_check_constraint name: "price_check"
     

    See connection.validate_check_constraint

    -
    - +
    @@ -305,23 +275,17 @@

    -

    - - validate_constraint(...) - -

    +

    validate_constraint(...)

    - -
    -

    Validates the given constraint on the table.

    +
    +

    Validates the given constraint on the table.

    t.check_constraint("price > 0", name: "price_check", validate: false)
     t.validate_constraint "price_check"
     

    See connection.validate_constraint

    -
    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html index 22baa34db4..59729a231c 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQL/TableDefinition.html @@ -121,17 +121,9 @@

    Attributes

    Class Public methods

    -

    - - new(*, **) - -

    +

    new(*, **)

    -
    - -
    - @@ -163,17 +155,9 @@

    Instance Public methods

    -

    - - exclusion_constraint(expression, **options) - -

    +

    exclusion_constraint(expression, **options)

    -
    - -
    - @@ -198,17 +182,9 @@

    -

    - - unique_constraint(column_name, **options) - -

    +

    unique_constraint(column_name, **options)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html index a3a24d536c..bb184cd733 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/PostgreSQLAdapter.html @@ -526,22 +526,16 @@

    Constants

    Class Public methods

    -

    - - create_unlogged_tables - -

    +

    create_unlogged_tables

    - -
    -

    PostgreSQL allows the creation of “unlogged” tables, which do not record data in the PostgreSQL Write-Ahead Log. This can make the tables faster, but significantly increases the risk of data loss if the database crashes. As a result, this should not be used in production environments. If you would like all created tables to be unlogged in the test environment you can add the following to your test.rb file:

    +
    +

    PostgreSQL allows the creation of “unlogged” tables, which do not record data in the PostgreSQL Write-Ahead Log. This can make the tables faster, but significantly increases the risk of data loss if the database crashes. As a result, this should not be used in production environments. If you would like all created tables to be unlogged in the test environment you can add the following to your test.rb file:

    ActiveSupport.on_load(:active_record_postgresqladapter) do
       self.create_unlogged_tables = true
     end
     
    -
    - +
    @@ -565,15 +559,10 @@

    -

    - - datetime_type - -

    +

    datetime_type

    - -
    -

    PostgreSQL supports multiple types for DateTimes. By default, if you use datetime in migrations, Rails will translate this to a PostgreSQL “timestamp without time zone”. Change this in an initializer to use another NATIVE_DATABASE_TYPES. For example, to store DateTimes as “timestamp with time zone”:

    +
    +

    PostgreSQL supports multiple types for DateTimes. By default, if you use datetime in migrations, Rails will translate this to a PostgreSQL “timestamp without time zone”. Change this in an initializer to use another NATIVE_DATABASE_TYPES. For example, to store DateTimes as “timestamp with time zone”:

    ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.datetime_type = :timestamptz
     
    @@ -585,8 +574,7 @@

    If you’re using :ruby as your config.active_record.schema_format and you change this setting, you should immediately run bin/rails db:migrate to update the types in your schema.rb.

    -

    - +
    @@ -610,17 +598,9 @@

    -

    - - dbconsole(config, options = {}) - -

    +

    dbconsole(config, options = {})

    -
    - -
    - @@ -660,22 +640,16 @@

    -

    - - decode_dates - -

    +

    decode_dates

    - -
    -

    Toggles automatic decoding of date columns.

    +
    +

    Toggles automatic decoding of date columns.

    ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date").class #=> String
     ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.decode_dates = true
     ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.select_value("select '2024-01-01'::date").class #=> Date
     
    -
    - +
    @@ -699,17 +673,11 @@

    -

    - - new(...) - -

    +

    new(...)

    - -
    -

    Initializes and connects a PostgreSQL adapter.

    -
    - +
    +

    Initializes and connects a PostgreSQL adapter.

    +
    @@ -753,17 +721,9 @@

    -

    - - new_client(conn_params) - -

    +

    new_client(conn_params)

    -
    - -
    - @@ -804,17 +764,11 @@

    Instance Public methods

    -

    - - active?() - -

    +

    active?()

    - -
    -

    Is this connection alive and ready for queries?

    -
    - +
    +

    Is this connection alive and ready for queries?

    +
    @@ -846,17 +800,11 @@

    -

    - - add_enum_value(type_name, value, **options) - -

    +

    add_enum_value(type_name, value, **options)

    - -
    -

    Add enum value to an existing enum type.

    -
    - +
    +

    Add enum value to an existing enum type.

    +
    @@ -894,17 +842,9 @@

    -

    - - connected?() - -

    +

    connected?()

    -
    - -
    - @@ -929,17 +869,11 @@

    -

    - - create_enum(name, values, **options) - -

    +

    create_enum(name, values, **options)

    - -
    -

    Given a name and an array of values, creates an enum type.

    -
    - +
    +

    Given a name and an array of values, creates an enum type.

    +
    @@ -981,21 +915,15 @@

    -

    - - disable_extension(name, force: false) - -

    +

    disable_extension(name, force: false)

    - -
    -

    Removes an extension from the database.

    +
    +

    Removes an extension from the database.

    :force

    Set to :cascade to drop dependent objects as well. Defaults to false.

    -
    - +
    @@ -1023,17 +951,11 @@

    -

    - - disconnect!() - -

    +

    disconnect!()

    - -
    -

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    -
    - +
    +

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    +
    @@ -1062,21 +984,15 @@

    -

    - - drop_enum(name, values = nil, **options) - -

    +

    drop_enum(name, values = nil, **options)

    - -
    -

    Drops an enum type.

    +
    +

    Drops an enum type.

    If the if_exists: true option is provided, the enum is dropped only if it exists. Otherwise, if the enum doesn’t exist, an error is raised.

    The values parameter will be ignored if present. It can be helpful to provide this in a migration’s change method so it can be reverted. In that case, values will be used by create_enum.

    -
    - +
    @@ -1104,17 +1020,9 @@

    -

    - - enable_extension(name, **) - -

    +

    enable_extension(name, **)

    -
    - -
    - @@ -1143,17 +1051,11 @@

    -

    - - enum_types() - -

    +

    enum_types()

    - -
    -

    Returns a list of defined enum types, and their values.

    -
    - +
    +

    Returns a list of defined enum types, and their values.

    +
    @@ -1196,17 +1098,9 @@

    -

    - - extension_available?(name) - -

    +

    extension_available?(name)

    -
    - -
    - @@ -1231,17 +1125,9 @@

    -

    - - extension_enabled?(name) - -

    +

    extension_enabled?(name)

    -
    - -
    - @@ -1266,17 +1152,9 @@

    -

    - - extensions() - -

    +

    extensions()

    -
    - -
    - @@ -1313,17 +1191,9 @@

    -

    - - index_algorithms() - -

    +

    index_algorithms()

    -
    - -
    - @@ -1348,17 +1218,11 @@

    -

    - - max_identifier_length() - -

    +

    max_identifier_length()

    - -
    -

    Returns the configured maximum supported identifier length supported by PostgreSQL

    -
    - +
    +

    Returns the configured maximum supported identifier length supported by PostgreSQL

    +
    @@ -1383,17 +1247,11 @@

    -

    - - rename_enum(name, new_name = nil, **options) - -

    +

    rename_enum(name, new_name = nil, **options)

    - -
    -

    Rename an existing enum type to something else.

    -
    - +
    +

    Rename an existing enum type to something else.

    +
    @@ -1422,17 +1280,11 @@

    -

    - - rename_enum_value(type_name, **options) - -

    +

    rename_enum_value(type_name, **options)

    - -
    -

    Rename enum value on an existing enum type.

    -
    - +
    +

    Rename enum value on an existing enum type.

    +
    @@ -1466,17 +1318,9 @@

    -

    - - reset!() - -

    +

    reset!()

    -
    - -
    - @@ -1510,17 +1354,11 @@

    -

    - - session_auth=(user) - -

    +

    session_auth=(user)

    - -
    -

    Set the authorized user for this session

    -
    - +
    +

    Set the authorized user for this session

    +
    @@ -1546,17 +1384,9 @@

    -

    - - set_standard_conforming_strings() - -

    +

    set_standard_conforming_strings()

    -
    - -
    - @@ -1581,17 +1411,9 @@

    -

    - - supports_advisory_locks?() - -

    +

    supports_advisory_locks?()

    -
    - -
    - @@ -1616,17 +1438,9 @@

    -

    - - supports_bulk_alter?() - -

    +

    supports_bulk_alter?()

    -
    - -
    - @@ -1651,17 +1465,9 @@

    -

    - - supports_check_constraints?() - -

    +

    supports_check_constraints?()

    -
    - -
    - @@ -1686,17 +1492,9 @@

    -

    - - supports_comments?() - -

    +

    supports_comments?()

    -
    - -
    - @@ -1721,17 +1519,9 @@

    -

    - - supports_common_table_expressions?() - -

    +

    supports_common_table_expressions?()

    -
    - -
    - @@ -1756,17 +1546,9 @@

    -

    - - supports_datetime_with_precision?() - -

    +

    supports_datetime_with_precision?()

    -
    - -
    - @@ -1791,17 +1573,9 @@

    -

    - - supports_ddl_transactions?() - -

    +

    supports_ddl_transactions?()

    -
    - -
    - @@ -1826,17 +1600,9 @@

    -

    - - supports_deferrable_constraints?() - -

    +

    supports_deferrable_constraints?()

    -
    - -
    - @@ -1861,17 +1627,9 @@

    -

    - - supports_exclusion_constraints?() - -

    +

    supports_exclusion_constraints?()

    -
    - -
    - @@ -1896,17 +1654,9 @@

    -

    - - supports_explain?() - -

    +

    supports_explain?()

    -
    - -
    - @@ -1931,17 +1681,9 @@

    -

    - - supports_expression_index?() - -

    +

    supports_expression_index?()

    -
    - -
    - @@ -1966,17 +1708,9 @@

    -

    - - supports_extensions?() - -

    +

    supports_extensions?()

    -
    - -
    - @@ -2001,17 +1735,9 @@

    -

    - - supports_foreign_keys?() - -

    +

    supports_foreign_keys?()

    -
    - -
    - @@ -2036,17 +1762,9 @@

    -

    - - supports_foreign_tables?() - -

    +

    supports_foreign_tables?()

    -
    - -
    - @@ -2071,17 +1789,9 @@

    -

    - - supports_index_include?() - -

    +

    supports_index_include?()

    -
    - -
    - @@ -2106,17 +1816,9 @@

    -

    - - supports_index_sort_order?() - -

    +

    supports_index_sort_order?()

    -
    - -
    - @@ -2141,24 +1843,17 @@

    -

    - - supports_insert_conflict_target?() - -

    +

    supports_insert_conflict_target?()

    -
    - -
    - - +

    + Alias for: + supports_insert_on_conflict?. +

    @@ -2166,22 +1861,16 @@

    -

    - - supports_insert_on_conflict?() - -

    +

    supports_insert_on_conflict?()

    -
    - -
    - - +

    + Also aliased as: + + supports_insert_on_duplicate_skip?, supports_insert_on_duplicate_update?, supports_insert_conflict_target?. +

    @@ -2205,24 +1894,17 @@

    -

    - - supports_insert_on_duplicate_skip?() - -

    +

    supports_insert_on_duplicate_skip?()

    -
    - -
    - - +

    + Alias for: + supports_insert_on_conflict?. +

    @@ -2230,24 +1912,17 @@

    -

    - - supports_insert_on_duplicate_update?() - -

    +

    supports_insert_on_duplicate_update?()

    -
    - -
    - - +

    + Alias for: + supports_insert_on_conflict?. +

    @@ -2255,17 +1930,9 @@

    -

    - - supports_insert_returning?() - -

    +

    supports_insert_returning?()

    -
    - -
    - @@ -2290,17 +1957,9 @@

    -

    - - supports_json?() - -

    +

    supports_json?()

    -
    - -
    - @@ -2325,17 +1984,9 @@

    -

    - - supports_lazy_transactions?() - -

    +

    supports_lazy_transactions?()

    -
    - -
    - @@ -2360,17 +2011,9 @@

    -

    - - supports_materialized_views?() - -

    +

    supports_materialized_views?()

    -
    - -
    - @@ -2395,17 +2038,9 @@

    -

    - - supports_nulls_not_distinct?() - -

    +

    supports_nulls_not_distinct?()

    -
    - -
    - @@ -2430,17 +2065,9 @@

    -

    - - supports_optimizer_hints?() - -

    +

    supports_optimizer_hints?()

    -
    - -
    - @@ -2468,17 +2095,9 @@

    -

    - - supports_partial_index?() - -

    +

    supports_partial_index?()

    -
    - -
    - @@ -2503,17 +2122,9 @@

    -

    - - supports_partitioned_indexes?() - -

    +

    supports_partitioned_indexes?()

    -
    - -
    - @@ -2538,17 +2149,9 @@

    -

    - - supports_pgcrypto_uuid?() - -

    +

    supports_pgcrypto_uuid?()

    -
    - -
    - @@ -2573,17 +2176,9 @@

    -

    - - supports_restart_db_transaction?() - -

    +

    supports_restart_db_transaction?()

    -
    - -
    - @@ -2608,17 +2203,9 @@

    -

    - - supports_savepoints?() - -

    +

    supports_savepoints?()

    -
    - -
    - @@ -2643,17 +2230,9 @@

    -

    - - supports_transaction_isolation?() - -

    +

    supports_transaction_isolation?()

    -
    - -
    - @@ -2678,17 +2257,9 @@

    -

    - - supports_unique_constraints?() - -

    +

    supports_unique_constraints?()

    -
    - -
    - @@ -2713,17 +2284,9 @@

    -

    - - supports_validate_constraints?() - -

    +

    supports_validate_constraints?()

    -
    - -
    - @@ -2748,17 +2311,9 @@

    -

    - - supports_views?() - -

    +

    supports_views?()

    -
    - -
    - @@ -2783,17 +2338,9 @@

    -

    - - supports_virtual_columns?() - -

    +

    supports_virtual_columns?()

    -
    - -
    - @@ -2818,17 +2365,9 @@

    -

    - - use_insert_returning?() - -

    +

    use_insert_returning?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html b/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html index 48b6faba97..156e1438f4 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/QueryCache.html @@ -103,17 +103,9 @@

    Attributes

    Class Public methods

    -

    - - dirties_query_cache(base, *method_names) - -

    +

    dirties_query_cache(base, *method_names)

    -
    - -
    - @@ -147,17 +139,9 @@

    -

    - - new(*) - -

    +

    new(*)

    -
    - -
    - @@ -187,17 +171,11 @@

    Instance Public methods

    -

    - - cache(&block) - -

    +

    cache(&block)

    - -
    -

    Enable the query cache within the block.

    -
    - +
    +

    Enable the query cache within the block.

    +
    @@ -222,19 +200,13 @@

    -

    - - clear_query_cache() - -

    +

    clear_query_cache()

    - -
    -

    Clears the query cache.

    +
    +

    Clears the query cache.

    One reason you may wish to call this method explicitly is between queries that ask the database to randomize results. Otherwise the cache would see the same SQL query and repeatedly return the same result each time, silently undermining the randomness you were expecting.

    -
    - +
    @@ -259,17 +231,9 @@

    -

    - - disable_query_cache!() - -

    +

    disable_query_cache!()

    -
    - -
    - @@ -294,17 +258,9 @@

    -

    - - enable_query_cache!() - -

    +

    enable_query_cache!()

    -
    - -
    - @@ -329,17 +285,9 @@

    -

    - - query_cache() - -

    +

    query_cache()

    -
    - -
    - @@ -371,17 +319,9 @@

    -

    - - query_cache_enabled() - -

    +

    query_cache_enabled()

    -
    - -
    - @@ -406,19 +346,13 @@

    -

    - - uncached(dirties: true, &block) - -

    +

    uncached(dirties: true, &block)

    - -
    -

    Disable the query cache within the block.

    +
    +

    Disable the query cache within the block.

    Set dirties: false to prevent query caches on all connections from being cleared by write operations. (By default, write operations dirty all connections’ query caches in case they are replicas whose cache would now be outdated.)

    -
    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html b/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html index 8cd764ba9b..8c2ea81788 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Quoting.html @@ -104,17 +104,11 @@

    Methods

    Instance Public methods

    -

    - - quote(value) - -

    +

    quote(value)

    - -
    -

    Quotes the column value to help prevent SQL injection attacks.

    -
    - +
    +

    Quotes the column value to help prevent SQL injection attacks.

    +
    @@ -154,17 +148,11 @@

    -

    - - quote_column_name(column_name) - -

    +

    quote_column_name(column_name)

    - -
    -

    Quotes the column name.

    -
    - +
    +

    Quotes the column name.

    +
    @@ -189,17 +177,11 @@

    -

    - - quote_string(s) - -

    +

    quote_string(s)

    - -
    -

    Quotes a string, escaping any ‘ (single quote) and \ (backslash) characters.

    -
    - +
    +

    Quotes a string, escaping any ‘ (single quote) and \ (backslash) characters.

    +
    @@ -224,17 +206,11 @@

    -

    - - quote_table_name(table_name) - -

    +

    quote_table_name(table_name)

    - -
    -

    Quotes the table name.

    -
    - +
    +

    Quotes the table name.

    +
    @@ -259,21 +235,15 @@

    -

    - - quote_table_name_for_assignment(table, attr) - -

    +

    quote_table_name_for_assignment(table, attr)

    - -
    -

    Override to return the quoted table name for assignment. Defaults to table quoting.

    +
    +

    Override to return the quoted table name for assignment. Defaults to table quoting.

    This works for MySQL where table.column can be used to resolve ambiguity.

    We override this in the sqlite3 and postgresql adapters to use only the column name (as per syntax requirements).

    -
    - +
    @@ -298,17 +268,11 @@

    -

    - - quoted_date(value) - -

    +

    quoted_date(value)

    - -
    -

    Quote date/time values for use in SQL input. Includes microseconds if the value is a Time responding to usec.

    -
    - +
    +

    Quote date/time values for use in SQL input. Includes microseconds if the value is a Time responding to usec.

    +
    @@ -346,17 +310,9 @@

    -

    - - quoted_false() - -

    +

    quoted_false()

    -
    - -
    - @@ -381,17 +337,9 @@

    -

    - - quoted_true() - -

    +

    quoted_true()

    -
    - -
    - @@ -416,17 +364,11 @@

    -

    - - type_cast(value) - -

    +

    type_cast(value)

    - -
    -

    Cast a value to a type that the database understands. For example, SQLite does not understand dates, so this method will convert a Date to a String.

    -
    - +
    +

    Cast a value to a type that the database understands. For example, SQLite does not understand dates, so this method will convert a Date to a String.

    +
    @@ -463,17 +405,9 @@

    -

    - - unquoted_false() - -

    +

    unquoted_false()

    -
    - -
    - @@ -498,17 +432,9 @@

    -

    - - unquoted_true() - -

    +

    unquoted_true()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html b/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html index f63f1ba964..89614f1263 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/RealTransaction.html @@ -82,17 +82,9 @@

    Methods

    Instance Public methods

    -

    - - commit() - -

    +

    commit()

    -
    - -
    - @@ -122,17 +114,9 @@

    -

    - - materialize!() - -

    +

    materialize!()

    -
    - -
    - @@ -167,17 +151,9 @@

    -

    - - restart() - -

    +

    restart()

    -
    - -
    - @@ -212,17 +188,9 @@

    -

    - - rollback() - -

    +

    rollback()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html b/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html index 5593a8b0f3..9d26c30a54 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/RestartParentTransaction.html @@ -81,17 +81,9 @@

    Methods

    Class Public methods

    -

    - - new(connection, parent_transaction, **options) - -

    +

    new(connection, parent_transaction, **options)

    -
    - -
    - @@ -128,17 +120,9 @@

    Instance Public methods

    -

    - - commit() - -

    +

    commit()

    -
    - -
    - @@ -163,17 +147,9 @@

    -

    - - full_rollback?() - -

    +

    full_rollback?()

    -
    - -
    - @@ -196,17 +172,9 @@

    -

    - - rollback() - -

    +

    rollback()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html index b5b0bb215c..f6a99d2866 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/DatabaseStatements.html @@ -62,17 +62,9 @@

    Methods

    Instance Public methods

    -

    - - explain(arel, binds = [], _options = []) - -

    +

    explain(arel, binds = [], _options = [])

    -
    - -
    - @@ -99,17 +91,9 @@

    -

    - - high_precision_current_timestamp() - -

    +

    high_precision_current_timestamp()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html index 2d5df294da..c77a9e4daf 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3/TableDefinition.html @@ -78,24 +78,17 @@

    Methods

    Instance Public methods

    -

    - - belongs_to(*args, **options) - -

    +

    belongs_to(*args, **options)

    -
    - -
    - -
    - Alias for: references -
    +

    + Alias for: + references. +

    @@ -103,17 +96,9 @@

    -

    - - change_column(column_name, type, **options) - -

    +

    change_column(column_name, type, **options)

    -
    - -
    - @@ -140,22 +125,16 @@

    -

    - - references(*args, **options) - -

    +

    references(*args, **options)

    -
    - -
    - -
    - Also aliased as: belongs_to -
    +

    + Also aliased as: + + belongs_to. +

    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html index a01445a9f8..2b450f07e3 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SQLite3Adapter.html @@ -365,17 +365,9 @@

    Constants

    Class Public methods

    -

    - - dbconsole(config, options = {}) - -

    +

    dbconsole(config, options = {})

    -
    - -
    - @@ -406,17 +398,9 @@

    -

    - - new(...) - -

    +

    new(...)

    -
    - -
    - @@ -475,17 +459,9 @@

    -

    - - new_client(config) - -

    +

    new_client(config)

    -
    - -
    - @@ -516,15 +492,10 @@

    -

    - - strict_strings_by_default - -

    +

    strict_strings_by_default

    - -
    -

    Configure the SQLite3Adapter to be used in a “strict strings” mode. When enabled, this will disallow double-quoted string literals in SQL statements, which may prevent some typographical errors like creating an index for a non-existent column. The default is false.

    +
    +

    Configure the SQLite3Adapter to be used in a “strict strings” mode. When enabled, this will disallow double-quoted string literals in SQL statements, which may prevent some typographical errors like creating an index for a non-existent column. The default is false.

    If you wish to enable this mode you can add the following line to your application.rb file:

    @@ -532,8 +503,7 @@

    This can also be configured on individual databases by setting the strict: option.

    -

    - +
    @@ -561,17 +531,9 @@

    Instance Public methods

    -

    - - active?() - -

    +

    active?()

    -
    - -
    - @@ -599,17 +561,9 @@

    -

    - - add_timestamps(table_name, **options) - -

    +

    add_timestamps(table_name, **options)

    -
    - -
    - @@ -643,17 +597,9 @@

    -

    - - connected?() - -

    +

    connected?()

    -
    - -
    - @@ -678,22 +624,16 @@

    -

    - - create_virtual_table(table_name, module_name, values) - -

    +

    create_virtual_table(table_name, module_name, values)

    - -
    -

    Creates a virtual table

    +
    +

    Creates a virtual table

    Example:

    create_virtual_table :emails, :fts5, ['sender', 'title', 'body']
     
    -
    - +
    @@ -718,17 +658,9 @@

    -

    - - database_exists?() - -

    +

    database_exists?()

    -
    - -
    - @@ -753,17 +685,11 @@

    -

    - - disconnect!() - -

    +

    disconnect!()

    - -
    -

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    -
    - +
    +

    Disconnects from the database if already connected. Otherwise, this method does nothing.

    +
    @@ -791,19 +717,13 @@

    -

    - - drop_virtual_table(table_name, module_name, values, **options) - -

    +

    drop_virtual_table(table_name, module_name, values, **options)

    - -
    -

    Drops a virtual table

    +
    +

    Drops a virtual table

    Although this command ignores module_name and values, it can be helpful to provide these in a migration’s change method so it can be reverted. In that case, module_name, values and options will be used by create_virtual_table.

    -
    - +
    @@ -828,17 +748,11 @@

    -

    - - encoding() - -

    +

    encoding()

    - -
    -

    Returns the current database encoding format as a string, e.g. ‘UTF-8’

    -
    - +
    +

    Returns the current database encoding format as a string, e.g. ‘UTF-8’

    +
    @@ -863,17 +777,9 @@

    -

    - - foreign_keys(table_name) - -

    +

    foreign_keys(table_name)

    -
    - -
    - @@ -930,22 +836,16 @@

    -

    - - rename_table(table_name, new_name, **options) - -

    +

    rename_table(table_name, new_name, **options)

    - -
    -

    Renames a table.

    +
    +

    Renames a table.

    Example:

    rename_table('octopuses', 'octopi')
     
    -
    - +
    @@ -974,17 +874,9 @@

    -

    - - requires_reloading?() - -

    +

    requires_reloading?()

    -
    - -
    - @@ -1009,17 +901,9 @@

    -

    - - supports_check_constraints?() - -

    +

    supports_check_constraints?()

    -
    - -
    - @@ -1044,17 +928,9 @@

    -

    - - supports_common_table_expressions?() - -

    +

    supports_common_table_expressions?()

    -
    - -
    - @@ -1079,17 +955,9 @@

    -

    - - supports_concurrent_connections?() - -

    +

    supports_concurrent_connections?()

    -
    - -
    - @@ -1114,17 +982,9 @@

    -

    - - supports_datetime_with_precision?() - -

    +

    supports_datetime_with_precision?()

    -
    - -
    - @@ -1149,17 +1009,9 @@

    -

    - - supports_ddl_transactions?() - -

    +

    supports_ddl_transactions?()

    -
    - -
    - @@ -1184,17 +1036,9 @@

    -

    - - supports_deferrable_constraints?() - -

    +

    supports_deferrable_constraints?()

    -
    - -
    - @@ -1219,17 +1063,9 @@

    -

    - - supports_explain?() - -

    +

    supports_explain?()

    -
    - -
    - @@ -1254,17 +1090,9 @@

    -

    - - supports_expression_index?() - -

    +

    supports_expression_index?()

    -
    - -
    - @@ -1289,17 +1117,9 @@

    -

    - - supports_foreign_keys?() - -

    +

    supports_foreign_keys?()

    -
    - -
    - @@ -1324,17 +1144,9 @@

    -

    - - supports_index_sort_order?() - -

    +

    supports_index_sort_order?()

    -
    - -
    - @@ -1359,24 +1171,17 @@

    -

    - - supports_insert_conflict_target?() - -

    +

    supports_insert_conflict_target?()

    -
    - -
    - - +

    + Alias for: + supports_insert_on_conflict?. +

    @@ -1384,22 +1189,16 @@

    -

    - - supports_insert_on_conflict?() - -

    +

    supports_insert_on_conflict?()

    -
    - -
    - - +

    + Also aliased as: + + supports_insert_on_duplicate_skip?, supports_insert_on_duplicate_update?, supports_insert_conflict_target?. +

    @@ -1423,24 +1222,17 @@

    -

    - - supports_insert_on_duplicate_skip?() - -

    +

    supports_insert_on_duplicate_skip?()

    -
    - -
    - - +

    + Alias for: + supports_insert_on_conflict?. +

    @@ -1448,24 +1240,17 @@

    -

    - - supports_insert_on_duplicate_update?() - -

    +

    supports_insert_on_duplicate_update?()

    -
    - -
    - - +

    + Alias for: + supports_insert_on_conflict?. +

    @@ -1473,17 +1258,9 @@

    -

    - - supports_insert_returning?() - -

    +

    supports_insert_returning?()

    -
    - -
    - @@ -1508,17 +1285,9 @@

    -

    - - supports_json?() - -

    +

    supports_json?()

    -
    - -
    - @@ -1543,17 +1312,9 @@

    -

    - - supports_lazy_transactions?() - -

    +

    supports_lazy_transactions?()

    -
    - -
    - @@ -1578,17 +1339,9 @@

    -

    - - supports_partial_index?() - -

    +

    supports_partial_index?()

    -
    - -
    - @@ -1613,17 +1366,9 @@

    -

    - - supports_savepoints?() - -

    +

    supports_savepoints?()

    -
    - -
    - @@ -1648,17 +1393,9 @@

    -

    - - supports_transaction_isolation?() - -

    +

    supports_transaction_isolation?()

    -
    - -
    - @@ -1683,17 +1420,9 @@

    -

    - - supports_views?() - -

    +

    supports_views?()

    -
    - -
    - @@ -1718,17 +1447,9 @@

    -

    - - supports_virtual_columns?() - -

    +

    supports_virtual_columns?()

    -
    - -
    - @@ -1753,17 +1474,11 @@

    -

    - - virtual_tables() - -

    +

    virtual_tables()

    - -
    -

    Returns a list of defined virtual tables

    -
    - +
    +

    Returns a list of defined virtual tables

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html b/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html index cd759269a6..36973ba037 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SavepointTransaction.html @@ -93,17 +93,9 @@

    Methods

    Class Public methods

    -

    - - new(connection, savepoint_name, parent_transaction, **options) - -

    +

    new(connection, savepoint_name, parent_transaction, **options)

    -
    - -
    - @@ -141,17 +133,9 @@

    Instance Public methods

    -

    - - commit() - -

    +

    commit()

    -
    - -
    - @@ -178,17 +162,9 @@

    -

    - - full_rollback?() - -

    +

    full_rollback?()

    -
    - -
    - @@ -211,17 +187,11 @@

    -

    - - isolation() - -

    +

    isolation()

    - -
    -

    Delegates to parent transaction’s isolation level

    -
    - +
    +

    Delegates to parent transaction’s isolation level

    +
    @@ -246,17 +216,9 @@

    -

    - - materialize!() - -

    +

    materialize!()

    -
    - -
    - @@ -282,17 +244,9 @@

    -

    - - restart() - -

    +

    restart()

    -
    - -
    - @@ -322,17 +276,9 @@

    -

    - - rollback() - -

    +

    rollback()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html b/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html index 1edd1dd863..4399b6214d 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Savepoints.html @@ -76,17 +76,9 @@

    Methods

    Instance Public methods

    -

    - - create_savepoint(name = current_savepoint_name) - -

    +

    create_savepoint(name = current_savepoint_name)

    -
    - -
    - @@ -111,17 +103,9 @@

    -

    - - current_savepoint_name() - -

    +

    current_savepoint_name()

    -
    - -
    - @@ -146,17 +130,9 @@

    -

    - - exec_rollback_to_savepoint(name = current_savepoint_name) - -

    +

    exec_rollback_to_savepoint(name = current_savepoint_name)

    -
    - -
    - @@ -181,17 +157,9 @@

    -

    - - release_savepoint(name = current_savepoint_name) - -

    +

    release_savepoint(name = current_savepoint_name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html b/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html index bebfaf6e20..92b9d1877f 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SchemaCache.html @@ -118,17 +118,11 @@

    Methods

    Instance Public methods

    -

    - - add(pool, table_name) - -

    +

    add(pool, table_name)

    - -
    -

    Add internal cache for table with table_name.

    -
    - +
    +

    Add internal cache for table with table_name.

    +
    @@ -160,17 +154,9 @@

    -

    - - cached?(table_name) - -

    +

    cached?(table_name)

    -
    - -
    - @@ -195,17 +181,11 @@

    -

    - - clear_data_source_cache!(_connection, name) - -

    +

    clear_data_source_cache!(_connection, name)

    - -
    -

    Clear out internal caches for the data source name.

    -
    - +
    +

    Clear out internal caches for the data source name.

    +
    @@ -234,17 +214,11 @@

    -

    - - columns(pool, table_name) - -

    +

    columns(pool, table_name)

    - -
    -

    Get the columns for a table

    -
    - +
    +

    Get the columns for a table

    +
    @@ -277,17 +251,11 @@

    -

    - - columns_hash(pool, table_name) - -

    +

    columns_hash(pool, table_name)

    - -
    -

    Get the columns for a table as a hash, key is the column name value is the column object.

    -
    - +
    +

    Get the columns for a table as a hash, key is the column name value is the column object.

    +
    @@ -314,17 +282,11 @@

    -

    - - columns_hash?(_pool, table_name) - -

    +

    columns_hash?(_pool, table_name)

    - -
    -

    Checks whether the columns hash is already cached for a table.

    -
    - +
    +

    Checks whether the columns hash is already cached for a table.

    +
    @@ -349,17 +311,11 @@

    -

    - - data_source_exists?(pool, name) - -

    +

    data_source_exists?(pool, name)

    - -
    -

    A cached lookup for table existence.

    -
    - +
    +

    A cached lookup for table existence.

    +
    @@ -396,17 +352,9 @@

    -

    - - dump_to(filename) - -

    +

    dump_to(filename)

    -
    - -
    - @@ -437,17 +385,9 @@

    -

    - - indexes(pool, table_name) - -

    +

    indexes(pool, table_name)

    -
    - -
    - @@ -480,17 +420,9 @@

    -

    - - primary_keys(pool, table_name) - -

    +

    primary_keys(pool, table_name)

    -
    - -
    - @@ -521,17 +453,9 @@

    -

    - - schema_version() - -

    +

    schema_version()

    -
    - -
    - @@ -556,17 +480,9 @@

    -

    - - size() - -

    +

    size()

    -
    - -
    - @@ -591,17 +507,9 @@

    -

    - - version(pool) - -

    +

    version(pool)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html b/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html index 725c7e06ce..d44a09a837 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SchemaReflection.html @@ -145,17 +145,9 @@

    Attributes

    Class Public methods

    -

    - - new(cache_path, cache = nil) - -

    +

    new(cache_path, cache = nil)

    -
    - -
    - @@ -185,17 +177,9 @@

    Instance Public methods

    -

    - - add(pool, name) - -

    +

    add(pool, name)

    -
    - -
    - @@ -220,17 +204,9 @@

    -

    - - cached?(table_name) - -

    +

    cached?(table_name)

    -
    - -
    - @@ -263,17 +239,9 @@

    -

    - - clear!() - -

    +

    clear!()

    -
    - -
    - @@ -300,17 +268,9 @@

    -

    - - clear_data_source_cache!(pool, name) - -

    +

    clear_data_source_cache!(pool, name)

    -
    - -
    - @@ -337,17 +297,9 @@

    -

    - - columns(pool, table_name) - -

    +

    columns(pool, table_name)

    -
    - -
    - @@ -372,17 +324,9 @@

    -

    - - columns_hash(pool, table_name) - -

    +

    columns_hash(pool, table_name)

    -
    - -
    - @@ -407,17 +351,9 @@

    -

    - - columns_hash?(pool, table_name) - -

    +

    columns_hash?(pool, table_name)

    -
    - -
    - @@ -442,17 +378,9 @@

    -

    - - data_source_exists?(pool, name) - -

    +

    data_source_exists?(pool, name)

    -
    - -
    - @@ -477,17 +405,9 @@

    -

    - - data_sources(pool, name) - -

    +

    data_sources(pool, name)

    -
    - -
    - @@ -512,17 +432,9 @@

    -

    - - dump_to(pool, filename) - -

    +

    dump_to(pool, filename)

    -
    - -
    - @@ -551,17 +463,9 @@

    -

    - - indexes(pool, table_name) - -

    +

    indexes(pool, table_name)

    -
    - -
    - @@ -586,17 +490,9 @@

    -

    - - load!(pool) - -

    +

    load!(pool)

    -
    - -
    - @@ -623,17 +519,9 @@

    -

    - - primary_keys(pool, table_name) - -

    +

    primary_keys(pool, table_name)

    -
    - -
    - @@ -658,17 +546,9 @@

    -

    - - size(pool) - -

    +

    size(pool)

    -
    - -
    - @@ -693,17 +573,9 @@

    -

    - - version(pool) - -

    +

    version(pool)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html b/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html index 5daf38757b..127a5bd16e 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html @@ -274,24 +274,17 @@

    Methods

    Instance Public methods

    -

    - - add_belongs_to(table_name, ref_name, **options) - -

    +

    add_belongs_to(table_name, ref_name, **options)

    -
    - -
    - -
    - Alias for: add_reference -
    +

    + Alias for: + add_reference. +

    @@ -299,15 +292,10 @@

    -

    - - add_check_constraint(table_name, expression, if_not_exists: false, **options) - -

    +

    add_check_constraint(table_name, expression, if_not_exists: false, **options)

    - -
    -

    Adds a new check constraint to the table. expression is a String representation of verifiable boolean condition.

    +
    +

    Adds a new check constraint to the table. expression is a String representation of verifiable boolean condition.

    add_check_constraint :products, "price > 0", name: "price_check"
     
    @@ -328,8 +316,7 @@

    (PostgreSQL only) Specify whether or not the constraint should be validated. Defaults to true.

    -

    - +
    @@ -362,15 +349,10 @@

    -

    - - add_column(table_name, column_name, type, **options) - -

    +

    add_column(table_name, column_name, type, **options)

    - -
    -

    Add a new type column named column_name to table_name.

    +
    +

    Add a new type column named column_name to table_name.

    See ActiveRecord::ConnectionAdapters::TableDefinition.column.

    @@ -444,8 +426,7 @@

    Examples

    # Ignores the method call if the column exists add_column(:shapes, :triangle, 'polygon', if_not_exists: true) -
    - +
    @@ -473,15 +454,10 @@

    Examples

    -

    - - add_foreign_key(from_table, to_table, **options) - -

    +

    add_foreign_key(from_table, to_table, **options)

    - -
    -

    Adds a new foreign key. from_table is the table with the key column, to_table contains the referenced primary key.

    +
    +

    Adds a new foreign key. from_table is the table with the key column, to_table contains the referenced primary key.

    The foreign key will be named after the following pattern: fk_rails_<identifier>. identifier is a 10 character long string which is deterministically generated from the from_table and column. A custom name can be specified with the :name option.

    @@ -558,8 +534,7 @@
    Creatin

    (PostgreSQL only) Specify whether or not the foreign key should be deferrable. Valid values are booleans or :deferred or :immediate to specify the default behavior. Defaults to false.

    -
    - +
    @@ -592,15 +567,10 @@
    Creatin
    -

    - - add_index(table_name, column_name, **options) - -

    +

    add_index(table_name, column_name, **options)

    - -
    -

    Adds a new index to the table. column_name can be a single Symbol, or an Array of Symbols.

    +
    +

    Adds a new index to the table. column_name can be a single Symbol, or an Array of Symbols.

    The index will be named after the table and the column name(s), unless you pass :name as an option.

    @@ -783,8 +753,7 @@

    Note: only supported by MySQL version 8.0.0 and greater, and MariaDB version 10.6.0 and greater.

    -
    - +
    @@ -810,15 +779,10 @@
    -

    - - add_reference(table_name, ref_name, **options) - -

    +

    add_reference(table_name, ref_name, **options)

    - -
    -

    Adds a reference. The reference column is a bigint by default, the :type option can be used to specify a different type. Optionally adds a _type column, if :polymorphic option is provided.

    +
    +

    Adds a reference. The reference column is a bigint by default, the :type option can be used to specify a different type. Optionally adds a _type column, if :polymorphic option is provided.

    The options hash can include the following keys:

    :type
    @@ -872,13 +836,14 @@
    - Also aliased as: add_belongs_to -
    +

    + Also aliased as: + + add_belongs_to. +

    @@ -902,20 +867,14 @@
    -

    - - add_timestamps(table_name, **options) - -

    +

    add_timestamps(table_name, **options)

    - -
    -

    Adds timestamps (created_at and updated_at) columns to table_name. Additional options (like :null) are forwarded to add_column.

    +
    +

    Adds timestamps (created_at and updated_at) columns to table_name. Additional options (like :null) are forwarded to add_column.

    add_timestamps(:suppliers, null: true)
     
    -
    - +
    @@ -941,17 +900,9 @@

    -

    - - assume_migrated_upto_version(version) - -

    +

    assume_migrated_upto_version(version)

    -
    - -
    - @@ -993,17 +944,11 @@

    -

    - - build_create_table_definition(table_name, id: :primary_key, primary_key: nil, force: nil, **options) - -

    +

    build_create_table_definition(table_name, id: :primary_key, primary_key: nil, force: nil, **options)

    - -
    -

    Returns a TableDefinition object containing information about the table that would be created if the same arguments were passed to create_table. See create_table for information about passing a table_name, and other additional options that can be passed.

    -
    - +
    +

    Returns a TableDefinition object containing information about the table that would be created if the same arguments were passed to create_table. See create_table for information about passing a table_name, and other additional options that can be passed.

    +
    @@ -1033,21 +978,15 @@

    -

    - - change_column(table_name, column_name, type, **options) - -

    +

    change_column(table_name, column_name, type, **options)

    - -
    -

    Changes the column’s definition according to the new options. See TableDefinition#column for details of the options you can use.

    +
    +

    Changes the column’s definition according to the new options. See TableDefinition#column for details of the options you can use.

    change_column(:suppliers, :name, :string, limit: 80)
     change_column(:accounts, :description, :text)
     
    -
    - +
    @@ -1072,22 +1011,16 @@

    -

    - - change_column_comment(table_name, column_name, comment_or_changes) - -

    +

    change_column_comment(table_name, column_name, comment_or_changes)

    - -
    -

    Changes the comment for a column or removes it if nil.

    +
    +

    Changes the comment for a column or removes it if nil.

    Passing a hash containing :from and :to will make this change reversible in migration:

    change_column_comment(:posts, :state, from: "old_comment", to: "new_comment")
     
    -
    - +
    @@ -1112,15 +1045,10 @@

    -

    - - change_column_default(table_name, column_name, default_or_changes) - -

    +

    change_column_default(table_name, column_name, default_or_changes)

    - -
    -

    Sets a new default value for a column:

    +
    +

    Sets a new default value for a column:

    change_column_default(:suppliers, :qualification, 'new')
     change_column_default(:accounts, :authorized, 1)
    @@ -1135,8 +1063,7 @@ 

    change_column_default(:posts, :state, from: nil, to: "draft")
     
    -

    - +
    @@ -1161,15 +1088,10 @@

    -

    - - change_column_null(table_name, column_name, null, default = nil) - -

    +

    change_column_null(table_name, column_name, null, default = nil)

    - -
    -

    Sets or removes a NOT NULL constraint on a column. The null flag indicates whether the value can be NULL. For example

    +
    +

    Sets or removes a NOT NULL constraint on a column. The null flag indicates whether the value can be NULL. For example

    change_column_null(:users, :nickname, false)
     
    @@ -1184,8 +1106,7 @@

    The method accepts an optional fourth argument to replace existing NULLs with some other value. Use that one when enabling the constraint if needed, since otherwise those rows would not be valid.

    Please note the fourth argument does not set a column’s default.

    -

    - +
    @@ -1210,15 +1131,10 @@

    -

    - - change_table(table_name, base = self, **options) - -

    +

    change_table(table_name, base = self, **options)

    - -
    -

    A block for changing columns in table.

    +
    +

    A block for changing columns in table.

    # change_table() yields a Table instance
     change_table(:suppliers) do |t|
    @@ -1309,8 +1225,7 @@ 
    Remove an index

    See also Table for details on all of the various column transformations.

    -
    - +
    @@ -1341,22 +1256,16 @@
    Remove an index
    -

    - - change_table_comment(table_name, comment_or_changes) - -

    +

    change_table_comment(table_name, comment_or_changes)

    - -
    -

    Changes the comment for a table or removes it if nil.

    +
    +

    Changes the comment for a table or removes it if nil.

    Passing a hash containing :from and :to will make this change reversible in migration:

    change_table_comment(:posts, from: "old_comment", to: "new_comment")
     
    -
    - +
    @@ -1381,20 +1290,14 @@

    -

    - - check_constraint_exists?(table_name, **options) - -

    +

    check_constraint_exists?(table_name, **options)

    - -
    -

    Checks to see if a check constraint exists on a table for a given check constraint definition.

    +
    +

    Checks to see if a check constraint exists on a table for a given check constraint definition.

    check_constraint_exists?(:products, name: "price_check")
     
    -
    - +
    @@ -1422,17 +1325,11 @@

    -

    - - check_constraints(table_name) - -

    +

    check_constraints(table_name)

    - -
    -

    Returns an array of check constraints for the given table. The check constraints are represented as CheckConstraintDefinition objects.

    -
    - +
    +

    Returns an array of check constraints for the given table. The check constraints are represented as CheckConstraintDefinition objects.

    +
    @@ -1457,15 +1354,10 @@

    -

    - - column_exists?(table_name, column_name, type = nil, **options) - -

    +

    column_exists?(table_name, column_name, type = nil, **options)

    - -
    -

    Checks to see if a column exists in a given table.

    +
    +

    Checks to see if a column exists in a given table.

    # Check a column exists
     column_exists?(:suppliers, :name)
    @@ -1482,8 +1374,7 @@ 

    column_exists?(:suppliers, :name, :string, null: false) column_exists?(:suppliers, :tax, :decimal, precision: 8, scale: 2)

    -
    - +
    @@ -1516,17 +1407,11 @@

    -

    - - columns(table_name) - -

    +

    columns(table_name)

    - -
    -

    Returns an array of Column objects for the table specified by table_name.

    -
    - +
    +

    Returns an array of Column objects for the table specified by table_name.

    +
    @@ -1555,15 +1440,10 @@

    -

    - - create_join_table(table_1, table_2, column_options: {}, **options) - -

    +

    create_join_table(table_1, table_2, column_options: {}, **options)

    - -
    -

    Creates a new join table with the name created using the lexical order of the first two arguments. These arguments can be a String or a Symbol.

    +
    +

    Creates a new join table with the name created using the lexical order of the first two arguments. These arguments can be a String or a Symbol.

    # Creates a table called 'assemblies_parts' with no id.
     create_join_table(:assemblies, :parts)
    @@ -1630,8 +1510,7 @@ 
    -

    - - create_table(table_name, id: :primary_key, primary_key: nil, force: nil, **options, &block) - -

    +

    create_table(table_name, id: :primary_key, primary_key: nil, force: nil, **options, &block)

    - -
    -

    Creates a new table with the name table_name. table_name may either be a String or a Symbol.

    +
    +

    Creates a new table with the name table_name. table_name may either be a String or a Symbol.

    There are two ways to work with create_table. You can use the block form or the regular form, like this:

    @@ -1829,8 +1703,7 @@
    C

    See also TableDefinition#column for details on how to create columns.

    -
    - +
    @@ -1888,20 +1761,14 @@
    C
    -

    - - data_source_exists?(name) - -

    +

    data_source_exists?(name)

    - -
    -

    Checks to see if the data source name exists on the database.

    +
    +

    Checks to see if the data source name exists on the database.

    data_source_exists?(:ebooks)
     
    -
    - +
    @@ -1928,17 +1795,11 @@

    -

    - - data_sources() - -

    +

    data_sources()

    - -
    -

    Returns the relation names usable to back Active Record models. For most adapters this means all tables and views.

    -
    - +
    +

    Returns the relation names usable to back Active Record models. For most adapters this means all tables and views.

    +
    @@ -1965,20 +1826,14 @@

    -

    - - disable_index(table_name, index_name) - -

    +

    disable_index(table_name, index_name)

    - -
    -

    Prevents an index from being used by queries.

    +
    +

    Prevents an index from being used by queries.

    disable_index(:users, :email)
     
    -
    - +
    @@ -2003,19 +1858,13 @@

    -

    - - drop_join_table(table_1, table_2, **options) - -

    +

    drop_join_table(table_1, table_2, **options)

    - -
    -

    Drops the join table specified by the given arguments. See create_join_table and drop_table for details.

    +
    +

    Drops the join table specified by the given arguments. See create_join_table and drop_table for details.

    Although this command ignores the block if one is given, it can be helpful to provide one in a migration’s change method so it can be reverted. In that case, the block will be used by create_join_table.

    -
    - +
    @@ -2041,15 +1890,10 @@

    -

    - - drop_table(*table_names, **options) - -

    +

    drop_table(*table_names, **options)

    - -
    -

    Drops a table or tables from the database.

    +
    +

    Drops a table or tables from the database.

    :force

    Set to :cascade to drop dependent objects as well. Defaults to false.

    @@ -2059,8 +1903,7 @@

    Although this command ignores most options and the block if one is given, it can be helpful to provide these in a migration’s change method so it can be reverted. In that case, options and the block will be used by create_table except if you provide more than one table which is not supported.

    -
    - +
    @@ -2088,20 +1931,14 @@

    -

    - - enable_index(table_name, index_name) - -

    +

    enable_index(table_name, index_name)

    - -
    -

    Enables an index to be used by queries.

    +
    +

    Enables an index to be used by queries.

    enable_index(:users, :email)
     
    -
    - +
    @@ -2126,15 +1963,10 @@

    -

    - - foreign_key_exists?(from_table, to_table = nil, **options) - -

    +

    foreign_key_exists?(from_table, to_table = nil, **options)

    - -
    -

    Checks to see if a foreign key exists on a table for a given foreign key definition.

    +
    +

    Checks to see if a foreign key exists on a table for a given foreign key definition.

    # Checks to see if a foreign key exists.
     foreign_key_exists?(:accounts, :branches)
    @@ -2145,8 +1977,7 @@ 

    # Checks to see if a foreign key with a custom name exists. foreign_key_exists?(:accounts, name: "special_fk_name")

    -
    - +
    @@ -2171,17 +2002,11 @@

    -

    - - foreign_keys(table_name) - -

    +

    foreign_keys(table_name)

    - -
    -

    Returns an array of foreign keys for the given table. The foreign keys are represented as ForeignKeyDefinition objects.

    -
    - +
    +

    Returns an array of foreign keys for the given table. The foreign keys are represented as ForeignKeyDefinition objects.

    +
    @@ -2206,15 +2031,10 @@

    -

    - - index_exists?(table_name, column_name = nil, **options) - -

    +

    index_exists?(table_name, column_name = nil, **options)

    - -
    -

    Checks to see if an index exists on a table for a given index definition.

    +
    +

    Checks to see if an index exists on a table for a given index definition.

    # Check an index exists
     index_exists?(:suppliers, :company_id)
    @@ -2231,8 +2051,7 @@ 

    # Check a valid index exists (PostgreSQL only) index_exists?(:suppliers, :company_id, valid: true)

    -
    - +
    @@ -2257,17 +2076,11 @@

    -

    - - index_name_exists?(table_name, index_name) - -

    +

    index_name_exists?(table_name, index_name)

    - -
    -

    Verifies the existence of an index with a given name.

    -
    - +
    +

    Verifies the existence of an index with a given name.

    +
    @@ -2293,17 +2106,11 @@

    -

    - - indexes(table_name) - -

    +

    indexes(table_name)

    - -
    -

    Returns an array of indexes for the given table.

    -
    - +
    +

    Returns an array of indexes for the given table.

    +
    @@ -2328,17 +2135,11 @@

    -

    - - max_index_name_size() - -

    +

    max_index_name_size()

    - -
    -

    Returns the maximum length of an index name in bytes.

    -
    - +
    +

    Returns the maximum length of an index name in bytes.

    +
    @@ -2363,17 +2164,11 @@

    -

    - - native_database_types() - -

    +

    native_database_types()

    - -
    -

    Returns a hash of mappings from the abstract data types to the native database types. See TableDefinition#column for details on the recognized abstract data types.

    -
    - +
    +

    Returns a hash of mappings from the abstract data types to the native database types. See TableDefinition#column for details on the recognized abstract data types.

    +
    @@ -2398,17 +2193,9 @@

    -

    - - options_include_default?(options) - -

    +

    options_include_default?(options)

    -
    - -
    - @@ -2433,17 +2220,11 @@

    -

    - - primary_key(table_name) - -

    +

    primary_key(table_name)

    - -
    -

    Returns just a table’s primary key

    -
    - +
    +

    Returns just a table’s primary key

    +
    @@ -2470,24 +2251,17 @@

    -

    - - remove_belongs_to(table_name, ref_name, foreign_key: false, polymorphic: false, **options) - -

    +

    remove_belongs_to(table_name, ref_name, foreign_key: false, polymorphic: false, **options)

    -
    - -
    - -
    - Alias for: remove_reference -
    +

    + Alias for: + remove_reference. +

    @@ -2495,15 +2269,10 @@

    -

    - - remove_check_constraint(table_name, expression = nil, if_exists: false, **options) - -

    +

    remove_check_constraint(table_name, expression = nil, if_exists: false, **options)

    - -
    -

    Removes the given check constraint from the table. Removing a check constraint that does not exist will raise an error.

    +
    +

    Removes the given check constraint from the table. Removing a check constraint that does not exist will raise an error.

    remove_check_constraint :products, name: "price_check"
     
    @@ -2514,8 +2283,7 @@

    The expression parameter will be ignored if present. It can be helpful to provide this in a migration’s change method so it can be reverted. In that case, expression will be used by add_check_constraint.

    -

    - +
    @@ -2549,15 +2317,10 @@

    -

    - - remove_column(table_name, column_name, type = nil, **options) - -

    +

    remove_column(table_name, column_name, type = nil, **options)

    - -
    -

    Removes the column from the table definition.

    +
    +

    Removes the column from the table definition.

    remove_column(:suppliers, :qualification)
     
    @@ -2568,8 +2331,7 @@

    remove_column(:suppliers, :qualification, if_exists: true)
     
    -

    - +
    @@ -2596,15 +2358,10 @@

    -

    - - remove_columns(table_name, *column_names, type: nil, **options) - -

    +

    remove_columns(table_name, *column_names, type: nil, **options)

    - -
    -

    Removes the given columns from the table definition.

    +
    +

    Removes the given columns from the table definition.

    remove_columns(:suppliers, :qualification, :experience)
     
    @@ -2613,8 +2370,7 @@

    remove_columns(:suppliers, :qualification, :experience, type: :string, null: false)
     
    -

    - +
    @@ -2644,15 +2400,10 @@

    -

    - - remove_foreign_key(from_table, to_table = nil, **options) - -

    +

    remove_foreign_key(from_table, to_table = nil, **options)

    - -
    -

    Removes the given foreign key from the table. Any option parameters provided will be used to re-add the foreign key in case of a migration rollback. It is recommended that you provide any options used when creating the foreign key so that the migration can be reverted properly.

    +
    +

    Removes the given foreign key from the table. Any option parameters provided will be used to re-add the foreign key in case of a migration rollback. It is recommended that you provide any options used when creating the foreign key so that the migration can be reverted properly.

    Removes the foreign key on accounts.branch_id.

    @@ -2684,8 +2435,7 @@

    The name of the table that contains the referenced primary key.

    -

    - +
    @@ -2718,15 +2468,10 @@

    -

    - - remove_index(table_name, column_name = nil, **options) - -

    +

    remove_index(table_name, column_name = nil, **options)

    - -
    -

    Removes the given index from the table.

    +
    +

    Removes the given index from the table.

    Removes the index on branch_id in the accounts table if exactly one such index exists.

    @@ -2768,8 +2513,7 @@

    Concurrently removing an index is not supported in a transaction.

    For more information see the “Transactional Migrations” section.

    -

    - +
    @@ -2798,15 +2542,10 @@

    -

    - - remove_reference(table_name, ref_name, foreign_key: false, polymorphic: false, **options) - -

    +

    remove_reference(table_name, ref_name, foreign_key: false, polymorphic: false, **options)

    - -
    -

    Removes the reference(s). Also removes a type column if one exists.

    +
    +

    Removes the reference(s). Also removes a type column if one exists.

    Remove the reference
    @@ -2822,13 +2561,14 @@
    remove_reference(:products, :user, foreign_key: true) -
    - +
    -
    - Also aliased as: remove_belongs_to -
    +

    + Also aliased as: + + remove_belongs_to. +

    @@ -2866,20 +2606,14 @@
    -

    - - remove_timestamps(table_name, **options) - -

    +

    remove_timestamps(table_name, **options)

    - -
    -

    Removes the timestamp columns (created_at and updated_at) from the table definition.

    +
    +

    Removes the timestamp columns (created_at and updated_at) from the table definition.

    remove_timestamps(:suppliers)
     
    -
    - +
    @@ -2904,20 +2638,14 @@

    -

    - - rename_column(table_name, column_name, new_column_name) - -

    +

    rename_column(table_name, column_name, new_column_name)

    - -
    -

    Renames a column.

    +
    +

    Renames a column.

    rename_column(:suppliers, :description, :name)
     
    -
    - +
    @@ -2942,22 +2670,16 @@

    -

    - - rename_index(table_name, old_name, new_name) - -

    +

    rename_index(table_name, old_name, new_name)

    - -
    -

    Renames an index.

    +
    +

    Renames an index.

    Rename the index_people_on_last_name index to index_users_on_last_name:

    rename_index :people, 'index_people_on_last_name', 'index_users_on_last_name'
     
    -
    - +
    @@ -2990,20 +2712,14 @@

    -

    - - rename_table(table_name, new_name, **) - -

    +

    rename_table(table_name, new_name, **)

    - -
    -

    Renames a table.

    +
    +

    Renames a table.

    rename_table('octopuses', 'octopi')
     
    -
    - +
    @@ -3028,17 +2744,11 @@

    -

    - - table_alias_for(table_name) - -

    +

    table_alias_for(table_name)

    - -
    -

    Truncates a table alias according to the limits of the current adapter.

    -
    - +
    +

    Truncates a table alias according to the limits of the current adapter.

    +
    @@ -3063,17 +2773,11 @@

    -

    - - table_comment(table_name) - -

    +

    table_comment(table_name)

    - -
    -

    Returns the table comment that’s stored in database metadata.

    -
    - +
    +

    Returns the table comment that’s stored in database metadata.

    +
    @@ -3098,20 +2802,14 @@

    -

    - - table_exists?(table_name) - -

    +

    table_exists?(table_name)

    - -
    -

    Checks to see if the table table_name exists on the database.

    +
    +

    Checks to see if the table table_name exists on the database.

    table_exists?(:developers)
     
    -
    - +
    @@ -3138,17 +2836,9 @@

    -

    - - table_options(table_name) - -

    +

    table_options(table_name)

    -
    - -
    - @@ -3173,17 +2863,11 @@

    -

    - - tables() - -

    +

    tables()

    - -
    -

    Returns an array of table names defined in the database.

    -
    - +
    +

    Returns an array of table names defined in the database.

    +
    @@ -3208,17 +2892,9 @@

    -

    - - use_foreign_keys?() - -

    +

    use_foreign_keys?()

    -
    - -
    - @@ -3243,20 +2919,14 @@

    -

    - - view_exists?(view_name) - -

    +

    view_exists?(view_name)

    - -
    -

    Checks to see if the view view_name exists on the database.

    +
    +

    Checks to see if the view view_name exists on the database.

    view_exists?(:ebooks)
     
    -
    - +
    @@ -3283,17 +2953,11 @@

    -

    - - views() - -

    +

    views()

    - -
    -

    Returns an array of view names defined in the database.

    -
    - +
    +

    Returns an array of view names defined in the database.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/Table.html b/src/classes/ActiveRecord/ConnectionAdapters/Table.html index 7f07e6f280..1d0622a0cb 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/Table.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/Table.html @@ -233,17 +233,9 @@

    Attributes

    Class Public methods

    -

    - - new(table_name, base) - -

    +

    new(table_name, base)

    -
    - -
    - @@ -273,24 +265,17 @@

    Instance Public methods

    -

    - - belongs_to(*args, **options) - -

    +

    belongs_to(*args, **options)

    -
    - -
    - -
    - Alias for: references -
    +

    + Alias for: + references. +

    @@ -298,23 +283,17 @@

    -

    - - change(column_name, type, **options) - -

    +

    change(column_name, type, **options)

    - -
    -

    Changes the column’s definition according to the new options.

    +
    +

    Changes the column’s definition according to the new options.

    t.change(:name, :string, limit: 80)
     t.change(:description, :text)
     

    See TableDefinition#column for details of the options you can use.

    -
    - +
    @@ -340,15 +319,10 @@

    -

    - - change_default(column_name, default_or_changes) - -

    +

    change_default(column_name, default_or_changes)

    - -
    -

    Sets a new default value for a column.

    +
    +

    Sets a new default value for a column.

    t.change_default(:qualification, 'new')
     t.change_default(:authorized, 1)
    @@ -356,8 +330,7 @@ 

    See connection.change_column_default

    -
    - +
    @@ -382,23 +355,17 @@

    -

    - - change_null(column_name, null, default = nil) - -

    +

    change_null(column_name, null, default = nil)

    - -
    -

    Sets or removes a NOT NULL constraint on a column.

    +
    +

    Sets or removes a NOT NULL constraint on a column.

    t.change_null(:qualification, true)
     t.change_null(:qualification, false, 0)
     

    See connection.change_column_null

    -
    - +
    @@ -423,22 +390,16 @@

    -

    - - check_constraint(*args, **options) - -

    +

    check_constraint(*args, **options)

    - -
    -

    Adds a check constraint.

    +
    +

    Adds a check constraint.

    t.check_constraint("price > 0", name: "price_check")
     

    See connection.add_check_constraint

    -
    - +
    @@ -463,15 +424,10 @@

    -

    - - check_constraint_exists?(*args, **options) - -

    +

    check_constraint_exists?(*args, **options)

    - -
    -

    Checks if a check_constraint exists on a table.

    +
    +

    Checks if a check_constraint exists on a table.

    unless t.check_constraint_exists?(name: "price_check")
       t.check_constraint("price > 0", name: "price_check")
    @@ -479,8 +435,7 @@ 

    See connection.check_constraint_exists?

    -
    - +
    @@ -505,22 +460,16 @@

    -

    - - column(column_name, type, index: nil, **options) - -

    +

    column(column_name, type, index: nil, **options)

    - -
    -

    Adds a new column to the named table.

    +
    +

    Adds a new column to the named table.

    t.column(:name, :string)
     

    See TableDefinition#column for details of the options you can use.

    -
    - +
    @@ -550,22 +499,16 @@

    -

    - - column_exists?(column_name, type = nil, **options) - -

    +

    column_exists?(column_name, type = nil, **options)

    - -
    -

    Checks to see if a column exists.

    +
    +

    Checks to see if a column exists.

    t.string(:name) unless t.column_exists?(:name, :string)
     

    See connection.column_exists?

    -
    - +
    @@ -590,23 +533,17 @@

    -

    - - foreign_key(*args, **options) - -

    +

    foreign_key(*args, **options)

    - -
    -

    Adds a foreign key to the table using a supplied table name.

    +
    +

    Adds a foreign key to the table using a supplied table name.

    t.foreign_key(:authors)
     t.foreign_key(:authors, column: :author_id, primary_key: "id")
     

    See connection.add_foreign_key

    -
    - +
    @@ -632,22 +569,16 @@

    -

    - - foreign_key_exists?(*args, **options) - -

    +

    foreign_key_exists?(*args, **options)

    - -
    -

    Checks to see if a foreign key exists.

    +
    +

    Checks to see if a foreign key exists.

    t.foreign_key(:authors) unless t.foreign_key_exists?(:authors)
     

    See connection.foreign_key_exists?

    -
    - +
    @@ -672,15 +603,10 @@

    -

    - - index(column_name, **options) - -

    +

    index(column_name, **options)

    - -
    -

    Adds a new index to the table. column_name can be a single Symbol, or an Array of Symbols.

    +
    +

    Adds a new index to the table. column_name can be a single Symbol, or an Array of Symbols.

    t.index(:name)
     t.index([:branch_id, :party_id], unique: true)
    @@ -688,8 +614,7 @@ 

    See connection.add_index for details of the options you can use.

    -
    - +
    @@ -715,15 +640,10 @@

    -

    - - index_exists?(column_name = nil, **options) - -

    +

    index_exists?(column_name = nil, **options)

    - -
    -

    Checks to see if an index exists.

    +
    +

    Checks to see if an index exists.

    unless t.index_exists?(:branch_id)
       t.index(:branch_id)
    @@ -731,8 +651,7 @@ 

    See connection.index_exists?

    -
    - +
    @@ -757,28 +676,24 @@

    -

    - - references(*args, **options) - -

    +

    references(*args, **options)

    - -
    -

    Adds a reference.

    +
    +

    Adds a reference.

    t.references(:user)
     t.belongs_to(:supplier, foreign_key: true)
     

    See connection.add_reference for details of the options you can use.

    -
    - +
    -
    - Also aliased as: belongs_to -
    +

    + Also aliased as: + + belongs_to. +

    @@ -805,23 +720,17 @@

    -

    - - remove(*column_names, **options) - -

    +

    remove(*column_names, **options)

    - -
    -

    Removes the column(s) from the table definition.

    +
    +

    Removes the column(s) from the table definition.

    t.remove(:qualification)
     t.remove(:qualification, :experience)
     

    See connection.remove_columns

    -
    - +
    @@ -847,24 +756,17 @@

    -

    - - remove_belongs_to(*args, **options) - -

    +

    remove_belongs_to(*args, **options)

    -
    - -
    - -
    - Alias for: remove_references -
    +

    + Alias for: + remove_references. +

    @@ -872,22 +774,16 @@

    -

    - - remove_check_constraint(*args, **options) - -

    +

    remove_check_constraint(*args, **options)

    - -
    -

    Removes the given check constraint from the table.

    +
    +

    Removes the given check constraint from the table.

    t.remove_check_constraint(name: "price_check")
     

    See connection.remove_check_constraint

    -
    - +
    @@ -912,23 +808,17 @@

    -

    - - remove_foreign_key(*args, **options) - -

    +

    remove_foreign_key(*args, **options)

    - -
    -

    Removes the given foreign key from the table.

    +
    +

    Removes the given foreign key from the table.

    t.remove_foreign_key(:authors)
     t.remove_foreign_key(column: :author_id)
     

    See connection.remove_foreign_key

    -
    - +
    @@ -954,15 +844,10 @@

    -

    - - remove_index(column_name = nil, **options) - -

    +

    remove_index(column_name = nil, **options)

    - -
    -

    Removes the given index from the table.

    +
    +

    Removes the given index from the table.

    t.remove_index(:branch_id)
     t.remove_index(column: [:branch_id, :party_id])
    @@ -971,8 +856,7 @@ 

    See connection.remove_index

    -
    - +
    @@ -998,28 +882,24 @@

    -

    - - remove_references(*args, **options) - -

    +

    remove_references(*args, **options)

    - -
    -

    Removes a reference. Optionally removes a type column.

    +
    +

    Removes a reference. Optionally removes a type column.

    t.remove_references(:user)
     t.remove_belongs_to(:supplier, polymorphic: true)
     

    See connection.remove_reference

    -
    - +
    -
    - Also aliased as: remove_belongs_to -
    +

    + Also aliased as: + + remove_belongs_to. +

    @@ -1046,22 +926,16 @@

    -

    - - remove_timestamps(**options) - -

    +

    remove_timestamps(**options)

    - -
    -

    Removes the timestamp columns (created_at and updated_at) from the table.

    +
    +

    Removes the timestamp columns (created_at and updated_at) from the table.

    t.remove_timestamps
     

    See connection.remove_timestamps

    -
    - +
    @@ -1086,22 +960,16 @@

    -

    - - rename(column_name, new_column_name) - -

    +

    rename(column_name, new_column_name)

    - -
    -

    Renames a column.

    +
    +

    Renames a column.

    t.rename(:description, :name)
     

    See connection.rename_column

    -
    - +
    @@ -1126,22 +994,16 @@

    -

    - - rename_index(index_name, new_index_name) - -

    +

    rename_index(index_name, new_index_name)

    - -
    -

    Renames the given index on the table.

    +
    +

    Renames the given index on the table.

    t.rename_index(:user_id, :account_id)
     

    See connection.rename_index

    -
    - +
    @@ -1166,22 +1028,16 @@

    -

    - - timestamps(**options) - -

    +

    timestamps(**options)

    - -
    -

    Adds timestamps (created_at and updated_at) columns to the table.

    +
    +

    Adds timestamps (created_at and updated_at) columns to the table.

    t.timestamps(null: false)
     

    See connection.add_timestamps

    -
    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html b/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html index 07c8d9e354..5ce0d249ee 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TableDefinition.html @@ -222,17 +222,9 @@

    Attributes

    Class Public methods

    -

    - - new( conn, name, temporary: false, if_not_exists: false, options: nil, as: nil, comment: nil, ** ) - -

    +

    new( conn, name, temporary: false, if_not_exists: false, options: nil, as: nil, comment: nil, ** )

    -
    - -
    - @@ -281,17 +273,11 @@

    Instance Public methods

    -

    - - [](name) - -

    +

    [](name)

    - -
    -

    Returns a ColumnDefinition for the column with name name.

    -
    - +
    +

    Returns a ColumnDefinition for the column with name name.

    +
    @@ -316,24 +302,17 @@

    -

    - - belongs_to(*args, **options) - -

    +

    belongs_to(*args, **options)

    -
    - -
    - -
    - Alias for: references -
    +

    + Alias for: + references. +

    @@ -341,17 +320,9 @@

    -

    - - check_constraint(expression, **options) - -

    +

    check_constraint(expression, **options)

    -
    - -
    - @@ -376,15 +347,10 @@

    -

    - - column(name, type, index: nil, **options) - -

    +

    column(name, type, index: nil, **options)

    - -
    -

    Instantiates a new column for the table. See connection.add_column for available options.

    +
    +

    Instantiates a new column for the table. See connection.add_column for available options.

    Additional options are:

    • @@ -448,8 +414,7 @@

      Short-hand examples

      t.references :taggable, polymorphic: { default: 'Photo' }, index: false end -
    - +
    @@ -485,17 +450,11 @@

    Short-hand examples

    -

    - - columns() - -

    +

    columns()

    - -
    -

    Returns an array of ColumnDefinition objects for the columns of the table.

    -
    - +
    +

    Returns an array of ColumnDefinition objects for the columns of the table.

    +
    @@ -518,17 +477,9 @@

    -

    - - foreign_key(to_table, **options) - -

    +

    foreign_key(to_table, **options)

    -
    - -
    - @@ -553,20 +504,14 @@

    -

    - - index(column_name, **options) - -

    +

    index(column_name, **options)

    - -
    -

    Adds index options to the indexes hash, keyed by column name This is primarily used to track indexes that need to be created after the table

    +
    +

    Adds index options to the indexes hash, keyed by column name This is primarily used to track indexes that need to be created after the table

    index(:account_id, name: 'index_projects_on_account_id')
     
    -
    - +
    @@ -591,15 +536,10 @@

    -

    - - references(*args, **options) - -

    +

    references(*args, **options)

    - -
    -

    Adds a reference.

    +
    +

    Adds a reference.

    t.references(:user)
     t.belongs_to(:supplier, foreign_key: true)
    @@ -607,13 +547,14 @@ 

    See connection.add_reference for details of the options you can use.

    -
    - +
    -
    - Also aliased as: belongs_to -
    +

    + Also aliased as: + + belongs_to. +

    @@ -639,20 +580,14 @@

    -

    - - remove_column(name) - -

    +

    remove_column(name)

    - -
    -

    remove the column name from the table.

    +
    +

    remove the column name from the table.

    remove_column(:account_id)
     
    -
    - +
    @@ -677,17 +612,9 @@

    -

    - - set_primary_key(table_name, id, primary_key, **options) - -

    +

    set_primary_key(table_name, id, primary_key, **options)

    -
    - -
    - @@ -725,20 +652,14 @@

    -

    - - timestamps(**options) - -

    +

    timestamps(**options)

    - -
    -

    Appends :datetime columns :created_at and :updated_at to the table. See connection.add_timestamps

    +
    +

    Appends :datetime columns :created_at and :updated_at to the table. See connection.add_timestamps

    t.timestamps null: false
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html b/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html index d805391da0..b8633fd81e 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TransactionInstrumenter.html @@ -86,17 +86,9 @@

    Methods

    Class Public methods

    -

    - - new(payload = {}) - -

    +

    new(payload = {})

    -
    - -
    - @@ -128,17 +120,9 @@

    Instance Public methods

    -

    - - finish(outcome) - -

    +

    finish(outcome)

    -
    - -
    - @@ -167,17 +151,9 @@

    -

    - - start() - -

    +

    start()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html b/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html index 612ca789c7..a7f8b2794f 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TransactionState.html @@ -129,17 +129,9 @@

    Methods

    Class Public methods

    -

    - - new(state = nil) - -

    +

    new(state = nil)

    -
    - -
    - @@ -169,17 +161,9 @@

    Instance Public methods

    -

    - - add_child(state) - -

    +

    add_child(state)

    -
    - -
    - @@ -205,17 +189,9 @@

    -

    - - commit!() - -

    +

    commit!()

    -
    - -
    - @@ -240,17 +216,9 @@

    -

    - - committed?() - -

    +

    committed?()

    -
    - -
    - @@ -275,17 +243,9 @@

    -

    - - completed?() - -

    +

    completed?()

    -
    - -
    - @@ -310,17 +270,9 @@

    -

    - - finalized?() - -

    +

    finalized?()

    -
    - -
    - @@ -345,17 +297,9 @@

    -

    - - full_commit!() - -

    +

    full_commit!()

    -
    - -
    - @@ -380,17 +324,9 @@

    -

    - - full_rollback!() - -

    +

    full_rollback!()

    -
    - -
    - @@ -416,17 +352,9 @@

    -

    - - fully_committed?() - -

    +

    fully_committed?()

    -
    - -
    - @@ -451,17 +379,9 @@

    -

    - - fully_completed?() - -

    +

    fully_completed?()

    -
    - -
    - @@ -486,17 +406,9 @@

    -

    - - fully_rolledback?() - -

    +

    fully_rolledback?()

    -
    - -
    - @@ -521,17 +433,9 @@

    -

    - - invalidate!() - -

    +

    invalidate!()

    -
    - -
    - @@ -557,17 +461,9 @@

    -

    - - invalidated?() - -

    +

    invalidated?()

    -
    - -
    - @@ -592,17 +488,9 @@

    -

    - - nullify!() - -

    +

    nullify!()

    -
    - -
    - @@ -627,17 +515,9 @@

    -

    - - rollback!() - -

    +

    rollback!()

    -
    - -
    - @@ -663,17 +543,9 @@

    -

    - - rolledback?() - -

    +

    rolledback?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html b/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html index d3f38c7a95..be72ddf1ea 100644 --- a/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html +++ b/src/classes/ActiveRecord/ConnectionAdapters/TrilogyAdapter.html @@ -183,17 +183,9 @@

    Constants

    Class Public methods

    -

    - - new(config, *) - -

    +

    new(config, *)

    -
    - -
    - @@ -232,17 +224,9 @@

    -

    - - new_client(config) - -

    +

    new_client(config)

    -
    - -
    - @@ -270,17 +254,9 @@

    -

    - - parse_ssl_mode(mode) - -

    +

    parse_ssl_mode(mode)

    -
    - -
    - @@ -310,17 +286,9 @@

    -

    - - translate_connect_error(config, error) - -

    +

    translate_connect_error(config, error)

    -
    - -
    - @@ -360,17 +328,9 @@

    Instance Public methods

    -

    - - active?() - -

    +

    active?()

    -
    - -
    - @@ -397,17 +357,9 @@

    -

    - - connected?() - -

    +

    connected?()

    -
    - -
    - @@ -432,17 +384,9 @@

    -

    - - discard!() - -

    +

    discard!()

    -
    - -
    - @@ -471,17 +415,9 @@

    -

    - - disconnect!() - -

    +

    disconnect!()

    -
    - -
    - @@ -510,17 +446,9 @@

    -

    - - savepoint_errors_invalidate_transactions?() - -

    +

    savepoint_errors_invalidate_transactions?()

    -
    - -
    - @@ -545,17 +473,9 @@

    -

    - - supports_comments?() - -

    +

    supports_comments?()

    -
    - -
    - @@ -580,17 +500,9 @@

    -

    - - supports_comments_in_create?() - -

    +

    supports_comments_in_create?()

    -
    - -
    - @@ -615,17 +527,9 @@

    -

    - - supports_json?() - -

    +

    supports_json?()

    -
    - -
    - @@ -650,17 +554,9 @@

    -

    - - supports_lazy_transactions?() - -

    +

    supports_lazy_transactions?()

    -
    - -
    - @@ -685,17 +581,9 @@

    -

    - - supports_savepoints?() - -

    +

    supports_savepoints?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionHandling.html b/src/classes/ActiveRecord/ConnectionHandling.html index 7ef3f05002..c70f17711f 100644 --- a/src/classes/ActiveRecord/ConnectionHandling.html +++ b/src/classes/ActiveRecord/ConnectionHandling.html @@ -194,17 +194,11 @@

    Attributes

    Instance Public methods

    -

    - - clear_query_caches_for_current_thread() - -

    +

    clear_query_caches_for_current_thread()

    - -
    -

    Clears the query cache for all connections associated with the current thread.

    -
    - +
    +

    Clears the query cache for all connections associated with the current thread.

    +
    @@ -231,17 +225,11 @@

    -

    - - connected?() - -

    +

    connected?()

    - -
    -

    Returns true if Active Record is connected.

    -
    - +
    +

    Returns true if Active Record is connected.

    +
    @@ -266,15 +254,10 @@

    -

    - - connected_to(role: nil, shard: nil, prevent_writes: false, &blk) - -

    +

    connected_to(role: nil, shard: nil, prevent_writes: false, &blk)

    - -
    -

    Connects to a role (e.g. writing, reading, or a custom role) and/or shard for the duration of the block. At the end of the block the connection will be returned to the original role / shard.

    +
    +

    Connects to a role (e.g. writing, reading, or a custom role) and/or shard for the duration of the block. At the end of the block the connection will be returned to the original role / shard.

    If only a role is passed, Active Record will look up the connection based on the requested role. If a non-established role is requested an ActiveRecord::ConnectionNotEstablished error will be raised:

    @@ -295,8 +278,7 @@

    Dog.first # finds first Dog record stored on the shard one replica end -

    - +
    @@ -333,15 +315,10 @@

    -

    - - connected_to?(role:, shard: ActiveRecord::Base.default_shard) - -

    +

    connected_to?(role:, shard: ActiveRecord::Base.default_shard)

    - -
    -

    Returns true if role is the current connected role and/or current connected shard. If no shard is passed, the default will be used.

    +
    +

    Returns true if role is the current connected role and/or current connected shard. If no shard is passed, the default will be used.

    ActiveRecord::Base.connected_to(role: :writing) do
       ActiveRecord::Base.connected_to?(role: :writing) #=> true
    @@ -354,8 +331,7 @@ 

    ActiveRecord::Base.connected_to?(role: :writing, shard: :shard_one) #=> true end

    -
    - +
    @@ -380,19 +356,13 @@

    -

    - - connected_to_all_shards(role: nil, prevent_writes: false, &blk) - -

    +

    connected_to_all_shards(role: nil, prevent_writes: false, &blk)

    - -
    -

    Passes the block to connected_to for every shard the model is configured to connect to (if any), and returns the results in an array.

    +
    +

    Passes the block to connected_to for every shard the model is configured to connect to (if any), and returns the results in an array.

    Optionally, role and/or prevent_writes can be passed which will be forwarded to each connected_to call.

    -
    - +
    @@ -419,15 +389,10 @@

    -

    - - connected_to_many(*classes, role:, shard: nil, prevent_writes: false) - -

    +

    connected_to_many(*classes, role:, shard: nil, prevent_writes: false)

    - -
    -

    Connects a role and/or shard to the provided connection names. Optionally prevent_writes can be passed to block writes on a connection. reading will automatically set prevent_writes to true.

    +
    +

    Connects a role and/or shard to the provided connection names. Optionally prevent_writes can be passed to block writes on a connection. reading will automatically set prevent_writes to true.

    connected_to_many is an alternative to deeply nested connected_to blocks.

    @@ -439,8 +404,7 @@

    Person.first # Read from primary writer end -

    - +
    @@ -476,21 +440,15 @@

    -

    - - connecting_to(role: default_role, shard: default_shard, prevent_writes: false) - -

    +

    connecting_to(role: default_role, shard: default_shard, prevent_writes: false)

    - -
    -

    Use a specified connection.

    +
    +

    Use a specified connection.

    This method is useful for ensuring that a specific connection is being used. For example, when booting a console in readonly mode.

    It is not recommended to use this method in a request since it does not yield to a block like connected_to.

    -
    - +
    @@ -517,17 +475,11 @@

    -

    - - connection() - -

    +

    connection()

    - -
    -

    Soft deprecated. Use with_connection or lease_connection instead.

    -
    - +
    +

    Soft deprecated. Use with_connection or lease_connection instead.

    +
    @@ -571,15 +523,10 @@

    -

    - - connection_db_config() - -

    +

    connection_db_config()

    - -
    -

    Returns the db_config object from the associated connection:

    +
    +

    Returns the db_config object from the associated connection:

    ActiveRecord::Base.connection_db_config
       #<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbded10 @env_name="development",
    @@ -587,8 +534,7 @@ 

    Use only for reading.

    -
    - +
    @@ -613,17 +559,9 @@

    -

    - - connection_pool() - -

    +

    connection_pool()

    -
    - -
    - @@ -648,17 +586,11 @@

    -

    - - connection_specification_name() - -

    +

    connection_specification_name()

    - -
    -

    Returns the connection specification name from the current class or its parent.

    -
    - +
    +

    Returns the connection specification name from the current class or its parent.

    +
    @@ -686,15 +618,10 @@

    -

    - - connects_to(database: {}, shards: {}) - -

    +

    connects_to(database: {}, shards: {})

    - -
    -

    Connects a model to the databases specified. The database keyword takes a hash consisting of a role and a database_key.

    +
    +

    Connects a model to the databases specified. The database keyword takes a hash consisting of a role and a database_key.

    This will look up the database config using the database_key and establish a connection to that config.

    @@ -718,8 +645,7 @@

    Returns an array of database connections.

    -

    - +
    @@ -770,15 +696,10 @@

    -

    - - establish_connection(config_or_env = nil) - -

    +

    establish_connection(config_or_env = nil)

    - -
    -

    Establishes the connection to the database. Accepts a hash as input where the :adapter key must be specified with the name of a database adapter (in lower-case) example for regular databases (MySQL, PostgreSQL, etc):

    +
    +

    Establishes the connection to the database. Accepts a hash as input where the :adapter key must be specified with the name of a database adapter (in lower-case) example for regular databases (MySQL, PostgreSQL, etc):

    ActiveRecord::Base.establish_connection(
       adapter:  "mysql2",
    @@ -818,8 +739,7 @@ 

    The exceptions AdapterNotSpecified, AdapterNotFound, and ArgumentError may be returned on an error.

    -
    - +
    @@ -846,17 +766,11 @@

    -

    - - lease_connection() - -

    +

    lease_connection()

    - -
    -

    Returns the connection currently associated with the class. This can also be used to “borrow” the connection to do database work unrelated to any of the specific Active Records. The connection will remain leased for the entire duration of the request or job, or until release_connection is called.

    -
    - +
    +

    Returns the connection currently associated with the class. This can also be used to “borrow” the connection to do database work unrelated to any of the specific Active Records. The connection will remain leased for the entire duration of the request or job, or until release_connection is called.

    +
    @@ -881,19 +795,13 @@

    -

    - - prohibit_shard_swapping(enabled = true) - -

    +

    prohibit_shard_swapping(enabled = true)

    - -
    -

    Prohibit swapping shards while inside of the passed block.

    +
    +

    Prohibit swapping shards while inside of the passed block.

    In some cases you may want to be able to swap shards but not allow a nested call to connected_to or connected_to_many to swap again. This is useful in cases you’re using sharding to provide per-request database isolation.

    -
    - +
    @@ -922,17 +830,11 @@

    -

    - - release_connection() - -

    +

    release_connection()

    - -
    -

    Return the currently leased connection into the pool

    -
    - +
    +

    Return the currently leased connection into the pool

    +
    @@ -957,17 +859,9 @@

    -

    - - remove_connection() - -

    +

    remove_connection()

    -
    - -
    - @@ -1001,17 +895,9 @@

    -

    - - retrieve_connection() - -

    +

    retrieve_connection()

    -
    - -
    - @@ -1036,17 +922,9 @@

    -

    - - shard_keys() - -

    +

    shard_keys()

    -
    - -
    - @@ -1071,17 +949,11 @@

    -

    - - shard_swapping_prohibited?() - -

    +

    shard_swapping_prohibited?()

    - -
    -

    Determine whether or not shard swapping is currently prohibited

    -
    - +
    +

    Determine whether or not shard swapping is currently prohibited

    +
    @@ -1106,17 +978,9 @@

    -

    - - sharded?() - -

    +

    sharded?()

    -
    - -
    - @@ -1141,23 +1005,17 @@

    -

    - - while_preventing_writes(enabled = true, &block) - -

    +

    while_preventing_writes(enabled = true, &block)

    - -
    -

    Prevent writing to the database regardless of role.

    +
    +

    Prevent writing to the database regardless of role.

    In some cases you may want to prevent writes to the database even if you are on a database that can write. while_preventing_writes will prevent writes to the database for the duration of the block.

    This method does not provide the same protection as a readonly user and is meant to be a safeguard against accidental writes.

    See READ_QUERY for the queries that are blocked by this method.

    -
    - +
    @@ -1182,17 +1040,11 @@

    -

    - - with_connection(prevent_permanent_checkout: false, &block) - -

    +

    with_connection(prevent_permanent_checkout: false, &block)

    - -
    -

    Checkouts a connection from the pool, yield it and then check it back in. If a connection was already leased via lease_connection or a parent call to with_connection, that same connection is yielded. If lease_connection is called inside the block, the connection won’t be checked back in. If connection is called inside the block, the connection won’t be checked back in unless the prevent_permanent_checkout argument is set to true.

    -
    - +
    +

    Checkouts a connection from the pool, yield it and then check it back in. If a connection was already leased via lease_connection or a parent call to with_connection, that same connection is yielded. If lease_connection is called inside the block, the connection won’t be checked back in. If connection is called inside the block, the connection won’t be checked back in unless the prevent_permanent_checkout argument is set to true.

    +
    diff --git a/src/classes/ActiveRecord/ConnectionNotDefined.html b/src/classes/ActiveRecord/ConnectionNotDefined.html index cbd324fabf..616524f84d 100644 --- a/src/classes/ActiveRecord/ConnectionNotDefined.html +++ b/src/classes/ActiveRecord/ConnectionNotDefined.html @@ -99,17 +99,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, connection_name: nil, role: nil, shard: nil) - -

    +

    new(message = nil, connection_name: nil, role: nil, shard: nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ConnectionNotEstablished.html b/src/classes/ActiveRecord/ConnectionNotEstablished.html index 24d55ca4cd..3c0bd363c5 100644 --- a/src/classes/ActiveRecord/ConnectionNotEstablished.html +++ b/src/classes/ActiveRecord/ConnectionNotEstablished.html @@ -73,17 +73,9 @@

    Methods

    Class Public methods

    -

    - - new(message = nil, connection_pool: nil) - -

    +

    new(message = nil, connection_pool: nil)

    -
    - -
    - @@ -112,17 +104,9 @@

    Instance Public methods

    -

    - - set_pool(connection_pool) - -

    +

    set_pool(connection_pool)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Core.html b/src/classes/ActiveRecord/Core.html index e6503b391e..2b756d705d 100644 --- a/src/classes/ActiveRecord/Core.html +++ b/src/classes/ActiveRecord/Core.html @@ -233,15 +233,10 @@

    Attributes

    Class Public methods

    -

    - - attributes_for_inspect - -

    +

    attributes_for_inspect

    - -
    -

    Specifies the attributes that will be included in the output of the inspect method:

    +
    +

    Specifies the attributes that will be included in the output of the inspect method:

    Post.attributes_for_inspect = [:id, :title]
     Post.first.inspect #=> "#<Post id: 1, title: "Hello, World!">"
    @@ -252,8 +247,7 @@ 

    Post.attributes_for_inspect = :all
     Post.first.inspect #=> "#<Post id: 1, title: "Hello, World!", published_at: "2023-10-23 14:28:11 +0000">"
     
    -

    - +
    @@ -277,17 +271,11 @@

    -

    - - configurations() - -

    +

    configurations()

    - -
    -

    Returns a fully resolved ActiveRecord::DatabaseConfigurations object.

    -
    - +
    +

    Returns a fully resolved ActiveRecord::DatabaseConfigurations object.

    +
    @@ -312,15 +300,10 @@

    -

    - - configurations=(config) - -

    +

    configurations=(config)

    - -
    -

    Contains the database configuration - as is typically stored in config/database.yml - as an ActiveRecord::DatabaseConfigurations object.

    +
    +

    Contains the database configuration - as is typically stored in config/database.yml - as an ActiveRecord::DatabaseConfigurations object.

    For example, the following database.yml…

    @@ -342,8 +325,7 @@

    @name="primary", @config={adapter: "sqlite3", database: "storage/production.sqlite3"}> ]> -

    - +
    @@ -368,17 +350,9 @@

    -

    - - connection_handler() - -

    +

    connection_handler()

    -
    - -
    - @@ -403,17 +377,9 @@

    -

    - - connection_handler=(handler) - -

    +

    connection_handler=(handler)

    -
    - -
    - @@ -438,15 +404,10 @@

    -

    - - current_preventing_writes() - -

    +

    current_preventing_writes()

    - -
    -

    Returns the symbol representing the current setting for preventing writes.

    +
    +

    Returns the symbol representing the current setting for preventing writes.

    ActiveRecord::Base.connected_to(role: :reading) do
       ActiveRecord::Base.current_preventing_writes #=> true
    @@ -456,8 +417,7 @@ 

    ActiveRecord::Base.current_preventing_writes #=> false end

    -
    - +
    @@ -487,15 +447,10 @@

    -

    - - current_role() - -

    +

    current_role()

    - -
    -

    Returns the symbol representing the current connected role.

    +
    +

    Returns the symbol representing the current connected role.

    ActiveRecord::Base.connected_to(role: :writing) do
       ActiveRecord::Base.current_role #=> :writing
    @@ -505,8 +460,7 @@ 

    ActiveRecord::Base.current_role #=> :reading end

    -
    - +
    @@ -536,15 +490,10 @@

    -

    - - current_shard() - -

    +

    current_shard()

    - -
    -

    Returns the symbol representing the current connected shard.

    +
    +

    Returns the symbol representing the current connected shard.

    ActiveRecord::Base.connected_to(role: :reading) do
       ActiveRecord::Base.current_shard #=> :default
    @@ -554,8 +503,7 @@ 

    ActiveRecord::Base.current_shard #=> :one end

    -
    - +
    @@ -585,17 +533,11 @@

    -

    - - destroy_association_async_batch_size - -

    +

    destroy_association_async_batch_size

    - -
    -

    Specifies the maximum number of records that will be destroyed in a single background job by the dependent: :destroy_async association option. When nil (default), all dependent records will be destroyed in a single background job. If specified, the records to be destroyed will be split into multiple background jobs.

    -
    - +
    +

    Specifies the maximum number of records that will be destroyed in a single background job by the dependent: :destroy_async association option. When nil (default), all dependent records will be destroyed in a single background job. If specified, the records to be destroyed will be split into multiple background jobs.

    +
    @@ -619,17 +561,11 @@

    -

    - - destroy_association_async_job() - -

    +

    destroy_association_async_job()

    - -
    -

    The job class used to destroy associations in the background.

    -
    - +
    +

    The job class used to destroy associations in the background.

    +
    @@ -659,17 +595,11 @@

    -

    - - enumerate_columns_in_select_statements - -

    +

    enumerate_columns_in_select_statements

    - -
    -

    Force enumeration of all columns in SELECT statements. e.g. SELECT first_name, last_name FROM ... instead of SELECT * FROM ... This avoids PreparedStatementCacheExpired errors when a column is added to the database while the app is running.

    -
    - +
    +

    Force enumeration of all columns in SELECT statements. e.g. SELECT first_name, last_name FROM ... instead of SELECT * FROM ... This avoids PreparedStatementCacheExpired errors when a column is added to the database while the app is running.

    +
    @@ -693,17 +623,11 @@

    -

    - - logger - -

    +

    logger

    - -
    -

    Accepts a logger conforming to the interface of Log4r or the default Ruby Logger class, which is then passed on to any new database connections made. You can retrieve this logger by calling logger on either an Active Record model class or an Active Record model instance.

    -
    - +
    +

    Accepts a logger conforming to the interface of Log4r or the default Ruby Logger class, which is then passed on to any new database connections made. You can retrieve this logger by calling logger on either an Active Record model class or an Active Record model instance.

    +
    @@ -727,23 +651,17 @@

    -

    - - new(attributes = nil) - -

    +

    new(attributes = nil)

    - -
    -

    New objects can be instantiated as either empty (pass no construction parameter) or pre-set with attributes but not yet saved (pass a hash with key names matching the associated table column names). In both instances, valid attribute keys are determined by the column names of the associated table – hence you can’t have attributes that aren’t part of the table columns.

    +
    +

    New objects can be instantiated as either empty (pass no construction parameter) or pre-set with attributes but not yet saved (pass a hash with key names matching the associated table column names). In both instances, valid attribute keys are determined by the column names of the associated table – hence you can’t have attributes that aren’t part of the table columns.

    Example

    # Instantiates a single new object
     User.new(first_name: 'Jamie')
     
    -
    - +
    @@ -781,17 +699,11 @@

    Example

    Instance Public methods

    -

    - - <=>(other_object) - -

    +

    <=>(other_object)

    - -
    -

    Allows sort on objects

    -
    - +
    +

    Allows sort on objects

    +
    @@ -820,26 +732,22 @@

    -

    - - ==(comparison_object) - -

    +

    ==(comparison_object)

    - -
    -

    Returns true if comparison_object is the same exact object, or comparison_object is of the same type and self has an ID and it is equal to comparison_object.id.

    +
    +

    Returns true if comparison_object is the same exact object, or comparison_object is of the same type and self has an ID and it is equal to comparison_object.id.

    Note that new records are different from any other record by definition, unless the other record is the receiver itself. Besides, if you fetch existing records with select and leave the ID out, you’re on your own, this predicate will return false.

    Note also that destroying a record preserves its ID in the model instance, so deleted models are still comparable.

    -
    - +
    -
    - Also aliased as: eql? -
    +

    + Also aliased as: + + eql?. +

    @@ -866,15 +774,10 @@

    -

    - - clone - -

    +

    clone

    - -
    -

    Identical to Ruby’s clone method. This is a “shallow” copy. Be warned that your attributes are not copied. That means that modifying attributes of the clone will modify the original, since they will both point to the same attributes hash. If you need a copy of your attributes hash, please use the dup method.

    +
    +

    Identical to Ruby’s clone method. This is a “shallow” copy. Be warned that your attributes are not copied. That means that modifying attributes of the clone will modify the original, since they will both point to the same attributes hash. If you need a copy of your attributes hash, please use the dup method.

    user = User.first
     new_user = user.clone
    @@ -887,8 +790,7 @@ 

    user.name.object_id == user.dup.name.object_id # => false

    -
    - +
    @@ -901,17 +803,9 @@

    -

    - - connection_handler() - -

    +

    connection_handler()

    -
    - -
    - @@ -936,17 +830,11 @@

    -

    - - dup - -

    +

    dup

    - -
    -

    Duped objects have no id assigned and are treated as new records. Note that this is a “shallow” copy as it copies the object’s attributes only, not its associations. The extent of a “deep” copy is application specific and is therefore left to the application to implement according to its need. The dup method does not preserve the timestamps (created|updated)_(at|on) and locking column.

    -
    - +
    +

    Duped objects have no id assigned and are treated as new records. Note that this is a “shallow” copy as it copies the object’s attributes only, not its associations. The extent of a “deep” copy is application specific and is therefore left to the application to implement according to its need. The dup method does not preserve the timestamps (created|updated)_(at|on) and locking column.

    +
    @@ -959,15 +847,10 @@

    -

    - - encode_with(coder) - -

    +

    encode_with(coder)

    - -
    -

    Populate coder with attributes about this record that should be serialized. The structure of coder defined in this method is guaranteed to match the structure of coder passed to the init_with method.

    +
    +

    Populate coder with attributes about this record that should be serialized. The structure of coder defined in this method is guaranteed to match the structure of coder passed to the init_with method.

    Example:

    @@ -977,8 +860,7 @@

    Post.new.encode_with(coder) coder # => {"attributes" => {"id" => nil, ... }} -

    - +
    @@ -1005,24 +887,17 @@

    -

    - - eql?(comparison_object) - -

    +

    eql?(comparison_object)

    -
    - -
    - -
    - Alias for: == -
    +

    + Alias for: + ==. +

    @@ -1030,17 +905,11 @@

    -

    - - freeze() - -

    +

    freeze()

    - -
    -

    Clone and freeze the attributes hash such that associations are still accessible, even on destroyed records, but cloned models will not be frozen.

    -
    - +
    +

    Clone and freeze the attributes hash such that associations are still accessible, even on destroyed records, but cloned models will not be frozen.

    +
    @@ -1066,17 +935,11 @@

    -

    - - frozen?() - -

    +

    frozen?()

    - -
    -

    Returns true if the attributes hash has been frozen.

    -
    - +
    +

    Returns true if the attributes hash has been frozen.

    +
    @@ -1101,21 +964,15 @@

    -

    - - full_inspect() - -

    +

    full_inspect()

    - -
    -

    Returns all attributes of the record as a nicely formatted string, ignoring .attributes_for_inspect.

    +
    +

    Returns all attributes of the record as a nicely formatted string, ignoring .attributes_for_inspect.

    Post.first.full_inspect
     #=> "#<Post id: 1, title: "Hello, World!", published_at: "2023-10-23 14:28:11 +0000">"
     
    -
    - +
    @@ -1140,20 +997,14 @@

    -

    - - hash() - -

    +

    hash()

    - -
    -

    Delegates to id in order to allow two records of the same type and id to work with something like:

    +
    +

    Delegates to id in order to allow two records of the same type and id to work with something like:

    [ Person.find(1), Person.find(2), Person.find(3) ] & [ Person.find(1), Person.find(4) ] # => [ Person.find(1) ]
     
    -
    - +
    @@ -1184,15 +1035,10 @@

    -

    - - init_with(coder, &block) - -

    +

    init_with(coder, &block)

    - -
    -

    Initialize an empty model object from coder. coder should be the result of previously encoding an Active Record model, using encode_with.

    +
    +

    Initialize an empty model object from coder. coder should be the result of previously encoding an Active Record model, using encode_with.

    class Post < ActiveRecord::Base
     end
    @@ -1205,8 +1051,7 @@ 

    post.init_with(coder) post.title # => 'hello world'

    -
    - +
    @@ -1233,15 +1078,10 @@

    -

    - - inspect() - -

    +

    inspect()

    - -
    -

    Returns the attributes of the record as a nicely formatted string.

    +
    +

    Returns the attributes of the record as a nicely formatted string.

    Post.first.inspect
     #=> "#<Post id: 1, title: "Hello, World!", published_at: "2023-10-23 14:28:11 +0000">"
    @@ -1253,8 +1093,7 @@ 

    Post.first.inspect #=> "#<Post id: 1, title: "Hello, World!">"

    -
    - +
    @@ -1279,17 +1118,11 @@

    -

    - - pretty_print(pp) - -

    +

    pretty_print(pp)

    - -
    -

    Takes a PP and prettily prints this record to it, allowing you to get a nice result from pp record when pp is required.

    -
    - +
    +

    Takes a PP and prettily prints this record to it, allowing you to get a nice result from pp record when pp is required.

    +
    @@ -1333,15 +1166,10 @@

    -

    - - readonly!() - -

    +

    readonly!()

    - -
    -

    Prevents records from being written to the database:

    +
    +

    Prevents records from being written to the database:

    customer = Customer.new
     customer.readonly!
    @@ -1367,8 +1195,7 @@ 

    but you won’t be able to persist the changes.

    -
    - +
    @@ -1393,17 +1220,11 @@

    -

    - - readonly?() - -

    +

    readonly?()

    - -
    -

    Returns true if the record is read only.

    -
    - +
    +

    Returns true if the record is read only.

    +
    @@ -1428,23 +1249,17 @@

    -

    - - slice(*methods) - - -

    +

    slice(*methods) +

    - -
    -

    Returns a hash of the given methods with their names as keys and returned values as values.

    +
    +

    Returns a hash of the given methods with their names as keys and returned values as values.

    topic = Topic.new(title: "Budget", author_name: "Jason")
     topic.slice(:title, :author_name)
     # => { "title" => "Budget", "author_name" => "Jason" }
     
    -
    - +
    @@ -1457,15 +1272,10 @@

    -

    - - strict_loading!(value = true, mode: :all) - -

    +

    strict_loading!(value = true, mode: :all)

    - -
    -

    Sets the record to strict_loading mode. This will raise an error if the record tries to lazily load an association.

    +
    +

    Sets the record to strict_loading mode. This will raise an error if the record tries to lazily load an association.

    NOTE: Strict loading is disabled during validation in order to let the record validate its association.

    @@ -1497,8 +1307,7 @@

    Examples

    user.comments.first.ratings.to_a # => ActiveRecord::StrictLoadingViolationError -
    - +
    @@ -1528,17 +1337,11 @@

    Examples

    -

    - - strict_loading?() - -

    +

    strict_loading?()

    - -
    -

    Returns true if the record is in strict_loading mode.

    -
    - +
    +

    Returns true if the record is in strict_loading mode.

    +
    @@ -1563,17 +1366,11 @@

    -

    - - strict_loading_all?() - -

    +

    strict_loading_all?()

    - -
    -

    Returns true if the record uses strict_loading with :all mode enabled.

    -
    - +
    +

    Returns true if the record uses strict_loading with :all mode enabled.

    +
    @@ -1598,17 +1395,11 @@

    -

    - - strict_loading_n_plus_one_only?() - -

    +

    strict_loading_n_plus_one_only?()

    - -
    -

    Returns true if the record uses strict_loading with :n_plus_one_only mode enabled.

    -
    - +
    +

    Returns true if the record uses strict_loading with :n_plus_one_only mode enabled.

    +
    @@ -1633,23 +1424,17 @@

    -

    - - values_at(*methods) +

    values_at(*methods) +

    - -
    - - -
    -

    Returns an array of the values returned by the given methods.

    +
    +

    Returns an array of the values returned by the given methods.

    topic = Topic.new(title: "Budget", author_name: "Jason")
     topic.values_at(:title, :author_name)
     # => ["Budget", "Jason"]
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/Core/ClassMethods.html b/src/classes/ActiveRecord/Core/ClassMethods.html index d4b3c18bdf..4c7ec708cf 100644 --- a/src/classes/ActiveRecord/Core/ClassMethods.html +++ b/src/classes/ActiveRecord/Core/ClassMethods.html @@ -62,17 +62,11 @@

    Methods

    Instance Public methods

    -

    - - filter_attributes() - -

    +

    filter_attributes()

    - -
    -

    Returns columns which shouldn’t be exposed while calling inspect.

    -
    - +
    +

    Returns columns which shouldn’t be exposed while calling inspect.

    +
    @@ -101,17 +95,11 @@

    -

    - - filter_attributes=(filter_attributes) - -

    +

    filter_attributes=(filter_attributes)

    - -
    -

    Specifies columns which shouldn’t be exposed while calling inspect.

    -
    - +
    +

    Specifies columns which shouldn’t be exposed while calling inspect.

    +
    diff --git a/src/classes/ActiveRecord/Core/InspectionMask.html b/src/classes/ActiveRecord/Core/InspectionMask.html index d4bc423c40..3733dae7c3 100644 --- a/src/classes/ActiveRecord/Core/InspectionMask.html +++ b/src/classes/ActiveRecord/Core/InspectionMask.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - pretty_print(pp) - -

    +

    pretty_print(pp)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/CounterCache/ClassMethods.html b/src/classes/ActiveRecord/CounterCache/ClassMethods.html index ee9bf0f8b4..b7b13a73ef 100644 --- a/src/classes/ActiveRecord/CounterCache/ClassMethods.html +++ b/src/classes/ActiveRecord/CounterCache/ClassMethods.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - decrement_counter(counter_name, id, by: 1, touch: nil) - -

    +

    decrement_counter(counter_name, id, by: 1, touch: nil)

    - -
    -

    Decrement a numeric field by one, via a direct SQL update.

    +
    +

    Decrement a numeric field by one, via a direct SQL update.

    This works the same as increment_counter but reduces the column value by 1 instead of increasing it.

    @@ -106,8 +101,7 @@

    Examples

    # and update the updated_at value. DiscussionBoard.decrement_counter(:posts_count, 5, touch: true) -
    - +
    @@ -132,15 +126,10 @@

    Examples

    -

    - - increment_counter(counter_name, id, by: 1, touch: nil) - -

    +

    increment_counter(counter_name, id, by: 1, touch: nil)

    - -
    -

    Increment a numeric field by one, via a direct SQL update.

    +
    +

    Increment a numeric field by one, via a direct SQL update.

    This method is used primarily for maintaining counter_cache columns that are used to store aggregate values. For example, a DiscussionBoard may cache posts_count and comments_count to avoid running an SQL query to calculate the number of posts and comments there are, each time it is displayed.

    @@ -168,8 +157,7 @@

    Examples

    # and update the updated_at value. DiscussionBoard.increment_counter(:posts_count, 5, touch: true) -
    - +
    @@ -194,15 +182,10 @@

    Examples

    -

    - - reset_counters(id, *counters, touch: nil) - -

    +

    reset_counters(id, *counters, touch: nil)

    - -
    -

    Resets one or more counter caches to their correct value using an SQL count query. This is useful when adding new counter caches, or if the counter has been corrupted or modified directly by SQL.

    +
    +

    Resets one or more counter caches to their correct value using an SQL count query. This is useful when adding new counter caches, or if the counter has been corrupted or modified directly by SQL.

    Parameters

    • @@ -225,8 +208,7 @@

      Examples

      # attributes. Post.reset_counters(1, :comments, touch: true) -
    - +
    @@ -309,15 +291,10 @@

    Examples

    -

    - - update_counters(id, counters) - -

    +

    update_counters(id, counters)

    - -
    -

    A generic “counter updater” implementation, intended primarily to be used by increment_counter and decrement_counter, but which may also be useful on its own. It simply does a direct SQL update for the record with the given ID, altering the given hash of counters by the amount given by the corresponding value:

    +
    +

    A generic “counter updater” implementation, intended primarily to be used by increment_counter and decrement_counter, but which may also be useful on its own. It simply does a direct SQL update for the record with the given ID, altering the given hash of counters by the amount given by the corresponding value:

    Parameters

    • @@ -355,8 +332,7 @@

      Examples

      # `updated_at` = '2016-10-13T09:59:23-05:00' # WHERE id IN (10, 15) -
    - +
    diff --git a/src/classes/ActiveRecord/DatabaseConfigurations.html b/src/classes/ActiveRecord/DatabaseConfigurations.html index 5d8a58f1a6..34e34353d4 100644 --- a/src/classes/ActiveRecord/DatabaseConfigurations.html +++ b/src/classes/ActiveRecord/DatabaseConfigurations.html @@ -134,17 +134,9 @@

    Attributes

    Class Public methods

    -

    - - new(configurations = {}) - -

    +

    new(configurations = {})

    -
    - -
    - @@ -169,15 +161,10 @@

    -

    - - register_db_config_handler(&block) - -

    +

    register_db_config_handler(&block)

    - -
    -

    Allows an application to register a custom handler for database configuration objects. This is useful for creating a custom handler that responds to methods your application needs but Active Record doesn’t implement. For example if you are using Vitess, you may want your Vitess configurations to respond to ‘sharded?`. To implement this define the following in an initializer:

    +
    +

    Allows an application to register a custom handler for database configuration objects. This is useful for creating a custom handler that responds to methods your application needs but Active Record doesn’t implement. For example if you are using Vitess, you may want your Vitess configurations to respond to ‘sharded?`. To implement this define the following in an initializer:

    ActiveSupport.on_load(:active_record_database_configurations) do
       ActiveRecord::DatabaseConfigurations.register_db_config_handler do |env_name, name, url, config|
    @@ -199,8 +186,7 @@ 

    For configs that have a :vitess key, a VitessConfig object will be created instead of a UrlConfig.

    -
    - +
    @@ -229,24 +215,17 @@

    Instance Public methods

    -

    - - blank?() - -

    +

    blank?()

    -
    - -
    - -
    - Alias for: empty? -
    +

    + Alias for: + empty?. +

    @@ -254,15 +233,10 @@

    -

    - - configs_for(env_name: nil, name: nil, config_key: nil, include_hidden: false) - -

    +

    configs_for(env_name: nil, name: nil, config_key: nil, include_hidden: false)

    - -
    -

    Collects the configs for the environment and optionally the specification name passed in. To include replica configurations pass include_hidden: true.

    +
    +

    Collects the configs for the environment and optionally the specification name passed in. To include replica configurations pass include_hidden: true.

    If a name is provided a single DatabaseConfig object will be returned, otherwise an array of DatabaseConfig objects will be returned that corresponds with the environment and type requested.

    @@ -276,8 +250,7 @@

    Options

  • include_hidden: Determines whether to include replicas and configurations hidden by database_tasks: false in the returned list. Most of the time we’re only iterating over the primary connections (i.e. migrations don’t need to run for the write and read connection). Defaults to false.

  • -
    - +
    @@ -323,22 +296,18 @@

    Options

    -

    - - empty?() - -

    +

    empty?()

    - -
    -

    Checks if the application’s configurations are empty.

    -
    - +
    +

    Checks if the application’s configurations are empty.

    +
    -
    - Also aliased as: blank? -
    +

    + Also aliased as: + + blank?. +

    @@ -362,19 +331,13 @@

    -

    - - find_db_config(env) - -

    +

    find_db_config(env)

    - -
    -

    Returns a single DatabaseConfig object based on the requested environment.

    +
    +

    Returns a single DatabaseConfig object based on the requested environment.

    If the application has multiple databases find_db_config will return the first DatabaseConfig for the environment.

    -
    - +
    diff --git a/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html b/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html index 41229f7b3f..ef0035c318 100644 --- a/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html +++ b/src/classes/ActiveRecord/DatabaseConfigurations/HashConfig.html @@ -182,15 +182,10 @@

    Attributes

    Class Public methods

    -

    - - new(env_name, name, configuration_hash) - -

    +

    new(env_name, name, configuration_hash)

    - -
    -

    Initialize a new HashConfig object

    +
    +

    Initialize a new HashConfig object

    Parameters

    • @@ -200,8 +195,7 @@

      Parameters

    • configuration_hash - The config hash. This is the hash that contains the database adapter, name, and other important information for database connections.

    -
    - +
    @@ -232,17 +226,9 @@

    Parameters

    Instance Public methods

    -

    - - adapter() - -

    +

    adapter()

    -
    - -
    - @@ -267,17 +253,9 @@

    -

    - - checkout_timeout() - -

    +

    checkout_timeout()

    -
    - -
    - @@ -302,17 +280,9 @@

    -

    - - database() - -

    +

    database()

    -
    - -
    - @@ -337,17 +307,9 @@

    -

    - - default_schema_cache_path(db_dir = "db") - -

    +

    default_schema_cache_path(db_dir = "db")

    -
    - -
    - @@ -376,17 +338,9 @@

    -

    - - host() - -

    +

    host()

    -
    - -
    - @@ -411,17 +365,9 @@

    -

    - - idle_timeout() - -

    +

    idle_timeout()

    -
    - -
    - @@ -447,17 +393,9 @@

    -

    - - keepalive() - -

    +

    keepalive()

    -
    - -
    - @@ -483,17 +421,9 @@

    -

    - - lazy_schema_cache_path() - -

    +

    lazy_schema_cache_path()

    -
    - -
    - @@ -518,17 +448,9 @@

    -

    - - max_age() - -

    +

    max_age()

    -
    - -
    - @@ -558,22 +480,16 @@

    -

    - - max_connections() - -

    +

    max_connections()

    -
    - -
    - -
    - Also aliased as: pool -
    +

    + Also aliased as: + + pool. +

    @@ -600,17 +516,9 @@

    -

    - - max_queue() - -

    +

    max_queue()

    -
    - -
    - @@ -635,17 +543,9 @@

    -

    - - max_threads() - -

    +

    max_threads()

    -
    - -
    - @@ -670,17 +570,11 @@

    -

    - - migrations_paths() - -

    +

    migrations_paths()

    - -
    -

    The migrations paths for a database configuration. If the migrations_paths key is present in the config, migrations_paths will return its value.

    -
    - +
    +

    The migrations paths for a database configuration. If the migrations_paths key is present in the config, migrations_paths will return its value.

    +
    @@ -705,17 +599,9 @@

    -

    - - min_connections() - -

    +

    min_connections()

    -
    - -
    - @@ -740,17 +626,9 @@

    -

    - - min_threads() - -

    +

    min_threads()

    -
    - -
    - @@ -775,24 +653,17 @@

    -

    - - pool() - -

    +

    pool()

    -
    - -
    - -
    - Alias for: max_connections -
    +

    + Alias for: + max_connections. +

    @@ -800,17 +671,9 @@

    -

    - - query_cache() - -

    +

    query_cache()

    -
    - -
    - @@ -835,17 +698,11 @@

    -

    - - replica?() - -

    +

    replica?()

    - -
    -

    Determines whether a database configuration is for a replica / readonly connection. If the replica key is present in the config, replica? will return true.

    -
    - +
    +

    Determines whether a database configuration is for a replica / readonly connection. If the replica key is present in the config, replica? will return true.

    +
    @@ -870,17 +727,11 @@

    -

    - - schema_cache_path() - -

    +

    schema_cache_path()

    - -
    -

    The path to the schema cache dump file for a database. If omitted, the filename will be read from ENV or a default will be derived.

    -
    - +
    +

    The path to the schema cache dump file for a database. If omitted, the filename will be read from ENV or a default will be derived.

    +
    @@ -905,21 +756,15 @@

    -

    - - schema_dump(format = schema_format) - -

    +

    schema_dump(format = schema_format)

    - -
    -

    Determines whether to dump the schema/structure files and the filename that should be used.

    +
    +

    Determines whether to dump the schema/structure files and the filename that should be used.

    If configuration_hash[:schema_dump] is set to false or nil the schema will not be dumped.

    If the config option is set that will be used. Otherwise Rails will generate the filename from the database config name.

    -
    - +
    @@ -952,19 +797,13 @@

    -

    - - seeds?() - -

    +

    seeds?()

    - -
    -

    Determines whether the db:prepare task should seed the database from db/seeds.rb.

    +
    +

    Determines whether the db:prepare task should seed the database from db/seeds.rb.

    If the seeds key is present in the config, seeds? will return its value. Otherwise, it will return true for the primary database and false for all other configs.

    -
    - +
    diff --git a/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html b/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html index 2726375f89..cf3452bc4c 100644 --- a/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html +++ b/src/classes/ActiveRecord/DatabaseConfigurations/UrlConfig.html @@ -100,15 +100,10 @@

    Attributes

    Class Public methods

    -

    - - new(env_name, name, url, configuration_hash = {}) - -

    +

    new(env_name, name, url, configuration_hash = {})

    - -
    -

    Initialize a new UrlConfig object

    +
    +

    Initialize a new UrlConfig object

    Options

    • @@ -120,8 +115,7 @@

      Options

    • :config - The config hash. This is the hash that contains the database adapter, name, and other important information for database connections.

    -
    - +
    diff --git a/src/classes/ActiveRecord/DatabaseConnectionError.html b/src/classes/ActiveRecord/DatabaseConnectionError.html index 4af5aff60e..10e2c92ce9 100644 --- a/src/classes/ActiveRecord/DatabaseConnectionError.html +++ b/src/classes/ActiveRecord/DatabaseConnectionError.html @@ -77,17 +77,9 @@

    Methods

    Class Public methods

    -

    - - hostname_error(hostname) - -

    +

    hostname_error(hostname)

    -
    - -
    - @@ -115,17 +107,9 @@

    -

    - - new(message = nil) - -

    +

    new(message = nil)

    -
    - -
    - @@ -150,17 +134,9 @@

    -

    - - username_error(username) - -

    +

    username_error(username)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/DelegatedType.html b/src/classes/ActiveRecord/DelegatedType.html index 53d4251744..c42d436970 100644 --- a/src/classes/ActiveRecord/DelegatedType.html +++ b/src/classes/ActiveRecord/DelegatedType.html @@ -216,15 +216,10 @@

    Methods

    Instance Public methods

    -

    - - delegated_type(role, types:, **options) - -

    +

    delegated_type(role, types:, **options)

    - -
    -

    Defines this as a class that’ll delegate its type for the passed role to the class references in types. That’ll create a polymorphic belongs_to relationship to that role, and it’ll add all the delegated type convenience methods:

    +
    +

    Defines this as a class that’ll delegate its type for the passed role to the class references in types. That’ll create a polymorphic belongs_to relationship to that role, and it’ll add all the delegated type convenience methods:

    class Entry < ApplicationRecord
       delegated_type :entryable, types: %w[ Message Comment ], dependent: :destroy
    @@ -276,8 +271,7 @@ 

    Options

    @entry.message_uuid # => returns entryable_uuid, when entryable_type == "Message", otherwise nil @entry.comment_uuid # => returns entryable_uuid, when entryable_type == "Comment", otherwise nil
    -
    - +
    diff --git a/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html b/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html index beef46cdcc..288667f2e6 100644 --- a/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html +++ b/src/classes/ActiveRecord/DestroyAssociationAsyncJob.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - perform( owner_model_name: nil, owner_id: nil, association_class: nil, association_ids: nil, association_primary_key_column: nil, ensuring_owner_was_method: nil ) - -

    +

    perform( owner_model_name: nil, owner_id: nil, association_class: nil, association_ids: nil, association_primary_key_column: nil, ensuring_owner_was_method: nil )

    -
    - -
    - diff --git a/src/classes/ActiveRecord/DynamicMatchers/FindBy.html b/src/classes/ActiveRecord/DynamicMatchers/FindBy.html index db541345db..e07e0526ed 100644 --- a/src/classes/ActiveRecord/DynamicMatchers/FindBy.html +++ b/src/classes/ActiveRecord/DynamicMatchers/FindBy.html @@ -81,17 +81,9 @@

    Attributes

    Class Public methods

    -

    - - finder() - -

    +

    finder()

    -
    - -
    - @@ -116,17 +108,9 @@

    -

    - - match?(name) - -

    +

    match?(name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html b/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html index 994b6afebb..eff5571f40 100644 --- a/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html +++ b/src/classes/ActiveRecord/DynamicMatchers/FindByBang.html @@ -81,17 +81,9 @@

    Attributes

    Class Public methods

    -

    - - finder() - -

    +

    finder()

    -
    - -
    - @@ -116,17 +108,9 @@

    -

    - - match?(name) - -

    +

    match?(name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/DynamicMatchers/Method.html b/src/classes/ActiveRecord/DynamicMatchers/Method.html index 1400626d62..bd8d855a18 100644 --- a/src/classes/ActiveRecord/DynamicMatchers/Method.html +++ b/src/classes/ActiveRecord/DynamicMatchers/Method.html @@ -71,17 +71,9 @@

    Methods

    Class Public methods

    -

    - - define(model, name) - -

    +

    define(model, name)

    -
    - -
    - @@ -110,17 +102,9 @@

    -

    - - match(name) - -

    +

    match(name)

    -
    - -
    - @@ -145,17 +129,9 @@

    -

    - - valid?(model, name) - -

    +

    valid?(model, name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/EagerLoadPolymorphicError.html b/src/classes/ActiveRecord/EagerLoadPolymorphicError.html index 659db17235..5976ea8c3c 100644 --- a/src/classes/ActiveRecord/EagerLoadPolymorphicError.html +++ b/src/classes/ActiveRecord/EagerLoadPolymorphicError.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(reflection = nil) - -

    +

    new(reflection = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption.html b/src/classes/ActiveRecord/Encryption.html index ab0aa4d978..fc1eacc01d 100644 --- a/src/classes/ActiveRecord/Encryption.html +++ b/src/classes/ActiveRecord/Encryption.html @@ -207,17 +207,9 @@

    Included Modules

    Class Public methods

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html b/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html index d21c5bd195..82627bd811 100644 --- a/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html +++ b/src/classes/ActiveRecord/Encryption/AutoFilteredParameters.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -110,17 +102,9 @@

    Instance Public methods

    -

    - - enable() - -

    +

    enable()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Cipher.html b/src/classes/ActiveRecord/Encryption/Cipher.html index 6f507cda70..d9dcda4e1d 100644 --- a/src/classes/ActiveRecord/Encryption/Cipher.html +++ b/src/classes/ActiveRecord/Encryption/Cipher.html @@ -116,19 +116,13 @@

    Constants

    Instance Public methods

    -

    - - decrypt(encrypted_message, key:) - -

    +

    decrypt(encrypted_message, key:)

    - -
    -

    Decrypt the provided Message.

    +
    +

    Decrypt the provided Message.

    When key is an Array, it will try all the keys raising a ActiveRecord::Encryption::Errors::Decryption if none works.

    -
    - +
    @@ -155,17 +149,11 @@

    -

    - - encrypt(clean_text, key:, deterministic: false) - -

    +

    encrypt(clean_text, key:, deterministic: false)

    - -
    -

    Encrypts the provided text and return an encrypted Message.

    -
    - +
    +

    Encrypts the provided text and return an encrypted Message.

    +
    @@ -192,17 +180,9 @@

    -

    - - iv_length() - -

    +

    iv_length()

    -
    - -
    - @@ -227,17 +207,9 @@

    -

    - - key_length() - -

    +

    key_length()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html b/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html index e0512f70aa..f3c14a3078 100644 --- a/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html +++ b/src/classes/ActiveRecord/Encryption/Cipher/Aes256Gcm.html @@ -102,17 +102,9 @@

    Constants

    Class Public methods

    -

    - - iv_length() - -

    +

    iv_length()

    -
    - -
    - @@ -137,17 +129,9 @@

    -

    - - key_length() - -

    +

    key_length()

    -
    - -
    - @@ -172,17 +156,11 @@

    -

    - - new(secret, deterministic: false) - -

    +

    new(secret, deterministic: false)

    - -
    -

    When iv not provided, it will generate a random iv on each encryption operation (default and recommended operation)

    -
    - +
    +

    When iv not provided, it will generate a random iv on each encryption operation (default and recommended operation)

    +
    @@ -212,17 +190,9 @@

    Instance Public methods

    -

    - - decrypt(encrypted_message) - -

    +

    decrypt(encrypted_message)

    -
    - -
    - @@ -270,17 +240,9 @@

    -

    - - encrypt(clear_text) - -

    +

    encrypt(clear_text)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Config.html b/src/classes/ActiveRecord/Encryption/Config.html index a7287c5fea..42414e8572 100644 --- a/src/classes/ActiveRecord/Encryption/Config.html +++ b/src/classes/ActiveRecord/Encryption/Config.html @@ -195,17 +195,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -234,20 +226,14 @@

    Instance Public methods

    -

    - - previous=(previous_schemes_properties) - -

    +

    previous=(previous_schemes_properties)

    - -
    -

    Configure previous encryption schemes.

    +
    +

    Configure previous encryption schemes.

    config.active_record.encryption.previous = [ { key_provider: MyOldKeyProvider.new } ]
     
    -
    - +
    @@ -274,17 +260,9 @@

    -

    - - support_sha1_for_non_deterministic_encryption=(value) - -

    +

    support_sha1_for_non_deterministic_encryption=(value)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Configurable.html b/src/classes/ActiveRecord/Encryption/Configurable.html index ad4902dd77..deef26f31c 100644 --- a/src/classes/ActiveRecord/Encryption/Configurable.html +++ b/src/classes/ActiveRecord/Encryption/Configurable.html @@ -64,15 +64,10 @@

    Methods

    Instance Public methods

    -

    - - on_encrypted_attribute_declared(&block) - -

    +

    on_encrypted_attribute_declared(&block)

    - -
    -

    Register callback to be invoked when an encrypted attribute is declared.

    +
    +

    Register callback to be invoked when an encrypted attribute is declared.

    Example

    @@ -80,8 +75,7 @@

    Example

    ... end -
    - +
    diff --git a/src/classes/ActiveRecord/Encryption/Context.html b/src/classes/ActiveRecord/Encryption/Context.html index e295aba46f..97c5c85ecb 100644 --- a/src/classes/ActiveRecord/Encryption/Context.html +++ b/src/classes/ActiveRecord/Encryption/Context.html @@ -97,17 +97,9 @@

    Constants

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -136,17 +128,9 @@

    Instance Public methods

    -

    - - key_provider() - -

    +

    key_provider()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Contexts.html b/src/classes/ActiveRecord/Encryption/Contexts.html index fa53283dd2..b018e0e8e2 100644 --- a/src/classes/ActiveRecord/Encryption/Contexts.html +++ b/src/classes/ActiveRecord/Encryption/Contexts.html @@ -88,17 +88,11 @@

    Methods

    Instance Public methods

    -

    - - context() - -

    +

    context()

    - -
    -

    Returns the current context. By default it will return the current context.

    -
    - +
    +

    Returns the current context. By default it will return the current context.

    +
    @@ -123,17 +117,9 @@

    -

    - - current_custom_context() - -

    +

    current_custom_context()

    -
    - -
    - @@ -158,22 +144,16 @@

    -

    - - protecting_encrypted_data(&block) - -

    +

    protecting_encrypted_data(&block)

    - -
    -

    Runs the provided block in an encryption context where:

    +
    +

    Runs the provided block in an encryption context where:

    • Reading encrypted content will return its ciphertext.

    • Writing encrypted content will fail.

    -
    - +
    @@ -198,17 +178,9 @@

    -

    - - reset_default_context() - -

    +

    reset_default_context()

    -
    - -
    - @@ -233,15 +205,10 @@

    -

    - - with_encryption_context(properties) - -

    +

    with_encryption_context(properties)

    - -
    -

    Configures a custom encryption context to use when running the provided block of code.

    +
    +

    Configures a custom encryption context to use when running the provided block of code.

    It supports overriding all the properties defined in Context.

    @@ -253,8 +220,7 @@

    Encryption contexts can be nested.

    -

    - +
    @@ -287,22 +253,16 @@

    -

    - - without_encryption(&block) - -

    +

    without_encryption(&block)

    - -
    -

    Runs the provided block in an encryption context where encryption is disabled:

    +
    +

    Runs the provided block in an encryption context where encryption is disabled:

    • Reading encrypted content will return its ciphertexts.

    • Writing encrypted content will write its clear text.

    -
    - +
    diff --git a/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html b/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html index a3f4598838..b2a81e5d0f 100644 --- a/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/DerivedSecretKeyProvider.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(passwords, key_generator: ActiveRecord::Encryption.key_generator) - -

    +

    new(passwords, key_generator: ActiveRecord::Encryption.key_generator)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html b/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html index 2b03697449..ad97930023 100644 --- a/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/DeterministicKeyProvider.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(password) - -

    +

    new(password)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/EncryptableRecord.html b/src/classes/ActiveRecord/Encryption/EncryptableRecord.html index b3bd778985..4b2f27af40 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptableRecord.html +++ b/src/classes/ActiveRecord/Encryption/EncryptableRecord.html @@ -129,17 +129,9 @@

    Constants

    Instance Public methods

    -

    - - add_length_validation_for_encrypted_columns() - -

    +

    add_length_validation_for_encrypted_columns()

    -
    - -
    - @@ -166,17 +158,11 @@

    -

    - - ciphertext_for(attribute_name) - -

    +

    ciphertext_for(attribute_name)

    - -
    -

    Returns the ciphertext for attribute_name.

    -
    - +
    +

    Returns the ciphertext for attribute_name.

    +
    @@ -205,17 +191,11 @@

    -

    - - decrypt() - -

    +

    decrypt()

    - -
    -

    Decrypts all the encryptable attributes and saves the changes.

    -
    - +
    +

    Decrypts all the encryptable attributes and saves the changes.

    +
    @@ -240,17 +220,11 @@

    -

    - - deterministic_encrypted_attributes() - -

    +

    deterministic_encrypted_attributes()

    - -
    -

    Returns the list of deterministic encryptable attributes in the model class.

    -
    - +
    +

    Returns the list of deterministic encryptable attributes in the model class.

    +
    @@ -277,17 +251,11 @@

    -

    - - encrypt() - -

    +

    encrypt()

    - -
    -

    Encrypts all the encryptable attributes and saves the changes.

    -
    - +
    +

    Encrypts all the encryptable attributes and saves the changes.

    +
    @@ -312,17 +280,9 @@

    -

    - - encrypt_attribute(name, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], compress: true, compressor: nil, **context_properties) - -

    +

    encrypt_attribute(name, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], compress: true, compressor: nil, **context_properties)

    -
    - -
    - @@ -357,17 +317,11 @@

    -

    - - encrypted_attribute?(attribute_name) - -

    +

    encrypted_attribute?(attribute_name)

    - -
    -

    Returns whether a given attribute is encrypted or not.

    -
    - +
    +

    Returns whether a given attribute is encrypted or not.

    +
    @@ -398,15 +352,10 @@

    -

    - - encrypts(*names, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], compress: true, compressor: nil, **context_properties) - -

    +

    encrypts(*names, key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], compress: true, compressor: nil, **context_properties)

    - -
    -

    Encrypts the name attribute.

    +
    +

    Encrypts the name attribute.

    Options

    • @@ -426,8 +375,7 @@

      Options

    • :previous - List of previous encryption schemes. When provided, they will be used in order when trying to read the attribute. Each entry of the list can contain the properties supported by encrypts. Also, when deterministic encryption is used, they will be used to generate additional ciphertexts to check in the queries.

    -
    - +
    @@ -456,17 +404,9 @@

    Options

    -

    - - global_previous_schemes_for(scheme) - -

    +

    global_previous_schemes_for(scheme)

    -
    - -
    - @@ -493,17 +433,9 @@

    -

    - - override_accessors_to_preserve_original(name, original_attribute_name) - -

    +

    override_accessors_to_preserve_original(name, original_attribute_name)

    -
    - -
    - @@ -541,17 +473,9 @@

    -

    - - preserve_original_encrypted(name) - -

    +

    preserve_original_encrypted(name)

    -
    - -
    - @@ -583,17 +507,9 @@

    -

    - - scheme_for(key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties) - -

    +

    scheme_for(key_provider: nil, key: nil, deterministic: false, support_unencrypted_data: nil, downcase: false, ignore_case: false, previous: [], **context_properties)

    -
    - -
    - @@ -622,17 +538,11 @@

    -

    - - source_attribute_from_preserved_attribute(attribute_name) - -

    +

    source_attribute_from_preserved_attribute(attribute_name)

    - -
    -

    Given a attribute name, it returns the name of the source attribute when it’s a preserved one.

    -
    - +
    +

    Given a attribute name, it returns the name of the source attribute when it’s a preserved one.

    +
    @@ -657,17 +567,9 @@

    -

    - - validate_column_size(attribute_name) - -

    +

    validate_column_size(attribute_name)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html b/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html index 922ad99c9c..2ea986c0b5 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html +++ b/src/classes/ActiveRecord/Encryption/EncryptedAttributeType.html @@ -131,22 +131,16 @@

    Attributes

    Class Public methods

    -

    - - new(scheme:, cast_type: ActiveModel::Type::String.new, previous_type: false, default: nil) - -

    +

    new(scheme:, cast_type: ActiveModel::Type::String.new, previous_type: false, default: nil)

    - -
    -

    Options

    +
    +

    Options

    • :scheme - A Scheme with the encryption properties for this attribute.

    • :cast_type - A type that will be used to serialize (before encrypting) and deserialize (after decrypting). ActiveModel::Type::String by default.

    -
    - +
    @@ -179,17 +173,9 @@

    Options

    Instance Public methods

    -

    - - cast(value) - -

    +

    cast(value)

    -
    - -
    - @@ -214,17 +200,9 @@

    -

    - - changed_in_place?(raw_old_value, new_value) - -

    +

    changed_in_place?(raw_old_value, new_value)

    -
    - -
    - @@ -250,17 +228,9 @@

    -

    - - deserialize(value) - -

    +

    deserialize(value)

    -
    - -
    - @@ -285,17 +255,9 @@

    -

    - - encrypted?(value) - -

    +

    encrypted?(value)

    -
    - -
    - @@ -320,17 +282,9 @@

    -

    - - serialize(value) - -

    +

    serialize(value)

    -
    - -
    - @@ -359,17 +313,9 @@

    -

    - - support_unencrypted_data?() - -

    +

    support_unencrypted_data?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html b/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html index 5c3494eb32..bcd07bc7e6 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html +++ b/src/classes/ActiveRecord/Encryption/EncryptedFixtures.html @@ -57,17 +57,9 @@

    Methods

    Class Public methods

    -

    - - new(fixture, model_class) - -

    +

    new(fixture, model_class)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html b/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html index 59ff87c529..59be767bfe 100644 --- a/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html +++ b/src/classes/ActiveRecord/Encryption/EncryptingOnlyEncryptor.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - decrypt(encrypted_text, key_provider: nil, cipher_options: {}) - -

    +

    decrypt(encrypted_text, key_provider: nil, cipher_options: {})

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Encryptor.html b/src/classes/ActiveRecord/Encryption/Encryptor.html index 260383079d..e81685cee8 100644 --- a/src/classes/ActiveRecord/Encryption/Encryptor.html +++ b/src/classes/ActiveRecord/Encryption/Encryptor.html @@ -137,15 +137,10 @@

    Attributes

    Class Public methods

    -

    - - new(compress: true, compressor: nil) - -

    +

    new(compress: true, compressor: nil)

    - -
    -

    Options

    +
    +

    Options

    :compress

    Boolean indicating whether records should be compressed before encryption. Defaults to true.

    @@ -153,8 +148,7 @@

    Options

    The compressor to use. It must respond to deflate and inflate. If not provided, will default to ActiveRecord::Encryption.config.compressor, which itself defaults to Zlib.

    -
    - +
    @@ -184,17 +178,9 @@

    Options

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -219,15 +205,10 @@

    -

    - - decrypt(encrypted_text, key_provider: default_key_provider, cipher_options: {}) - -

    +

    decrypt(encrypted_text, key_provider: default_key_provider, cipher_options: {})

    - -
    -

    Decrypts an encrypted_text and returns the result as clean text.

    +
    +

    Decrypts an encrypted_text and returns the result as clean text.

    Options

    :key_provider
    @@ -237,8 +218,7 @@

    Options

    Cipher-specific options that will be passed to the Cipher configured in ActiveRecord::Encryption.cipher.

    -
    - +
    @@ -268,15 +248,10 @@

    Options

    -

    - - encrypt(clear_text, key_provider: default_key_provider, cipher_options: {}) - -

    +

    encrypt(clear_text, key_provider: default_key_provider, cipher_options: {})

    - -
    -

    Encrypts clean_text and returns the encrypted result.

    +
    +

    Encrypts clean_text and returns the encrypted result.

    Internally, it will:

    1. @@ -297,8 +272,7 @@

      Options

      Cipher-specific options that will be passed to the Cipher configured in ActiveRecord::Encryption.cipher.

      -
    - +
    @@ -326,17 +300,11 @@

    Options

    -

    - - encrypted?(text) - -

    +

    encrypted?(text)

    - -
    -

    Returns whether the text is encrypted or not.

    -
    - +
    +

    Returns whether the text is encrypted or not.

    +
    diff --git a/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html b/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html index 3641ab1364..d902f520d8 100644 --- a/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/EnvelopeEncryptionKeyProvider.html @@ -87,17 +87,9 @@

    Methods

    Instance Public methods

    -

    - - active_primary_key() - -

    +

    active_primary_key()

    -
    - -
    - @@ -122,17 +114,9 @@

    -

    - - decryption_keys(encrypted_message) - -

    +

    decryption_keys(encrypted_message)

    -
    - -
    - @@ -158,17 +142,9 @@

    -

    - - encryption_key() - -

    +

    encryption_key()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html index b0b9ea4302..017580d346 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries.html @@ -106,17 +106,9 @@

    Methods

    Class Public methods

    -

    - - install_support() - -

    +

    install_support()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html index 7fe075e454..4a442b1a1b 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/AdditionalValue.html @@ -85,17 +85,9 @@

    Attributes

    Class Public methods

    -

    - - new(value, type) - -

    +

    new(value, type)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html index 866530d0f5..d2523624a0 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/CoreQueries.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - find_by(*args) - -

    +

    find_by(*args)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html index 9c364f6d75..f160b3539a 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/ExtendedEncryptableType.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - serialize(data) - -

    +

    serialize(data)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html index 7934c589bc..199cb7783b 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicQueries/RelationQueries.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - exists?(*args) - -

    +

    exists?(*args)

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - scope_for_create() - -

    +

    scope_for_create()

    -
    - -
    - @@ -149,17 +133,9 @@

    -

    - - where(*args) - -

    +

    where(*args)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html index 87b9386866..e40860c6dd 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator.html @@ -70,17 +70,9 @@

    Methods

    Class Public methods

    -

    - - install_support() - -

    +

    install_support()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html index 125411be20..cc3aa13fed 100644 --- a/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html +++ b/src/classes/ActiveRecord/Encryption/ExtendedDeterministicUniquenessValidator/EncryptedUniquenessValidator.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - validate_each(record, attribute, value) - -

    +

    validate_each(record, attribute, value)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Key.html b/src/classes/ActiveRecord/Encryption/Key.html index 12dbfed9f5..d8cd119472 100644 --- a/src/classes/ActiveRecord/Encryption/Key.html +++ b/src/classes/ActiveRecord/Encryption/Key.html @@ -101,17 +101,9 @@

    Attributes

    Class Public methods

    -

    - - derive_from(password) - -

    +

    derive_from(password)

    -
    - -
    - @@ -137,17 +129,9 @@

    -

    - - new(secret) - -

    +

    new(secret)

    -
    - -
    - @@ -177,17 +161,9 @@

    Instance Public methods

    -

    - - id() - -

    +

    id()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/KeyGenerator.html b/src/classes/ActiveRecord/Encryption/KeyGenerator.html index 991518540e..fe706c1cb2 100644 --- a/src/classes/ActiveRecord/Encryption/KeyGenerator.html +++ b/src/classes/ActiveRecord/Encryption/KeyGenerator.html @@ -95,17 +95,9 @@

    Attributes

    Class Public methods

    -

    - - new(hash_digest_class: ActiveRecord::Encryption.config.hash_digest_class) - -

    +

    new(hash_digest_class: ActiveRecord::Encryption.config.hash_digest_class)

    -
    - -
    - @@ -134,19 +126,13 @@

    Instance Public methods

    -

    - - derive_key_from(password, length: key_length) - -

    +

    derive_key_from(password, length: key_length)

    - -
    -

    Derives a key from the given password. The key will have a size in bytes of :length (configured Cipher‘s length by default)

    +
    +

    Derives a key from the given password. The key will have a size in bytes of :length (configured Cipher‘s length by default)

    The generated key will be salted with the value of ActiveRecord::Encryption.key_derivation_salt

    -
    - +
    @@ -172,15 +158,10 @@

    -

    - - generate_random_hex_key(length: key_length) - -

    +

    generate_random_hex_key(length: key_length)

    - -
    -

    Returns a random key in hexadecimal format. The key will have a size in bytes of :length (configured Cipher‘s length by default)

    +
    +

    Returns a random key in hexadecimal format. The key will have a size in bytes of :length (configured Cipher‘s length by default)

    Hexadecimal format is handy for representing keys as printable text. To maximize the space of characters used, it is good practice including not printable characters. Hexadecimal format ensures that generated keys are representable with plain text

    @@ -188,8 +169,7 @@

    [ value ].pack("H*")
     
    -

    - +
    @@ -214,17 +194,11 @@

    -

    - - generate_random_key(length: key_length) - -

    +

    generate_random_key(length: key_length)

    - -
    -

    Returns a random key. The key will have a size in bytes of :length (configured Cipher‘s length by default)

    -
    - +
    +

    Returns a random key. The key will have a size in bytes of :length (configured Cipher‘s length by default)

    +
    diff --git a/src/classes/ActiveRecord/Encryption/KeyProvider.html b/src/classes/ActiveRecord/Encryption/KeyProvider.html index 46ac4335db..e4ddd3df87 100644 --- a/src/classes/ActiveRecord/Encryption/KeyProvider.html +++ b/src/classes/ActiveRecord/Encryption/KeyProvider.html @@ -82,17 +82,9 @@

    Methods

    Class Public methods

    -

    - - new(keys) - -

    +

    new(keys)

    -
    - -
    - @@ -121,19 +113,13 @@

    Instance Public methods

    -

    - - decryption_keys(encrypted_message) - -

    +

    decryption_keys(encrypted_message)

    - -
    -

    Returns the list of decryption keys

    +
    +

    Returns the list of decryption keys

    When the message holds a reference to its encryption key, it will return an array with that key. If not, it will return the list of keys.

    -
    - +
    @@ -162,19 +148,13 @@

    -

    - - encryption_key() - -

    +

    encryption_key()

    - -
    -

    Returns the last key in the list as the active key to perform encryptions

    +
    +

    Returns the last key in the list as the active key to perform encryptions

    When ActiveRecord::Encryption.config.store_key_references is true, the key will include a public tag referencing the key itself. That key will be stored in the public headers of the encrypted message

    -
    - +
    diff --git a/src/classes/ActiveRecord/Encryption/Message.html b/src/classes/ActiveRecord/Encryption/Message.html index ddec51f66c..9b7093b1f7 100644 --- a/src/classes/ActiveRecord/Encryption/Message.html +++ b/src/classes/ActiveRecord/Encryption/Message.html @@ -102,17 +102,9 @@

    Attributes

    Class Public methods

    -

    - - new(payload: nil, headers: {}) - -

    +

    new(payload: nil, headers: {})

    -
    - -
    - @@ -144,17 +136,9 @@

    Instance Public methods

    -

    - - ==(other_message) - -

    +

    ==(other_message)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/MessagePackMessageSerializer.html b/src/classes/ActiveRecord/Encryption/MessagePackMessageSerializer.html index 2779a2f66c..3e42f3074f 100644 --- a/src/classes/ActiveRecord/Encryption/MessagePackMessageSerializer.html +++ b/src/classes/ActiveRecord/Encryption/MessagePackMessageSerializer.html @@ -92,17 +92,9 @@

    Methods

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -127,17 +119,9 @@

    -

    - - dump(message) - -

    +

    dump(message)

    -
    - -
    - @@ -163,17 +147,9 @@

    -

    - - load(serialized_content) - -

    +

    load(serialized_content)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/MessageSerializer.html b/src/classes/ActiveRecord/Encryption/MessageSerializer.html index 7513b9c5b3..947eb0c422 100644 --- a/src/classes/ActiveRecord/Encryption/MessageSerializer.html +++ b/src/classes/ActiveRecord/Encryption/MessageSerializer.html @@ -92,17 +92,9 @@

    Methods

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -127,17 +119,9 @@

    -

    - - dump(message) - -

    +

    dump(message)

    -
    - -
    - @@ -163,17 +147,9 @@

    -

    - - load(serialized_content) - -

    +

    load(serialized_content)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/NullEncryptor.html b/src/classes/ActiveRecord/Encryption/NullEncryptor.html index 776bbfa16b..a0d495de3e 100644 --- a/src/classes/ActiveRecord/Encryption/NullEncryptor.html +++ b/src/classes/ActiveRecord/Encryption/NullEncryptor.html @@ -82,17 +82,9 @@

    Methods

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -117,17 +109,9 @@

    -

    - - decrypt(encrypted_text, key_provider: nil, cipher_options: {}) - -

    +

    decrypt(encrypted_text, key_provider: nil, cipher_options: {})

    -
    - -
    - @@ -152,17 +136,9 @@

    -

    - - encrypt(clean_text, key_provider: nil, cipher_options: {}) - -

    +

    encrypt(clean_text, key_provider: nil, cipher_options: {})

    -
    - -
    - @@ -187,17 +163,9 @@

    -

    - - encrypted?(text) - -

    +

    encrypted?(text)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Properties.html b/src/classes/ActiveRecord/Encryption/Properties.html index f47f0e4ed9..7ac7e62495 100644 --- a/src/classes/ActiveRecord/Encryption/Properties.html +++ b/src/classes/ActiveRecord/Encryption/Properties.html @@ -124,17 +124,9 @@

    Constants

    Class Public methods

    -

    - - new(initial_properties = {}) - -

    +

    new(initial_properties = {})

    -
    - -
    - @@ -164,19 +156,13 @@

    Instance Public methods

    -

    - - []=(key, value) - -

    +

    []=(key, value)

    - -
    -

    Set a value for a given key

    +
    +

    Set a value for a given key

    It will raise an EncryptedContentIntegrity if the value exists

    -
    - +
    @@ -203,17 +189,9 @@

    -

    - - add(other_properties) - -

    +

    add(other_properties)

    -
    - -
    - @@ -240,17 +218,9 @@

    -

    - - to_h() - -

    +

    to_h()

    -
    - -
    - @@ -275,17 +245,9 @@

    -

    - - validate_value_type(value) - -

    +

    validate_value_type(value)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html b/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html index 1bdf45b333..0d0e7c5910 100644 --- a/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html +++ b/src/classes/ActiveRecord/Encryption/ReadOnlyNullEncryptor.html @@ -84,17 +84,9 @@

    Methods

    Instance Public methods

    -

    - - binary?() - -

    +

    binary?()

    -
    - -
    - @@ -119,17 +111,9 @@

    -

    - - decrypt(encrypted_text, key_provider: nil, cipher_options: {}) - -

    +

    decrypt(encrypted_text, key_provider: nil, cipher_options: {})

    -
    - -
    - @@ -154,17 +138,9 @@

    -

    - - encrypt(clean_text, key_provider: nil, cipher_options: {}) - -

    +

    encrypt(clean_text, key_provider: nil, cipher_options: {})

    -
    - -
    - @@ -189,17 +165,9 @@

    -

    - - encrypted?(text) - -

    +

    encrypted?(text)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Encryption/Scheme.html b/src/classes/ActiveRecord/Encryption/Scheme.html index 4dcc2838ad..085dede5d6 100644 --- a/src/classes/ActiveRecord/Encryption/Scheme.html +++ b/src/classes/ActiveRecord/Encryption/Scheme.html @@ -127,17 +127,9 @@

    Attributes

    Class Public methods

    -

    - - new(key_provider: nil, key: nil, deterministic: nil, support_unencrypted_data: nil, downcase: nil, ignore_case: nil, previous_schemes: nil, compress: true, compressor: nil, **context_properties) - -

    +

    new(key_provider: nil, key: nil, deterministic: nil, support_unencrypted_data: nil, downcase: nil, ignore_case: nil, previous_schemes: nil, compress: true, compressor: nil, **context_properties)

    -
    - -
    - @@ -185,17 +177,9 @@

    Instance Public methods

    -

    - - compatible_with?(other_scheme) - -

    +

    compatible_with?(other_scheme)

    -
    - -
    - @@ -220,17 +204,9 @@

    -

    - - deterministic?() - -

    +

    deterministic?()

    -
    - -
    - @@ -255,17 +231,9 @@

    -

    - - downcase?() - -

    +

    downcase?()

    -
    - -
    - @@ -290,17 +258,9 @@

    -

    - - fixed?() - -

    +

    fixed?()

    -
    - -
    - @@ -326,17 +286,9 @@

    -

    - - ignore_case?() - -

    +

    ignore_case?()

    -
    - -
    - @@ -361,17 +313,9 @@

    -

    - - key_provider() - -

    +

    key_provider()

    -
    - -
    - @@ -396,17 +340,9 @@

    -

    - - merge(other_scheme) - -

    +

    merge(other_scheme)

    -
    - -
    - @@ -431,17 +367,9 @@

    -

    - - support_unencrypted_data?() - -

    +

    support_unencrypted_data?()

    -
    - -
    - @@ -466,17 +394,9 @@

    -

    - - to_h() - -

    +

    to_h()

    -
    - -
    - @@ -502,17 +422,9 @@

    -

    - - with_context(&block) - -

    +

    with_context(&block)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Enum.html b/src/classes/ActiveRecord/Enum.html index df4275e56c..e42d22dde8 100644 --- a/src/classes/ActiveRecord/Enum.html +++ b/src/classes/ActiveRecord/Enum.html @@ -219,17 +219,9 @@

    Methods

    Instance Public methods

    -

    - - enum(name, values = nil, **options) - -

    +

    enum(name, values = nil, **options)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/EnvironmentMismatchError.html b/src/classes/ActiveRecord/EnvironmentMismatchError.html index 0f3c6e7ac7..278d54aaab 100644 --- a/src/classes/ActiveRecord/EnvironmentMismatchError.html +++ b/src/classes/ActiveRecord/EnvironmentMismatchError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(current: nil, stored: nil) - -

    +

    new(current: nil, stored: nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ExplainRegistry/Subscriber.html b/src/classes/ActiveRecord/ExplainRegistry/Subscriber.html index b1d3bea928..edc34fdbb3 100644 --- a/src/classes/ActiveRecord/ExplainRegistry/Subscriber.html +++ b/src/classes/ActiveRecord/ExplainRegistry/Subscriber.html @@ -113,17 +113,9 @@

    Constants

    Class Public methods

    -

    - - ensure_subscribed() - -

    +

    ensure_subscribed()

    -
    - -
    - @@ -158,17 +150,9 @@

    Instance Public methods

    -

    - - finish(name, id, payload) - -

    +

    finish(name, id, payload)

    -
    - -
    - @@ -195,17 +179,9 @@

    -

    - - ignore_payload?(payload) - -

    +

    ignore_payload?(payload)

    -
    - -
    - @@ -233,17 +209,9 @@

    -

    - - silenced?(_name) - -

    +

    silenced?(_name)

    -
    - -
    - @@ -268,17 +236,9 @@

    -

    - - start(name, id, payload) - -

    +

    start(name, id, payload)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/FinderMethods.html b/src/classes/ActiveRecord/FinderMethods.html index e3d1764562..0db3ed78f9 100644 --- a/src/classes/ActiveRecord/FinderMethods.html +++ b/src/classes/ActiveRecord/FinderMethods.html @@ -179,15 +179,10 @@

    Constants

    Instance Public methods

    -

    - - exists?(conditions = :none) - -

    +

    exists?(conditions = :none)

    - -
    -

    Returns true if a record exists in the table that matches the id or conditions given, or false otherwise. The argument can take six forms:

    +
    +

    Returns true if a record exists in the table that matches the id or conditions given, or false otherwise. The argument can take six forms:

    • Integer - Finds the record with this primary key.

    • @@ -215,8 +210,7 @@

      Person.exists? Person.where(name: 'Spartacus', rating: 4).exists? -

    - +
    @@ -264,22 +258,16 @@

    -

    - - fifth() - -

    +

    fifth()

    - -
    -

    Find the fifth record. If no order is defined it will order by primary key.

    +
    +

    Find the fifth record. If no order is defined it will order by primary key.

    Person.fifth # returns the fifth object fetched by SELECT * FROM people
     Person.offset(3).fifth # returns the fifth object from OFFSET 3 (which is OFFSET 7)
     Person.where(["user_name = :u", { u: user_name }]).fifth
     
    -
    - +
    @@ -304,17 +292,11 @@

    -

    - - fifth!() - -

    +

    fifth!()

    - -
    -

    Same as fifth but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as fifth but raises ActiveRecord::RecordNotFound if no record is found.

    +
    @@ -339,15 +321,10 @@

    -

    - - find(*args) - -

    +

    find(*args)

    - -
    -

    Find by id - This can either be a specific id (ID), a list of ids (ID, ID, ID), or an array of ids ([ID, ID, ID]). ‘ID` refers to an “identifier”. For models with a single-column primary key, `ID` will be a single value, and for models with a composite primary key, it will be an array of values. If one or more records cannot be found for the requested ids, then ActiveRecord::RecordNotFound will be raised. If the primary key is an integer, find by id coerces its arguments by using to_i.

    +
    +

    Find by id - This can either be a specific id (ID), a list of ids (ID, ID, ID), or an array of ids ([ID, ID, ID]). ‘ID` refers to an “identifier”. For models with a single-column primary key, `ID` will be a single value, and for models with a composite primary key, it will be an array of values. If one or more records cannot be found for the requested ids, then ActiveRecord::RecordNotFound will be raised. If the primary key is an integer, find by id coerces its arguments by using to_i.

    Person.find(1)          # returns the object for ID = 1
     Person.find("1")        # returns the object for ID = 1
    @@ -432,8 +409,7 @@ 

    Edge Cases

    Person.find([]) # returns an empty array if the argument is an empty array. Person.find # raises ActiveRecord::RecordNotFound exception if the argument is not provided.
    -
    - +
    @@ -459,23 +435,17 @@

    Edge Cases

    -

    - - find_by(arg, *args) - -

    +

    find_by(arg, *args)

    - -
    -

    Finds the first record matching the specified conditions. There is no implied ordering so if order matters, you should specify it yourself.

    +
    +

    Finds the first record matching the specified conditions. There is no implied ordering so if order matters, you should specify it yourself.

    If no record is found, returns nil.

    Post.find_by name: 'Spartacus', rating: 4
     Post.find_by "published_at < ?", 2.weeks.ago
     
    -
    - +
    @@ -500,17 +470,11 @@

    -

    - - find_by!(arg, *args) - -

    +

    find_by!(arg, *args)

    - -
    -

    Like find_by, except that if no record is found, raises an ActiveRecord::RecordNotFound error.

    -
    - +
    +

    Like find_by, except that if no record is found, raises an ActiveRecord::RecordNotFound error.

    +
    @@ -535,20 +499,14 @@

    -

    - - find_sole_by(arg, *args) - -

    +

    find_sole_by(arg, *args)

    - -
    -

    Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no record is found. Raises ActiveRecord::SoleRecordExceeded if more than one record is found.

    +
    +

    Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no record is found. Raises ActiveRecord::SoleRecordExceeded if more than one record is found.

    Product.find_sole_by(["price = %?", price])
     
    -
    - +
    @@ -573,15 +531,10 @@

    -

    - - first(limit = nil) - -

    +

    first(limit = nil)

    - -
    -

    Find the first record (or first N records if a parameter is supplied). If no order is defined it will order by primary key.

    +
    +

    Find the first record (or first N records if a parameter is supplied). If no order is defined it will order by primary key.

    Person.first # returns the first object fetched by SELECT * FROM people ORDER BY people.id LIMIT 1
     Person.where(["user_name = ?", user_name]).first
    @@ -589,8 +542,7 @@ 

    Person.order("created_on DESC").offset(5).first Person.first(3) # returns the first three objects fetched by SELECT * FROM people ORDER BY people.id LIMIT 3

    -
    - +
    @@ -619,17 +571,11 @@

    -

    - - first!() - -

    +

    first!()

    - -
    -

    Same as first but raises ActiveRecord::RecordNotFound if no record is found. Note that first! accepts no arguments.

    -
    - +
    +

    Same as first but raises ActiveRecord::RecordNotFound if no record is found. Note that first! accepts no arguments.

    +
    @@ -654,22 +600,16 @@

    -

    - - forty_two() - -

    +

    forty_two()

    - -
    -

    Find the forty-second record. Also known as accessing “the reddit”. If no order is defined it will order by primary key.

    +
    +

    Find the forty-second record. Also known as accessing “the reddit”. If no order is defined it will order by primary key.

    Person.forty_two # returns the forty-second object fetched by SELECT * FROM people
     Person.offset(3).forty_two # returns the forty-second object from OFFSET 3 (which is OFFSET 44)
     Person.where(["user_name = :u", { u: user_name }]).forty_two
     
    -
    - +
    @@ -694,17 +634,11 @@

    -

    - - forty_two!() - -

    +

    forty_two!()

    - -
    -

    Same as forty_two but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as forty_two but raises ActiveRecord::RecordNotFound if no record is found.

    +
    @@ -729,22 +663,16 @@

    -

    - - fourth() - -

    +

    fourth()

    - -
    -

    Find the fourth record. If no order is defined it will order by primary key.

    +
    +

    Find the fourth record. If no order is defined it will order by primary key.

    Person.fourth # returns the fourth object fetched by SELECT * FROM people
     Person.offset(3).fourth # returns the fourth object from OFFSET 3 (which is OFFSET 6)
     Person.where(["user_name = :u", { u: user_name }]).fourth
     
    -
    - +
    @@ -769,17 +697,11 @@

    -

    - - fourth!() - -

    +

    fourth!()

    - -
    -

    Same as fourth but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as fourth but raises ActiveRecord::RecordNotFound if no record is found.

    +
    @@ -804,24 +726,20 @@

    -

    - - include?(record) - -

    +

    include?(record)

    - -
    -

    Returns true if the relation contains the given record or false otherwise.

    +
    +

    Returns true if the relation contains the given record or false otherwise.

    No query is performed if the relation is loaded; the given record is compared to the records in memory. If the relation is unloaded, an efficient existence query is performed, as in exists?.

    -
    - +
    -
    - Also aliased as: member? -
    +

    + Also aliased as: + + member?. +

    @@ -859,15 +777,10 @@

    -

    - - last(limit = nil) - -

    +

    last(limit = nil)

    - -
    -

    Find the last record (or last N records if a parameter is supplied). If no order is defined it will order by primary key.

    +
    +

    Find the last record (or last N records if a parameter is supplied). If no order is defined it will order by primary key.

    Person.last # returns the last object fetched by SELECT * FROM people
     Person.where(["user_name = ?", user_name]).last
    @@ -884,8 +797,7 @@ 

    [#<Person id:4>, #<Person id:3>, #<Person id:2>]
     
    -

    - +
    @@ -915,17 +827,11 @@

    -

    - - last!() - -

    +

    last!()

    - -
    -

    Same as last but raises ActiveRecord::RecordNotFound if no record is found. Note that last! accepts no arguments.

    -
    - +
    +

    Same as last but raises ActiveRecord::RecordNotFound if no record is found. Note that last! accepts no arguments.

    +
    @@ -950,24 +856,17 @@

    -

    - - member?(record) - -

    +

    member?(record)

    -
    - -
    - -
    - Alias for: include? -
    +

    + Alias for: + include?. +

    @@ -975,22 +874,16 @@

    -

    - - second() - -

    +

    second()

    - -
    -

    Find the second record. If no order is defined it will order by primary key.

    +
    +

    Find the second record. If no order is defined it will order by primary key.

    Person.second # returns the second object fetched by SELECT * FROM people
     Person.offset(3).second # returns the second object from OFFSET 3 (which is OFFSET 4)
     Person.where(["user_name = :u", { u: user_name }]).second
     
    -
    - +
    @@ -1015,17 +908,11 @@

    -

    - - second!() - -

    +

    second!()

    - -
    -

    Same as second but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as second but raises ActiveRecord::RecordNotFound if no record is found.

    +
    @@ -1050,22 +937,16 @@

    -

    - - second_to_last() - -

    +

    second_to_last()

    - -
    -

    Find the second-to-last record. If no order is defined it will order by primary key.

    +
    +

    Find the second-to-last record. If no order is defined it will order by primary key.

    Person.second_to_last # returns the second-to-last object fetched by SELECT * FROM people
     Person.offset(3).second_to_last # returns the second-to-last object from OFFSET 3
     Person.where(["user_name = :u", { u: user_name }]).second_to_last
     
    -
    - +
    @@ -1090,17 +971,11 @@

    -

    - - second_to_last!() - -

    +

    second_to_last!()

    - -
    -

    Same as second_to_last but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as second_to_last but raises ActiveRecord::RecordNotFound if no record is found.

    +
    @@ -1125,20 +1000,14 @@

    -

    - - sole() - -

    +

    sole()

    - -
    -

    Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no record is found. Raises ActiveRecord::SoleRecordExceeded if more than one record is found.

    +
    +

    Finds the sole matching record. Raises ActiveRecord::RecordNotFound if no record is found. Raises ActiveRecord::SoleRecordExceeded if more than one record is found.

    Product.where(["price = %?", price]).sole
     
    -
    - +
    @@ -1171,22 +1040,16 @@

    -

    - - take(limit = nil) - -

    +

    take(limit = nil)

    - -
    -

    Gives a record (or N records if a parameter is supplied) without any implied order. The order will depend on the database implementation. If an order is supplied it will be respected.

    +
    +

    Gives a record (or N records if a parameter is supplied) without any implied order. The order will depend on the database implementation. If an order is supplied it will be respected.

    Person.take # returns an object fetched by SELECT * FROM people LIMIT 1
     Person.take(5) # returns 5 objects fetched by SELECT * FROM people LIMIT 5
     Person.where(["name LIKE '%?'", name]).take
     
    -
    - +
    @@ -1211,17 +1074,11 @@

    -

    - - take!() - -

    +

    take!()

    - -
    -

    Same as take but raises ActiveRecord::RecordNotFound if no record is found. Note that take! accepts no arguments.

    -
    - +
    +

    Same as take but raises ActiveRecord::RecordNotFound if no record is found. Note that take! accepts no arguments.

    +
    @@ -1246,22 +1103,16 @@

    -

    - - third() - -

    +

    third()

    - -
    -

    Find the third record. If no order is defined it will order by primary key.

    +
    +

    Find the third record. If no order is defined it will order by primary key.

    Person.third # returns the third object fetched by SELECT * FROM people
     Person.offset(3).third # returns the third object from OFFSET 3 (which is OFFSET 5)
     Person.where(["user_name = :u", { u: user_name }]).third
     
    -
    - +
    @@ -1286,17 +1137,11 @@

    -

    - - third!() - -

    +

    third!()

    - -
    -

    Same as third but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as third but raises ActiveRecord::RecordNotFound if no record is found.

    +
    @@ -1321,22 +1166,16 @@

    -

    - - third_to_last() - -

    +

    third_to_last()

    - -
    -

    Find the third-to-last record. If no order is defined it will order by primary key.

    +
    +

    Find the third-to-last record. If no order is defined it will order by primary key.

    Person.third_to_last # returns the third-to-last object fetched by SELECT * FROM people
     Person.offset(3).third_to_last # returns the third-to-last object from OFFSET 3
     Person.where(["user_name = :u", { u: user_name }]).third_to_last
     
    -
    - +
    @@ -1361,17 +1200,11 @@

    -

    - - third_to_last!() - -

    +

    third_to_last!()

    - -
    -

    Same as third_to_last but raises ActiveRecord::RecordNotFound if no record is found.

    -
    - +
    +

    Same as third_to_last but raises ActiveRecord::RecordNotFound if no record is found.

    +
    diff --git a/src/classes/ActiveRecord/FixtureSet.html b/src/classes/ActiveRecord/FixtureSet.html index a61370f8df..e7593cdc14 100644 --- a/src/classes/ActiveRecord/FixtureSet.html +++ b/src/classes/ActiveRecord/FixtureSet.html @@ -711,17 +711,9 @@

    Attributes

    Class Public methods

    -

    - - cache_fixtures(connection_pool, fixtures_map) - -

    +

    cache_fixtures(connection_pool, fixtures_map)

    -
    - -
    - @@ -746,17 +738,9 @@

    -

    - - cache_for_connection_pool(connection_pool) - -

    +

    cache_for_connection_pool(connection_pool)

    -
    - -
    - @@ -781,17 +765,9 @@

    -

    - - cached_fixtures(connection_pool, keys_to_fetch = nil) - -

    +

    cached_fixtures(connection_pool, keys_to_fetch = nil)

    -
    - -
    - @@ -820,22 +796,16 @@

    -

    - - composite_identify(label, key) - -

    +

    composite_identify(label, key)

    - -
    -

    Returns a consistent, platform-independent hash representing a mapping between the label and the subcomponents of the provided composite key.

    +
    +

    Returns a consistent, platform-independent hash representing a mapping between the label and the subcomponents of the provided composite key.

    Example:

    composite_identify("label", [:a, :b, :c]) # => { a: hash_1, b: hash_2, c: hash_3 }
     
    -
    - +
    @@ -863,17 +833,11 @@

    -

    - - context_class() - -

    +

    context_class()

    - -
    -

    Superclass for the evaluation contexts used by ERB fixtures.

    -
    - +
    +

    Superclass for the evaluation contexts used by ERB fixtures.

    +
    @@ -898,17 +862,9 @@

    -

    - - create_fixtures(fixtures_directories, fixture_set_names, class_names = {}, config = ActiveRecord::Base) - -

    +

    create_fixtures(fixtures_directories, fixture_set_names, class_names = {}, config = ActiveRecord::Base)

    -
    - -
    - @@ -950,17 +906,9 @@

    -

    - - fixture_is_cached?(connection_pool, table_name) - -

    +

    fixture_is_cached?(connection_pool, table_name)

    -
    - -
    - @@ -985,19 +933,13 @@

    -

    - - identify(label, column_type = :integer) - -

    +

    identify(label, column_type = :integer)

    - -
    -

    Returns a consistent, platform-independent identifier for label.

    +
    +

    Returns a consistent, platform-independent identifier for label.

    Integer identifiers are values less than 2^30. UUIDs are RFC 4122 version 5 SHA-1 hashes.

    -
    - +
    @@ -1026,17 +968,9 @@

    -

    - - instantiate_all_loaded_fixtures(object, load_instances = true) - -

    +

    instantiate_all_loaded_fixtures(object, load_instances = true)

    -
    - -
    - @@ -1063,17 +997,9 @@

    -

    - - instantiate_fixtures(object, fixture_set, load_instances = true) - -

    +

    instantiate_fixtures(object, fixture_set, load_instances = true)

    -
    - -
    - @@ -1103,17 +1029,9 @@

    -

    - - new(_, name, class_name, path, config = ActiveRecord::Base) - -

    +

    new(_, name, class_name, path, config = ActiveRecord::Base)

    -
    - -
    - @@ -1145,17 +1063,9 @@

    -

    - - reset_cache() - -

    +

    reset_cache()

    -
    - -
    - @@ -1184,17 +1094,9 @@

    Instance Public methods

    -

    - - [](x) - -

    +

    [](x)

    -
    - -
    - @@ -1219,17 +1121,9 @@

    -

    - - []=(k, v) - -

    +

    []=(k, v)

    -
    - -
    - @@ -1254,17 +1148,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -1289,17 +1175,9 @@

    -

    - - size() - -

    +

    size()

    -
    - -
    - @@ -1324,17 +1202,11 @@

    -

    - - table_rows() - -

    +

    table_rows()

    - -
    -

    Returns a hash of rows to be inserted. The key is the table, the value is a list of rows to insert to that table.

    -
    - +
    +

    Returns a hash of rows to be inserted. The key is the table, the value is a list of rows to insert to that table.

    +
    diff --git a/src/classes/ActiveRecord/FutureResult/Complete.html b/src/classes/ActiveRecord/FutureResult/Complete.html index 8a269012dc..ec29e8ab1f 100644 --- a/src/classes/ActiveRecord/FutureResult/Complete.html +++ b/src/classes/ActiveRecord/FutureResult/Complete.html @@ -89,17 +89,9 @@

    Attributes

    Class Public methods

    -

    - - new(result) - -

    +

    new(result)

    -
    - -
    - @@ -128,17 +120,9 @@

    Instance Public methods

    -

    - - canceled?() - -

    +

    canceled?()

    -
    - -
    - @@ -163,17 +147,9 @@

    -

    - - pending?() - -

    +

    pending?()

    -
    - -
    - @@ -198,17 +174,9 @@

    -

    - - then(&block) - -

    +

    then(&block)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/FutureResult/EventBuffer.html b/src/classes/ActiveRecord/FutureResult/EventBuffer.html index df9bca3ebf..d1542ee255 100644 --- a/src/classes/ActiveRecord/FutureResult/EventBuffer.html +++ b/src/classes/ActiveRecord/FutureResult/EventBuffer.html @@ -71,17 +71,9 @@

    Methods

    Class Public methods

    -

    - - new(future_result, instrumenter) - -

    +

    new(future_result, instrumenter)

    -
    - -
    - @@ -112,17 +104,9 @@

    Instance Public methods

    -

    - - flush() - -

    +

    flush()

    -
    - -
    - @@ -151,17 +135,9 @@

    -

    - - instrument(name, payload = {}, &block) - -

    +

    instrument(name, payload = {}, &block)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Inheritance.html b/src/classes/ActiveRecord/Inheritance.html index 876d63f0a4..c3d37d3717 100644 --- a/src/classes/ActiveRecord/Inheritance.html +++ b/src/classes/ActiveRecord/Inheritance.html @@ -101,17 +101,9 @@

    Methods

    Instance Public methods

    -

    - - initialize_dup(other) - -

    +

    initialize_dup(other)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Inheritance/ClassMethods.html b/src/classes/ActiveRecord/Inheritance/ClassMethods.html index 86a0910a2c..c212ae58d2 100644 --- a/src/classes/ActiveRecord/Inheritance/ClassMethods.html +++ b/src/classes/ActiveRecord/Inheritance/ClassMethods.html @@ -165,17 +165,11 @@

    Attributes

    Instance Public methods

    -

    - - abstract_class?() - -

    +

    abstract_class?()

    - -
    -

    Returns whether this class is an abstract class or not.

    -
    - +
    +

    Returns whether this class is an abstract class or not.

    +
    @@ -200,17 +194,11 @@

    -

    - - base_class?() - -

    +

    base_class?()

    - -
    -

    Returns whether the class is a base class. See base_class for more information.

    -
    - +
    +

    Returns whether the class is a base class. See base_class for more information.

    +
    @@ -235,17 +223,11 @@

    -

    - - descends_from_active_record?() - -

    +

    descends_from_active_record?()

    - -
    -

    Returns true if this does not need STI type condition. Returns false if STI type condition needs to be applied.

    -
    - +
    +

    Returns true if this does not need STI type condition. Returns false if STI type condition needs to be applied.

    +
    @@ -276,17 +258,11 @@

    -

    - - new(attributes = nil, &block) - -

    +

    new(attributes = nil, &block)

    - -
    -

    Determines if one of the attributes passed in is the inheritance column, and if the inheritance column is attr accessible, it initializes an instance of the given subclass instead of the base class.

    -
    - +
    +

    Determines if one of the attributes passed in is the inheritance column, and if the inheritance column is attr accessible, it initializes an instance of the given subclass instead of the base class.

    +
    @@ -331,19 +307,13 @@

    -

    - - polymorphic_class_for(name) - -

    +

    polymorphic_class_for(name)

    - -
    -

    Returns the class for the provided name.

    +
    +

    Returns the class for the provided name.

    It is used to find the class correspondent to the value stored in the polymorphic type column.

    -
    - +
    @@ -372,17 +342,11 @@

    -

    - - polymorphic_name() - -

    +

    polymorphic_name()

    - -
    -

    Returns the value to be stored in the polymorphic type column for Polymorphic Associations.

    -
    - +
    +

    Returns the value to be stored in the polymorphic type column for Polymorphic Associations.

    +
    @@ -407,19 +371,13 @@

    -

    - - primary_abstract_class() - -

    +

    primary_abstract_class()

    - -
    -

    Sets the application record class for Active Record

    +
    +

    Sets the application record class for Active Record

    This is useful if your application uses a different class than ApplicationRecord for your primary abstract class. This class will share a database connection with Active Record. It is the class that connects to your primary database.

    -
    - +
    @@ -449,19 +407,13 @@

    -

    - - sti_class_for(type_name) - -

    +

    sti_class_for(type_name)

    - -
    -

    Returns the class for the provided type_name.

    +
    +

    Returns the class for the provided type_name.

    It is used to find the class correspondent to the value stored in the inheritance column.

    -
    - +
    @@ -498,17 +450,11 @@

    -

    - - sti_name() - -

    +

    sti_name()

    - -
    -

    Returns the value to be stored in the inheritance column for STI.

    -
    - +
    +

    Returns the value to be stored in the inheritance column for STI.

    +
    @@ -536,17 +482,11 @@

    Instance Protected methods

    -

    - - compute_type(type_name) - -

    +

    compute_type(type_name)

    - -
    -

    Returns the class type of the record using the current module as a prefix. So descendants of MyApp::Business::Account would appear as MyApp::Business::AccountSubclass.

    -
    - +
    +

    Returns the class type of the record using the current module as a prefix. So descendants of MyApp::Business::Account would appear as MyApp::Business::AccountSubclass.

    +
    diff --git a/src/classes/ActiveRecord/Integration.html b/src/classes/ActiveRecord/Integration.html index e5aed1e51c..2512e74a4f 100644 --- a/src/classes/ActiveRecord/Integration.html +++ b/src/classes/ActiveRecord/Integration.html @@ -94,19 +94,13 @@

    Methods

    Class Public methods

    -

    - - cache_timestamp_format - -

    +

    cache_timestamp_format

    - -
    -

    Indicates the format used to generate the timestamp in the cache key, if versioning is off. Accepts any of the symbols in Time::DATE_FORMATS.

    +
    +

    Indicates the format used to generate the timestamp in the cache key, if versioning is off. Accepts any of the symbols in Time::DATE_FORMATS.

    This is :usec, by default.

    -
    - +
    @@ -130,19 +124,13 @@

    -

    - - cache_versioning - -

    +

    cache_versioning

    - -
    -

    Indicates whether to use a stable cache_key method that is accompanied by a changing version in the cache_version method.

    +
    +

    Indicates whether to use a stable cache_key method that is accompanied by a changing version in the cache_version method.

    This is true, by default on Rails 5.2 and above.

    -
    - +
    @@ -166,19 +154,13 @@

    -

    - - collection_cache_versioning - -

    +

    collection_cache_versioning

    - -
    -

    Indicates whether to use a stable cache_key method that is accompanied by a changing version in the cache_version method on collections.

    +
    +

    Indicates whether to use a stable cache_key method that is accompanied by a changing version in the cache_version method on collections.

    This is false, by default until Rails 6.1.

    -
    - +
    @@ -206,15 +188,10 @@

    Instance Public methods

    -

    - - cache_key() - -

    +

    cache_key()

    - -
    -

    Returns a stable cache key that can be used to identify this record.

    +
    +

    Returns a stable cache key that can be used to identify this record.

    Product.new.cache_key     # => "products/new"
     Product.find(5).cache_key # => "products/5"
    @@ -225,8 +202,7 @@ 

    Product.cache_versioning = false
     Product.find(5).cache_key  # => "products/5-20071224150000" (updated_at available)
     
    -

    - +
    @@ -266,17 +242,11 @@

    -

    - - cache_key_with_version() - -

    +

    cache_key_with_version()

    - -
    -

    Returns a cache key along with the version.

    -
    - +
    +

    Returns a cache key along with the version.

    +
    @@ -305,19 +275,13 @@

    -

    - - cache_version() - -

    +

    cache_version()

    - -
    -

    Returns a cache version that can be used together with the cache key to form a recyclable caching scheme. By default, the updated_at column is used for the cache_version, but this method can be overwritten to return something else.

    +
    +

    Returns a cache version that can be used together with the cache key to form a recyclable caching scheme. By default, the updated_at column is used for the cache_version, but this method can be overwritten to return something else.

    Note, this method will return nil if ActiveRecord::Base.cache_versioning is set to false.

    -
    - +
    @@ -354,15 +318,10 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Returns a String, which Action Pack uses for constructing a URL to this object. The default implementation returns this record’s id as a String, or nil if this record’s unsaved.

    +
    +

    Returns a String, which Action Pack uses for constructing a URL to this object. The default implementation returns this record’s id as a String, or nil if this record’s unsaved.

    For example, suppose that you have a User model, and that you have a resources :users route. Normally, user_path will construct a path with the user object’s ‘id’ in it:

    @@ -381,8 +340,7 @@

    user = User.find_by(name: 'Phusion') user_path(user) # => "/users/Phusion" -

    - +
    diff --git a/src/classes/ActiveRecord/Integration/ClassMethods.html b/src/classes/ActiveRecord/Integration/ClassMethods.html index 4eb82a53f0..7ec47d7c80 100644 --- a/src/classes/ActiveRecord/Integration/ClassMethods.html +++ b/src/classes/ActiveRecord/Integration/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - to_param(method_name = nil) - -

    +

    to_param(method_name = nil)

    - -
    -

    Defines your model’s to_param method to generate “pretty” URLs using method_name, which can be any attribute or method that responds to to_s.

    +
    +

    Defines your model’s to_param method to generate “pretty” URLs using method_name, which can be any attribute or method that responds to to_s.

    class User < ActiveRecord::Base
       to_param :name
    @@ -89,8 +84,7 @@ 

    params[:id]               # => "123-fancy-pants"
     User.find(params[:id]).id # => 123
     
    -

    - +
    diff --git a/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html b/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html index 8496cae006..f088d77af1 100644 --- a/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html +++ b/src/classes/ActiveRecord/Locking/Optimistic/ClassMethods.html @@ -97,17 +97,11 @@

    Attributes

    Instance Public methods

    -

    - - locking_column=(value) - -

    +

    locking_column=(value)

    - -
    -

    Set the column to use for optimistic locking. Defaults to lock_version.

    -
    - +
    +

    Set the column to use for optimistic locking. Defaults to lock_version.

    +
    @@ -133,17 +127,11 @@

    -

    - - locking_enabled?() - -

    +

    locking_enabled?()

    - -
    -

    Returns true if the lock_optimistically flag is set to true (which it is, by default) and the table includes the locking_column column (defaults to lock_version).

    -
    - +
    +

    Returns true if the lock_optimistically flag is set to true (which it is, by default) and the table includes the locking_column column (defaults to lock_version).

    +
    @@ -168,17 +156,11 @@

    -

    - - reset_locking_column() - -

    +

    reset_locking_column()

    - -
    -

    Reset the column used for optimistic locking back to the lock_version default.

    -
    - +
    +

    Reset the column used for optimistic locking back to the lock_version default.

    +
    @@ -203,17 +185,11 @@

    -

    - - update_counters(id, counters) - -

    +

    update_counters(id, counters)

    - -
    -

    Make sure the lock version column gets updated when counters are updated.

    -
    - +
    +

    Make sure the lock version column gets updated when counters are updated.

    +
    diff --git a/src/classes/ActiveRecord/Locking/Pessimistic.html b/src/classes/ActiveRecord/Locking/Pessimistic.html index 91b610240b..b38c01be14 100644 --- a/src/classes/ActiveRecord/Locking/Pessimistic.html +++ b/src/classes/ActiveRecord/Locking/Pessimistic.html @@ -126,17 +126,11 @@

    Methods

    Instance Public methods

    -

    - - lock!(lock = true) - -

    +

    lock!(lock = true)

    - -
    -

    Obtain a row lock on this record. Reloads the record to obtain the requested lock. Pass an SQL locking clause to append the end of the SELECT statement or pass true for “FOR UPDATE” (the default, an exclusive row lock). Returns the locked record.

    -
    - +
    +

    Obtain a row lock on this record. Reloads the record to obtain the requested lock. Pass an SQL locking clause to append the end of the SELECT statement or pass true for “FOR UPDATE” (the default, an exclusive row lock). Returns the locked record.

    +
    @@ -178,19 +172,13 @@

    -

    - - with_lock(*args) - -

    +

    with_lock(*args)

    - -
    -

    Wraps the passed block in a transaction, reloading the object with a lock before yielding. You can pass the SQL locking clause as an optional argument (see lock!).

    +
    +

    Wraps the passed block in a transaction, reloading the object with a lock before yielding. You can pass the SQL locking clause as an optional argument (see lock!).

    You can also pass options like requires_new:, isolation:, and joinable: to the wrapping transaction (see ActiveRecord::ConnectionAdapters::DatabaseStatements#transaction).

    -
    - +
    diff --git a/src/classes/ActiveRecord/Marshalling.html b/src/classes/ActiveRecord/Marshalling.html index a91fdee26b..4f3454f4d1 100644 --- a/src/classes/ActiveRecord/Marshalling.html +++ b/src/classes/ActiveRecord/Marshalling.html @@ -84,17 +84,9 @@

    Attributes

    Class Public methods

    -

    - - format_version=(version) - -

    +

    format_version=(version)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Marshalling/Methods.html b/src/classes/ActiveRecord/Marshalling/Methods.html index fa8ff2b58e..b376913ebb 100644 --- a/src/classes/ActiveRecord/Marshalling/Methods.html +++ b/src/classes/ActiveRecord/Marshalling/Methods.html @@ -62,17 +62,9 @@

    Methods

    Instance Public methods

    -

    - - _marshal_dump_7_1() - -

    +

    _marshal_dump_7_1()

    -
    - -
    - @@ -112,17 +104,9 @@

    -

    - - marshal_load(state) - -

    +

    marshal_load(state)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/MessagePack/Decoder.html b/src/classes/ActiveRecord/MessagePack/Decoder.html index 8cf4ae126d..8afe9fccfc 100644 --- a/src/classes/ActiveRecord/MessagePack/Decoder.html +++ b/src/classes/ActiveRecord/MessagePack/Decoder.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(entries) - -

    +

    new(entries)

    -
    - -
    - @@ -115,17 +107,9 @@

    Instance Public methods

    -

    - - build_record(entry) - -

    +

    build_record(entry)

    -
    - -
    - @@ -153,17 +137,9 @@

    -

    - - decode(ref) - -

    +

    decode(ref)

    -
    - -
    - @@ -192,17 +168,9 @@

    -

    - - resolve_cached_associations(record, entry) - -

    +

    resolve_cached_associations(record, entry)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/MessagePack/Encoder.html b/src/classes/ActiveRecord/MessagePack/Encoder.html index 2c6d3796a0..d05c5cd3d7 100644 --- a/src/classes/ActiveRecord/MessagePack/Encoder.html +++ b/src/classes/ActiveRecord/MessagePack/Encoder.html @@ -93,17 +93,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -133,17 +125,9 @@

    Instance Public methods

    -

    - - add_cached_associations(record, entry) - -

    +

    add_cached_associations(record, entry)

    -
    - -
    - @@ -172,17 +156,9 @@

    -

    - - build_entry(record) - -

    +

    build_entry(record)

    -
    - -
    - @@ -211,17 +187,9 @@

    -

    - - encode(input) - -

    +

    encode(input)

    -
    - -
    - @@ -250,17 +218,9 @@

    -

    - - encode_record(record) - -

    +

    encode_record(record)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/MessagePack/Extensions.html b/src/classes/ActiveRecord/MessagePack/Extensions.html index 1db73ba0c5..4f5185b388 100644 --- a/src/classes/ActiveRecord/MessagePack/Extensions.html +++ b/src/classes/ActiveRecord/MessagePack/Extensions.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - install(registry) - -

    +

    install(registry)

    -
    - -
    - @@ -108,17 +100,9 @@

    -

    - - read_record(unpacker) - -

    +

    read_record(unpacker)

    -
    - -
    - @@ -143,17 +127,9 @@

    -

    - - write_record(record, packer) - -

    +

    write_record(record, packer)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Middleware/DatabaseSelector.html b/src/classes/ActiveRecord/Middleware/DatabaseSelector.html index 78d27994c7..ad95da05a8 100644 --- a/src/classes/ActiveRecord/Middleware/DatabaseSelector.html +++ b/src/classes/ActiveRecord/Middleware/DatabaseSelector.html @@ -138,17 +138,9 @@

    Attributes

    Class Public methods

    -

    - - new(app, resolver_klass = nil, context_klass = nil, options = {}) - -

    +

    new(app, resolver_klass = nil, context_klass = nil, options = {})

    -
    - -
    - @@ -180,17 +172,11 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    - -
    -

    Middleware that determines which database connection to use in a multiple database application.

    -
    - +
    +

    Middleware that determines which database connection to use in a multiple database application.

    +
    diff --git a/src/classes/ActiveRecord/Middleware/ShardSelector.html b/src/classes/ActiveRecord/Middleware/ShardSelector.html index 29d1305614..58c9cb584f 100644 --- a/src/classes/ActiveRecord/Middleware/ShardSelector.html +++ b/src/classes/ActiveRecord/Middleware/ShardSelector.html @@ -124,17 +124,9 @@

    Attributes

    Class Public methods

    -

    - - new(app, resolver, options = {}) - -

    +

    new(app, resolver, options = {})

    -
    - -
    - @@ -165,17 +157,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Migration.html b/src/classes/ActiveRecord/Migration.html index 6aa13130cd..a37865cba3 100644 --- a/src/classes/ActiveRecord/Migration.html +++ b/src/classes/ActiveRecord/Migration.html @@ -513,17 +513,9 @@

    Attributes

    Class Public methods

    -

    - - [](version) - -

    +

    [](version)

    -
    - -
    - @@ -548,17 +540,11 @@

    -

    - - check_all_pending!() - -

    +

    check_all_pending!()

    - -
    -

    Raises ActiveRecord::PendingMigrationError error if any migrations are pending for all database configurations in an environment.

    -
    - +
    +

    Raises ActiveRecord::PendingMigrationError error if any migrations are pending for all database configurations in an environment.

    +
    @@ -595,17 +581,9 @@

    -

    - - current_version() - -

    +

    current_version()

    -
    - -
    - @@ -630,19 +608,13 @@

    -

    - - disable_ddl_transaction!() - -

    +

    disable_ddl_transaction!()

    - -
    -

    Disable the transaction wrapping this migration. You can still create your own transactions even after calling disable_ddl_transaction!

    +
    +

    Disable the transaction wrapping this migration. You can still create your own transactions even after calling disable_ddl_transaction!

    For more details read the “Transactional Migrations” section above.

    -
    - +
    @@ -667,17 +639,9 @@

    -

    - - load_schema_if_pending!() - -

    +

    load_schema_if_pending!()

    -
    - -
    - @@ -706,17 +670,9 @@

    -

    - - migrate(direction) - -

    +

    migrate(direction)

    -
    - -
    - @@ -741,17 +697,9 @@

    -

    - - new(name = self.class.name, version = nil) - -

    +

    new(name = self.class.name, version = nil)

    -
    - -
    - @@ -779,17 +727,11 @@

    -

    - - verbose - -

    +

    verbose

    - -
    -

    Specifies if migrations will write the actions they are taking to the console as they happen, along with benchmarks describing how long each step took. Defaults to true.

    -
    - +
    +

    Specifies if migrations will write the actions they are taking to the console as they happen, along with benchmarks describing how long each step took. Defaults to true.

    +
    @@ -817,17 +759,9 @@

    Instance Public methods

    -

    - - announce(message) - -

    +

    announce(message)

    -
    - -
    - @@ -854,17 +788,9 @@

    -

    - - connection() - -

    +

    connection()

    -
    - -
    - @@ -889,17 +815,9 @@

    -

    - - connection_pool() - -

    +

    connection_pool()

    -
    - -
    - @@ -924,17 +842,9 @@

    -

    - - copy(destination, sources, options = {}) - -

    +

    copy(destination, sources, options = {})

    -
    - -
    - @@ -1010,17 +920,9 @@

    -

    - - down() - -

    +

    down()

    -
    - -
    - @@ -1047,17 +949,9 @@

    -

    - - exec_migration(conn, direction) - -

    +

    exec_migration(conn, direction)

    -
    - -
    - @@ -1094,17 +988,9 @@

    -

    - - execution_strategy() - -

    +

    execution_strategy()

    -
    - -
    - @@ -1129,17 +1015,9 @@

    -

    - - method_missing(method, *arguments, &block) - -

    +

    method_missing(method, *arguments, &block)

    -
    - -
    - @@ -1176,17 +1054,11 @@

    -

    - - migrate(direction) - -

    +

    migrate(direction)

    - -
    -

    Execute this migration in the named direction

    -
    - +
    +

    Execute this migration in the named direction

    +
    @@ -1228,17 +1100,11 @@

    -

    - - next_migration_number(number) - -

    +

    next_migration_number(number)

    - -
    -

    Determines the version number of the next migration.

    -
    - +
    +

    Determines the version number of the next migration.

    +
    @@ -1267,17 +1133,11 @@

    -

    - - proper_table_name(name, options = {}) - -

    +

    proper_table_name(name, options = {})

    - -
    -

    Finds the correct table name given an Active Record object. Uses the Active Record object’s own table_name, or pre/suffix from the options passed in.

    -
    - +
    +

    Finds the correct table name given an Active Record object. Uses the Active Record object’s own table_name, or pre/suffix from the options passed in.

    +
    @@ -1306,15 +1166,10 @@

    -

    - - reversible() - -

    +

    reversible()

    - -
    -

    Used to specify an operation that can be run in one direction or another. Call the methods up and down of the yielded object to run a block only in one given direction. The whole block will be called in the right order within the migration.

    +
    +

    Used to specify an operation that can be run in one direction or another. Call the methods up and down of the yielded object to run a block only in one given direction. The whole block will be called in the right order within the migration.

    In the following example, the looping on users will always be done when the three columns ‘first_name’, ‘last_name’ and ‘full_name’ exist, even when migrating down:

    @@ -1336,8 +1191,7 @@

    end end -

    - +
    @@ -1363,15 +1217,10 @@

    -

    - - revert(*migration_classes, &block) - -

    +

    revert(*migration_classes, &block)

    - -
    -

    Reverses the migration commands for the given block and the given migrations.

    +
    +

    Reverses the migration commands for the given block and the given migrations.

    The following migration will remove the table ‘horses’ and create the table ‘apples’ on the way up, and the reverse on the way down.

    @@ -1406,8 +1255,7 @@

    This command can be nested.

    -

    - +
    @@ -1445,17 +1293,9 @@

    -

    - - reverting?() - -

    +

    reverting?()

    -
    - -
    - @@ -1480,22 +1320,16 @@

    -

    - - run(*migration_classes) - -

    +

    run(*migration_classes)

    - -
    -

    Runs the given migration classes. Last argument can specify options:

    +
    +

    Runs the given migration classes. Last argument can specify options:

    • :direction - Default is :up.

    • :revert - Default is false.

    -
    - +
    @@ -1530,17 +1364,11 @@

    -

    - - say(message, subitem = false) - -

    +

    say(message, subitem = false)

    - -
    -

    Takes a message argument and outputs it as is. A second boolean argument can be passed to specify whether to indent or not.

    -
    - +
    +

    Takes a message argument and outputs it as is. A second boolean argument can be passed to specify whether to indent or not.

    +
    @@ -1565,17 +1393,11 @@

    -

    - - say_with_time(message) - -

    +

    say_with_time(message)

    - -
    -

    Outputs text along with how long it took to run its block. If the block returns an integer it assumes it is the number of rows affected.

    -
    - +
    +

    Outputs text along with how long it took to run its block. If the block returns an integer it assumes it is the number of rows affected.

    +
    @@ -1605,17 +1427,11 @@

    -

    - - suppress_messages() - -

    +

    suppress_messages()

    - -
    -

    Takes a block as an argument and suppresses any output generated by the block.

    -
    - +
    +

    Takes a block as an argument and suppresses any output generated by the block.

    +
    @@ -1643,17 +1459,9 @@

    -

    - - up() - -

    +

    up()

    -
    - -
    - @@ -1680,15 +1488,10 @@

    -

    - - up_only(&block) - -

    +

    up_only(&block)

    - -
    -

    Used to specify an operation that is only run when migrating up (for example, populating a new column with its initial values).

    +
    +

    Used to specify an operation that is only run when migrating up (for example, populating a new column with its initial values).

    In the following example, the new column published will be given the value true for all existing records.

    @@ -1701,8 +1504,7 @@

    end end -

    - +
    @@ -1727,17 +1529,9 @@

    -

    - - write(text = "") - -

    +

    write(text = "")

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Migration/CheckPending.html b/src/classes/ActiveRecord/Migration/CheckPending.html index 886075a286..098f3e414d 100644 --- a/src/classes/ActiveRecord/Migration/CheckPending.html +++ b/src/classes/ActiveRecord/Migration/CheckPending.html @@ -73,17 +73,9 @@

    Methods

    Class Public methods

    -

    - - new(app, file_watcher: ActiveSupport::FileUpdateChecker) - -

    +

    new(app, file_watcher: ActiveSupport::FileUpdateChecker)

    -
    - -
    - @@ -115,17 +107,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Migration/CommandRecorder.html b/src/classes/ActiveRecord/Migration/CommandRecorder.html index 4d0c67f137..b755b60e5c 100644 --- a/src/classes/ActiveRecord/Migration/CommandRecorder.html +++ b/src/classes/ActiveRecord/Migration/CommandRecorder.html @@ -222,17 +222,9 @@

    Attributes

    Class Public methods

    -

    - - new(delegate = nil) - -

    +

    new(delegate = nil)

    -
    - -
    - @@ -263,15 +255,10 @@

    Instance Public methods

    -

    - - inverse_of(command, args, &block) - -

    +

    inverse_of(command, args, &block)

    - -
    -

    Returns the inverse of the given command. For example:

    +
    +

    Returns the inverse of the given command. For example:

    recorder.inverse_of(:rename_table, [:old, :new])
     # => [:rename_table, [:new, :old]]
    @@ -284,8 +271,7 @@ 

    This method will raise an IrreversibleMigration exception if it cannot invert the command.

    -
    - +
    @@ -317,20 +303,14 @@

    -

    - - record(*command, &block) - -

    +

    record(*command, &block)

    - -
    -

    Record command. command should be a method name and arguments. For example:

    +
    +

    Record command. command should be a method name and arguments. For example:

    recorder.record(:method_name, [:arg1, :arg2])
     
    -
    - +
    @@ -359,17 +339,9 @@

    -

    - - replay(migration) - -

    +

    replay(migration)

    -
    - -
    - @@ -396,21 +368,15 @@

    -

    - - revert() - -

    +

    revert()

    - -
    -

    While executing the given block, the recorded will be in reverting mode. All commands recorded will end up being recorded reverted and in reverse order. For example:

    +
    +

    While executing the given block, the recorded will be in reverting mode. All commands recorded will end up being recorded reverted and in reverse order. For example:

    recorder.revert{ recorder.record(:rename_table, [:old, :new]) }
     # same effect as recorder.record(:rename_table, [:new, :old])
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/MigrationContext.html b/src/classes/ActiveRecord/MigrationContext.html index 98444ca062..a8f1732760 100644 --- a/src/classes/ActiveRecord/MigrationContext.html +++ b/src/classes/ActiveRecord/MigrationContext.html @@ -107,17 +107,9 @@

    Attributes

    Class Public methods

    -

    - - new(migrations_paths, schema_migration = nil, internal_metadata = nil) - -

    +

    new(migrations_paths, schema_migration = nil, internal_metadata = nil)

    -
    - -
    - @@ -148,15 +140,10 @@

    Instance Public methods

    -

    - - migrate(target_version = nil, &block) - -

    +

    migrate(target_version = nil, &block)

    - -
    -

    Runs the migrations in the migrations_path.

    +
    +

    Runs the migrations in the migrations_path.

    If target_version is nil, migrate will run up.

    @@ -165,8 +152,7 @@

    If the current_version in the schema is greater than the target_version, then down will be run.

    If none of the conditions are met, up will be run with the target_version.

    -

    - +
    diff --git a/src/classes/ActiveRecord/MismatchedForeignKey.html b/src/classes/ActiveRecord/MismatchedForeignKey.html index 32df7992aa..e5992631c1 100644 --- a/src/classes/ActiveRecord/MismatchedForeignKey.html +++ b/src/classes/ActiveRecord/MismatchedForeignKey.html @@ -73,17 +73,9 @@

    Methods

    Class Public methods

    -

    - - new( message: nil, sql: nil, binds: nil, table: nil, foreign_key: nil, target_table: nil, primary_key: nil, primary_key_column: nil, query_parser: nil, connection_pool: nil ) - -

    +

    new( message: nil, sql: nil, binds: nil, table: nil, foreign_key: nil, target_table: nil, primary_key: nil, primary_key_column: nil, query_parser: nil, connection_pool: nil )

    -
    - -
    - @@ -144,17 +136,9 @@

    Instance Public methods

    -

    - - set_query(sql, binds) - -

    +

    set_query(sql, binds)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/ModelSchema.html b/src/classes/ActiveRecord/ModelSchema.html index 75cfd24ae4..d92e4392cf 100644 --- a/src/classes/ActiveRecord/ModelSchema.html +++ b/src/classes/ActiveRecord/ModelSchema.html @@ -138,18 +138,12 @@

    Methods

    Class Public methods

    -

    - - immutable_strings_by_default=(bool) - - -

    +

    immutable_strings_by_default=(bool) +

    - -
    -

    Determines whether columns should infer their type as :string or :immutable_string. This setting does not affect the behavior of attribute :foo, :string. Defaults to false.

    -
    - +
    +

    Determines whether columns should infer their type as :string or :immutable_string. This setting does not affect the behavior of attribute :foo, :string. Defaults to false.

    +
    @@ -162,18 +156,12 @@

    -

    - - implicit_order_column +

    implicit_order_column +

    - - - - -
    -

    The name of the column(s) records are ordered by if no explicit order clause is used during an ordered finder call. If not set the primary key is used.

    -
    - +
    +

    The name of the column(s) records are ordered by if no explicit order clause is used during an ordered finder call. If not set the primary key is used.

    +
    @@ -186,20 +174,14 @@

    -

    - - implicit_order_column=(column_name) +

    implicit_order_column=(column_name) +

    - - - - -
    -

    Sets the column(s) to sort records by when no explicit order clause is used during an ordered finder call. Useful for models where the primary key isn’t an auto-incrementing integer (such as UUID).

    +
    +

    Sets the column(s) to sort records by when no explicit order clause is used during an ordered finder call. Useful for models where the primary key isn’t an auto-incrementing integer (such as UUID).

    By default, records are subsorted by primary key to ensure deterministic results. To disable this subsort behavior, set ‘implicit_order_column` to `[“column_name”, nil]`.

    -
    - +
    @@ -212,16 +194,11 @@

    -

    - - inheritance_column +

    inheritance_column +

    - - - - -
    -

    The name of the table column which stores the class name on single-table inheritance situations.

    +
    +

    The name of the table column which stores the class name on single-table inheritance situations.

    The default inheritance column name is type, which means it’s a reserved word inside Active Record. To be able to use single-table inheritance with another column name, or to use the column type in your own model for something else, you can set inheritance_column:

    @@ -232,8 +209,7 @@

    self.inheritance_column = nil
     
    -

    - +
    @@ -246,18 +222,12 @@

    -

    - - inheritance_column=(column) - - -

    +

    inheritance_column=(column) +

    - -
    -

    Defines the name of the table column which will store the class name on single-table inheritance situations.

    -
    - +
    +

    Defines the name of the table column which will store the class name on single-table inheritance situations.

    +
    @@ -305,18 +275,12 @@

    -

    - - internal_metadata_table_name +

    internal_metadata_table_name +

    - - - - -
    -

    The name of the internal metadata table. By default, the value is "ar_internal_metadata".

    -
    - +
    +

    The name of the internal metadata table. By default, the value is "ar_internal_metadata".

    +
    @@ -329,18 +293,12 @@

    -

    - - internal_metadata_table_name=(table_name) +

    internal_metadata_table_name=(table_name) +

    - - - - -
    -

    Sets the name of the internal metadata table.

    -
    - +
    +

    Sets the name of the internal metadata table.

    +
    @@ -353,18 +311,12 @@

    -

    - - pluralize_table_names - - -

    +

    pluralize_table_names +

    - -
    -

    Indicates whether table names should be the pluralized versions of the corresponding class names. If true, the default table name for a Product class will be “products”. If false, it would just be “product”. See table_name for the full rules on table/class naming. This is true, by default.

    -
    - +
    +

    Indicates whether table names should be the pluralized versions of the corresponding class names. If true, the default table name for a Product class will be “products”. If false, it would just be “product”. See table_name for the full rules on table/class naming. This is true, by default.

    +
    @@ -377,18 +329,12 @@

    -

    - - pluralize_table_names=(value) - - -

    +

    pluralize_table_names=(value) +

    - -
    -

    Set whether table names should be the pluralized versions of the corresponding class names. If true, the default table name for a Product class will be “products”. If false, it would just be “product”. See table_name for the full rules on table/class naming. This is true, by default.

    -
    - +
    +

    Set whether table names should be the pluralized versions of the corresponding class names. If true, the default table name for a Product class will be “products”. If false, it would just be “product”. See table_name for the full rules on table/class naming. This is true, by default.

    +
    @@ -401,18 +347,12 @@

    -

    - - primary_key_prefix_type - - -

    +

    primary_key_prefix_type +

    - -
    -

    The prefix type that will be prepended to every primary key column name. The options are :table_name and :table_name_with_underscore. If the first is specified, the Product class will look for “productid” instead of “id” as the primary column. If the latter is specified, the Product class will look for “product_id” instead of “id”. Remember that this is a global setting for all Active Records.

    -
    - +
    +

    The prefix type that will be prepended to every primary key column name. The options are :table_name and :table_name_with_underscore. If the first is specified, the Product class will look for “productid” instead of “id” as the primary column. If the latter is specified, the Product class will look for “product_id” instead of “id”. Remember that this is a global setting for all Active Records.

    +
    @@ -425,18 +365,12 @@

    -

    - - primary_key_prefix_type=(prefix_type) +

    primary_key_prefix_type=(prefix_type) +

    - - - - -
    -

    Sets the prefix type that will be prepended to every primary key column name. The options are :table_name and :table_name_with_underscore. If the first is specified, the Product class will look for “productid” instead of “id” as the primary column. If the latter is specified, the Product class will look for “product_id” instead of “id”. Remember that this is a global setting for all Active Records.

    -
    - +
    +

    Sets the prefix type that will be prepended to every primary key column name. The options are :table_name and :table_name_with_underscore. If the first is specified, the Product class will look for “productid” instead of “id” as the primary column. If the latter is specified, the Product class will look for “product_id” instead of “id”. Remember that this is a global setting for all Active Records.

    +
    @@ -449,18 +383,12 @@

    -

    - - schema_migrations_table_name +

    schema_migrations_table_name +

    - - - - -
    -

    The name of the schema migrations table. By default, the value is "schema_migrations".

    -
    - +
    +

    The name of the schema migrations table. By default, the value is "schema_migrations".

    +
    @@ -473,18 +401,12 @@

    -

    - - schema_migrations_table_name=(table_name) - - -

    +

    schema_migrations_table_name=(table_name) +

    - -
    -

    Sets the name of the schema migrations table.

    -
    - +
    +

    Sets the name of the schema migrations table.

    +
    @@ -497,18 +419,12 @@

    -

    - - table_name_prefix - - -

    +

    table_name_prefix +

    - -
    -

    The prefix string to prepend to every table name.

    -
    - +
    +

    The prefix string to prepend to every table name.

    +
    @@ -521,20 +437,14 @@

    -

    - - table_name_prefix=(prefix) +

    table_name_prefix=(prefix) +

    - - - - -
    -

    Sets the prefix string to prepend to every table name. So if set to “basecamp_”, all table names will be named like “basecamp_projects”, “basecamp_people”, etc. This is a convenient way of creating a namespace for tables in a shared database. By default, the prefix is the empty string.

    +
    +

    Sets the prefix string to prepend to every table name. So if set to “basecamp_”, all table names will be named like “basecamp_projects”, “basecamp_people”, etc. This is a convenient way of creating a namespace for tables in a shared database. By default, the prefix is the empty string.

    If you are organizing your models within modules you can add a prefix to the models within a namespace by defining a singleton method in the parent module called table_name_prefix which returns your chosen prefix.

    -
    - +
    @@ -547,18 +457,12 @@

    -

    - - table_name_suffix +

    table_name_suffix +

    - - - - -
    -

    The suffix string to append to every table name.

    -
    - +
    +

    The suffix string to append to every table name.

    +
    @@ -571,20 +475,14 @@

    -

    - - table_name_suffix=(suffix) +

    table_name_suffix=(suffix) +

    - - - - -
    -

    Works like table_name_prefix=, but appends instead of prepends (set to “_basecamp” gives “projects_basecamp”, “people_basecamp”). By default, the suffix is the empty string.

    +
    +

    Works like table_name_prefix=, but appends instead of prepends (set to “_basecamp” gives “projects_basecamp”, “people_basecamp”). By default, the suffix is the empty string.

    If you are organizing your models within modules, you can add a suffix to the models within a namespace by defining a singleton method in the parent module called table_name_suffix which returns your chosen suffix.

    -
    - +
    @@ -601,18 +499,12 @@

    Instance Public methods

    -

    - - id_value - - -

    +

    id_value +

    - -
    -

    Returns the underlying column value for a column named “id”. Useful when defining a composite primary key including an “id” column so that the value is readable.

    -
    - +
    +

    Returns the underlying column value for a column named “id”. Useful when defining a composite primary key including an “id” column so that the value is readable.

    +
    diff --git a/src/classes/ActiveRecord/ModelSchema/ClassMethods.html b/src/classes/ActiveRecord/ModelSchema/ClassMethods.html index 310316504c..f026ae1cb3 100644 --- a/src/classes/ActiveRecord/ModelSchema/ClassMethods.html +++ b/src/classes/ActiveRecord/ModelSchema/ClassMethods.html @@ -146,17 +146,11 @@

    Methods

    Instance Public methods

    -

    - - column_defaults() - -

    +

    column_defaults()

    - -
    -

    Returns a hash where the keys are column names and the values are default values when instantiating the Active Record object for this table.

    -
    - +
    +

    Returns a hash where the keys are column names and the values are default values when instantiating the Active Record object for this table.

    +
    @@ -182,15 +176,10 @@

    -

    - - column_for_attribute(name) - -

    +

    column_for_attribute(name)

    - -
    -

    Returns the column object for the named attribute. Returns an ActiveRecord::ConnectionAdapters::NullColumn if the named attribute does not exist.

    +
    +

    Returns the column object for the named attribute. Returns an ActiveRecord::ConnectionAdapters::NullColumn if the named attribute does not exist.

    class Person < ActiveRecord::Base
     end
    @@ -202,8 +191,7 @@ 

    person.column_for_attribute(:nothing) # => #<ActiveRecord::ConnectionAdapters::NullColumn:0xXXX @name=nil, @sql_type=nil, @cast_type=#<Type::Value>, ...>

    -
    - +
    @@ -231,17 +219,11 @@

    -

    - - column_names() - -

    +

    column_names()

    - -
    -

    Returns an array of column names as strings.

    -
    - +
    +

    Returns an array of column names as strings.

    +
    @@ -266,17 +248,9 @@

    -

    - - columns() - -

    +

    columns()

    -
    - -
    - @@ -301,17 +275,11 @@

    -

    - - content_columns() - -

    +

    content_columns()

    - -
    -

    Returns an array of column objects where the primary id, all columns ending in “_id” or “_count”, and columns used for single table inheritance have been removed.

    -
    - +
    +

    Returns an array of column objects where the primary id, all columns ending in “_id” or “_count”, and columns used for single table inheritance have been removed.

    +
    @@ -340,17 +308,11 @@

    -

    - - ignored_columns() - -

    +

    ignored_columns()

    - -
    -

    The list of columns names the model should ignore. Ignored columns won’t have attribute accessors defined, and won’t be referenced in SQL queries.

    -
    - +
    +

    The list of columns names the model should ignore. Ignored columns won’t have attribute accessors defined, and won’t be referenced in SQL queries.

    +
    @@ -375,15 +337,10 @@

    -

    - - ignored_columns=(columns) - -

    +

    ignored_columns=(columns)

    - -
    -

    Sets the columns names the model should ignore. Ignored columns won’t have attribute accessors defined, and won’t be referenced in SQL queries.

    +
    +

    Sets the columns names the model should ignore. Ignored columns won’t have attribute accessors defined, and won’t be referenced in SQL queries.

    A common usage pattern for this method is to ensure all references to an attribute have been removed and deployed, before a migration to drop the column from the database has been deployed and run. Using this two step approach to dropping columns ensures there is no code that raises errors due to having a cached schema in memory at the time the schema migration is run.

    @@ -409,8 +366,7 @@

    user = Project.create!(name: "First Project")
     user.category # => raises NoMethodError
     
    -

    - +
    @@ -437,17 +393,11 @@

    -

    - - load_schema() - -

    +

    load_schema()

    - -
    -

    Load the model’s schema information either from the schema cache or directly from the database.

    -
    - +
    +

    Load the model’s schema information either from the schema cache or directly from the database.

    +
    @@ -482,17 +432,11 @@

    -

    - - next_sequence_value() - -

    +

    next_sequence_value()

    - -
    -

    Returns the next value that will be used as the primary key on an insert statement.

    -
    - +
    +

    Returns the next value that will be used as the primary key on an insert statement.

    +
    @@ -517,17 +461,11 @@

    -

    - - only_columns() - -

    +

    only_columns()

    - -
    -

    The list of columns names the model should allow. Only columns are used to define attribute accessors, and are referenced in SQL queries.

    -
    - +
    +

    The list of columns names the model should allow. Only columns are used to define attribute accessors, and are referenced in SQL queries.

    +
    @@ -552,17 +490,9 @@

    -

    - - only_columns=(columns) - -

    +

    only_columns=(columns)

    -
    - -
    - @@ -589,17 +519,11 @@

    -

    - - prefetch_primary_key?() - -

    +

    prefetch_primary_key?()

    - -
    -

    Determines if the primary key values should be selected from their corresponding sequence before the insert statement.

    -
    - +
    +

    Determines if the primary key values should be selected from their corresponding sequence before the insert statement.

    +
    @@ -624,17 +548,11 @@

    -

    - - protected_environments() - -

    +

    protected_environments()

    - -
    -

    The array of names of environments where destructive actions should be prohibited. By default, the value is ["production"].

    -
    - +
    +

    The array of names of environments where destructive actions should be prohibited. By default, the value is ["production"].

    +
    @@ -663,17 +581,11 @@

    -

    - - protected_environments=(environments) - -

    +

    protected_environments=(environments)

    - -
    -

    Sets an array of names of environments where destructive actions should be prohibited.

    -
    - +
    +

    Sets an array of names of environments where destructive actions should be prohibited.

    +
    @@ -698,17 +610,11 @@

    -

    - - quoted_table_name() - -

    +

    quoted_table_name()

    - -
    -

    Returns a quoted version of the table name.

    -
    - +
    +

    Returns a quoted version of the table name.

    +
    @@ -733,15 +639,10 @@

    -

    - - reset_column_information() - -

    +

    reset_column_information()

    - -
    -

    Resets all the cached information about columns, which will cause them to be reloaded on the next request.

    +
    +

    Resets all the cached information about columns, which will cause them to be reloaded on the next request.

    The most common usage pattern for this method is probably in a migration, when just after creating a table you want to populate it with some default values, e.g.:

    @@ -765,8 +666,7 @@

    end end -

    - +
    @@ -796,17 +696,9 @@

    -

    - - sequence_name() - -

    +

    sequence_name()

    -
    - -
    - @@ -835,15 +727,10 @@

    -

    - - sequence_name=(value) - -

    +

    sequence_name=(value)

    - -
    -

    Sets the name of the sequence to use when generating ids to the given value, or (if the value is nil or false) to the value returned by the given block. This is required for Oracle and is useful for any database which relies on sequences for primary key generation.

    +
    +

    Sets the name of the sequence to use when generating ids to the given value, or (if the value is nil or false) to the value returned by the given block. This is required for Oracle and is useful for any database which relies on sequences for primary key generation.

    If a sequence name is not explicitly set when using Oracle, it will default to the commonly used pattern of: #{table_name}_seq

    @@ -853,8 +740,7 @@

    self.sequence_name = "projectseq" # default would have been "project_seq" end -

    - +
    @@ -880,17 +766,11 @@

    -

    - - table_exists?() - -

    +

    table_exists?()

    - -
    -

    Indicates whether the table associated with this class exists

    -
    - +
    +

    Indicates whether the table associated with this class exists

    +
    @@ -915,15 +795,10 @@

    -

    - - table_name() - -

    +

    table_name()

    - -
    -

    Guesses the table name (in forced lower-case) based on the name of the class in the inheritance hierarchy descending directly from ActiveRecord::Base. So if the hierarchy looks like: Reply < Message < ActiveRecord::Base, then Message is used to guess the table name even when called on Reply. The rules used to do the guess are handled by the Inflector class in Active Support, which knows almost all common English inflections. You can add new inflections in config/initializers/inflections.rb.

    +
    +

    Guesses the table name (in forced lower-case) based on the name of the class in the inheritance hierarchy descending directly from ActiveRecord::Base. So if the hierarchy looks like: Reply < Message < ActiveRecord::Base, then Message is used to guess the table name even when called on Reply. The rules used to do the guess are handled by the Inflector class in Active Support, which knows almost all common English inflections. You can add new inflections in config/initializers/inflections.rb.

    Nested classes are given table names prefixed by the singular form of the parent’s table name. Enclosing modules are not considered.

    @@ -974,8 +849,7 @@

    Examples

    self.table_name = "mice" end -
    - +
    @@ -1001,22 +875,16 @@

    Examples

    -

    - - table_name=(value) - -

    +

    table_name=(value)

    - -
    -

    Sets the table name explicitly. Example:

    +
    +

    Sets the table name explicitly. Example:

    class Project < ActiveRecord::Base
       self.table_name = "project"
     end
     
    -
    - +
    @@ -1054,17 +922,9 @@

    Instance Protected methods

    -

    - - initialize_load_schema_monitor() - -

    +

    initialize_load_schema_monitor()

    -
    - -
    - @@ -1089,17 +949,9 @@

    -

    - - reload_schema_from_cache(recursive = true) - -

    +

    reload_schema_from_cache(recursive = true)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html b/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html index 2e0f2a1fd4..b6059572f2 100644 --- a/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html +++ b/src/classes/ActiveRecord/MultiparameterAssignmentErrors.html @@ -83,17 +83,9 @@

    Attributes

    Class Public methods

    -

    - - new(errors = nil) - -

    +

    new(errors = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html b/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html index 648deafbe0..fe3af012d1 100644 --- a/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html +++ b/src/classes/ActiveRecord/NestedAttributes/ClassMethods.html @@ -331,15 +331,10 @@

    Constants

    Instance Public methods

    -

    - - accepts_nested_attributes_for(*attr_names) - -

    +

    accepts_nested_attributes_for(*attr_names)

    - -
    -

    Defines an attributes writer for the specified association(s).

    +
    +

    Defines an attributes writer for the specified association(s).

    Supported options:

    :allow_destroy
    @@ -365,8 +360,7 @@

    # creates avatar_attributes= and posts_attributes= accepts_nested_attributes_for :avatar, :posts, allow_destroy: true -

    - +
    diff --git a/src/classes/ActiveRecord/NoDatabaseError.html b/src/classes/ActiveRecord/NoDatabaseError.html index 52bbf61560..972d7ffee2 100644 --- a/src/classes/ActiveRecord/NoDatabaseError.html +++ b/src/classes/ActiveRecord/NoDatabaseError.html @@ -87,17 +87,9 @@

    Included Modules

    Class Public methods

    -

    - - db_error(db_name) - -

    +

    db_error(db_name)

    -
    - -
    - @@ -132,17 +124,9 @@

    -

    - - new(message = nil, connection_pool: nil) - -

    +

    new(message = nil, connection_pool: nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/NoTouching.html b/src/classes/ActiveRecord/NoTouching.html index 6144e67dfa..80c0a3e7e4 100644 --- a/src/classes/ActiveRecord/NoTouching.html +++ b/src/classes/ActiveRecord/NoTouching.html @@ -77,23 +77,17 @@

    Methods

    Instance Public methods

    -

    - - no_touching?() - -

    +

    no_touching?()

    - -
    -

    Returns true if the class has no_touching set, false otherwise.

    +
    +

    Returns true if the class has no_touching set, false otherwise.

    Project.no_touching do
       Project.first.no_touching? # true
       Message.first.no_touching? # false
     end
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/NoTouching/ClassMethods.html b/src/classes/ActiveRecord/NoTouching/ClassMethods.html index c93228a91b..377172955a 100644 --- a/src/classes/ActiveRecord/NoTouching/ClassMethods.html +++ b/src/classes/ActiveRecord/NoTouching/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - no_touching(&block) - -

    +

    no_touching(&block)

    - -
    -

    Lets you selectively disable calls to touch for the duration of a block.

    +
    +

    Lets you selectively disable calls to touch for the duration of a block.

    Examples

    @@ -80,8 +75,7 @@

    Examples

    Message.first.touch # works, but does not touch the associated project end -
    - +
    diff --git a/src/classes/ActiveRecord/Persistence.html b/src/classes/ActiveRecord/Persistence.html index fc8f982842..3899000a2d 100644 --- a/src/classes/ActiveRecord/Persistence.html +++ b/src/classes/ActiveRecord/Persistence.html @@ -177,21 +177,15 @@

    Methods

    Instance Public methods

    -

    - - becomes(klass) - -

    +

    becomes(klass)

    - -
    -

    Returns an instance of the specified klass with the attributes of the current record. This is mostly useful in relation to single table inheritance (STI) structures where you want a subclass to appear as the superclass. This can be used along with record identification in Action Pack to allow, say, Client < Company to do something like render client.becomes(Company) at partial: to render that instance using the companies/company partial instead of clients/client.

    +
    +

    Returns an instance of the specified klass with the attributes of the current record. This is mostly useful in relation to single table inheritance (STI) structures where you want a subclass to appear as the superclass. This can be used along with record identification in Action Pack to allow, say, Client < Company to do something like render client.becomes(Company) at partial: to render that instance using the companies/company partial instead of clients/client.

    Note: The new instance will share a link to the same attributes as the original class. Therefore the STI column value will still be the same. Any change to the attributes on either instance will affect both instances. This includes any attribute initialization done by the new instance.

    If you want to change the STI column as well, use becomes! instead.

    -
    - +
    @@ -228,19 +222,13 @@

    -

    - - becomes!(klass) - -

    +

    becomes!(klass)

    - -
    -

    Wrapper around becomes that also changes the instance’s STI column value. This is especially useful if you want to persist the changed class in your database.

    +
    +

    Wrapper around becomes that also changes the instance’s STI column value. This is especially useful if you want to persist the changed class in your database.

    Note: The old instance’s STI column value will be changed too, as both objects share the same set of attributes.

    -
    - +
    @@ -271,17 +259,11 @@

    -

    - - decrement(attribute, by = 1) - -

    +

    decrement(attribute, by = 1)

    - -
    -

    Initializes attribute to zero if nil and subtracts the value passed as by (default is 1). The decrement is performed directly on the underlying attribute, no setter is invoked. Only makes sense for number-based attributes. Returns self.

    -
    - +
    +

    Initializes attribute to zero if nil and subtracts the value passed as by (default is 1). The decrement is performed directly on the underlying attribute, no setter is invoked. Only makes sense for number-based attributes. Returns self.

    +
    @@ -306,17 +288,11 @@

    -

    - - decrement!(attribute, by = 1, touch: nil) - -

    +

    decrement!(attribute, by = 1, touch: nil)

    - -
    -

    Wrapper around decrement that writes the update to the database. Only attribute is updated; the record itself is not saved. This means that any other modified attributes will still be dirty. Validations and callbacks are skipped. Supports the touch option from update_counters, see that for more. Returns self.

    -
    - +
    +

    Wrapper around decrement that writes the update to the database. Only attribute is updated; the record itself is not saved. This means that any other modified attributes will still be dirty. Validations and callbacks are skipped. Supports the touch option from update_counters, see that for more. Returns self.

    +
    @@ -341,23 +317,17 @@

    -

    - - delete() - -

    +

    delete()

    - -
    -

    Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted). Returns the frozen instance.

    +
    +

    Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted). Returns the frozen instance.

    The row is simply removed with an SQL DELETE statement on the record’s primary key, and no callbacks are executed.

    Note that this will also delete records marked as #readonly?.

    To enforce the object’s before_destroy and after_destroy callbacks or any :dependent association options, use destroy.

    -
    - +
    @@ -385,19 +355,13 @@

    -

    - - destroy() - -

    +

    destroy()

    - -
    -

    Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted).

    +
    +

    Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted).

    There’s a series of callbacks associated with destroy. If the before_destroy callback throws :abort the action is cancelled and destroy returns false. See ActiveRecord::Callbacks for further details.

    -
    - +
    @@ -427,19 +391,13 @@

    -

    - - destroy!() - -

    +

    destroy!()

    - -
    -

    Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted).

    +
    +

    Deletes the record in the database and freezes this instance to reflect that no changes should be made (since they can’t be persisted).

    There’s a series of callbacks associated with destroy!. If the before_destroy callback throws :abort the action is cancelled and destroy! raises ActiveRecord::RecordNotDestroyed. See ActiveRecord::Callbacks for further details.

    -
    - +
    @@ -464,17 +422,11 @@

    -

    - - destroyed?() - -

    +

    destroyed?()

    - -
    -

    Returns true if this object has been destroyed, otherwise returns false.

    -
    - +
    +

    Returns true if this object has been destroyed, otherwise returns false.

    +
    @@ -499,17 +451,11 @@

    -

    - - increment(attribute, by = 1) - -

    +

    increment(attribute, by = 1)

    - -
    -

    Initializes attribute to zero if nil and adds the value passed as by (default is 1). The increment is performed directly on the underlying attribute, no setter is invoked. Only makes sense for number-based attributes. Returns self.

    -
    - +
    +

    Initializes attribute to zero if nil and adds the value passed as by (default is 1). The increment is performed directly on the underlying attribute, no setter is invoked. Only makes sense for number-based attributes. Returns self.

    +
    @@ -536,21 +482,15 @@

    -

    - - increment!(attribute, by = 1, touch: nil) - -

    +

    increment!(attribute, by = 1, touch: nil)

    - -
    -

    Wrapper around increment that writes the update to the database. Only attribute is updated; the record itself is not saved. This means that any other modified attributes will still be dirty. Validations and callbacks are skipped. Supports the touch option from update_counters, see that for more.

    +
    +

    Wrapper around increment that writes the update to the database. Only attribute is updated; the record itself is not saved. This means that any other modified attributes will still be dirty. Validations and callbacks are skipped. Supports the touch option from update_counters, see that for more.

    This method raises an ActiveRecord::ActiveRecordError when called on new objects, or when at least one of the attributes is marked as readonly.

    Returns self.

    -
    - +
    @@ -582,17 +522,11 @@

    -

    - - new_record?() - -

    +

    new_record?()

    - -
    -

    Returns true if this object hasn’t been saved yet – that is, a record for the object doesn’t exist in the database yet; otherwise, returns false.

    -
    - +
    +

    Returns true if this object hasn’t been saved yet – that is, a record for the object doesn’t exist in the database yet; otherwise, returns false.

    +
    @@ -617,17 +551,11 @@

    -

    - - persisted?() - -

    +

    persisted?()

    - -
    -

    Returns true if the record is persisted, i.e. it’s not a new record and it was not destroyed, otherwise returns false.

    -
    - +
    +

    Returns true if the record is persisted, i.e. it’s not a new record and it was not destroyed, otherwise returns false.

    +
    @@ -652,17 +580,11 @@

    -

    - - previously_new_record?() - -

    +

    previously_new_record?()

    - -
    -

    Returns true if this object was just created – that is, prior to the last update or delete, the object didn’t exist in the database and new_record? would have returned true.

    -
    - +
    +

    Returns true if this object was just created – that is, prior to the last update or delete, the object didn’t exist in the database and new_record? would have returned true.

    +
    @@ -687,17 +609,11 @@

    -

    - - previously_persisted?() - -

    +

    previously_persisted?()

    - -
    -

    Returns true if this object was previously persisted but now it has been deleted.

    -
    - +
    +

    Returns true if this object was previously persisted but now it has been deleted.

    +
    @@ -722,15 +638,10 @@

    -

    - - reload(options = nil) - -

    +

    reload(options = nil)

    - -
    -

    Reloads the record from the database.

    +
    +

    Reloads the record from the database.

    This method finds the record by its primary key (which could be assigned manually) and modifies the receiver in-place:

    @@ -775,8 +686,7 @@

    end end -

    - +
    @@ -814,16 +724,11 @@

    -

    - - save(**options) - - -

    +

    save(**options) +

    - -
    -

    Saves the model.

    +
    +

    Saves the model.

    If the model is new, a record gets created in the database, otherwise the existing record gets updated.

    @@ -834,8 +739,7 @@

    There’s a series of callbacks associated with save. If any of the before_* callbacks throws :abort the action is cancelled and save returns false. See ActiveRecord::Callbacks for further details.

    Attributes marked as readonly are silently ignored if the record is being updated.

    -

    - +
    @@ -862,16 +766,11 @@

    -

    - - save!(**options) +

    save!(**options) +

    - - - - -
    -

    Saves the model.

    +
    +

    Saves the model.

    If the model is new, a record gets created in the database, otherwise the existing record gets updated.

    @@ -884,8 +783,7 @@

    Attributes marked as readonly are silently ignored if the record is being updated.

    Unless an error is raised, returns true.

    -

    - +
    @@ -910,15 +808,10 @@

    -

    - - toggle(attribute) - -

    +

    toggle(attribute)

    - -
    -

    Assigns to attribute the boolean opposite of attribute?. So if the predicate returns true the attribute will become false. This method toggles directly the underlying value without calling any setter. Returns self.

    +
    +

    Assigns to attribute the boolean opposite of attribute?. So if the predicate returns true the attribute will become false. This method toggles directly the underlying value without calling any setter. Returns self.

    Example:

    @@ -927,8 +820,7 @@

    user.toggle(:banned) user.banned? # => true -

    - +
    @@ -954,17 +846,11 @@

    -

    - - toggle!(attribute) - -

    +

    toggle!(attribute)

    - -
    -

    Wrapper around toggle that saves the record. This method differs from its non-bang version in the sense that it passes through the attribute setter. Saving is not subjected to validation checks. Returns true if the record could be saved.

    -
    - +
    +

    Wrapper around toggle that saves the record. This method differs from its non-bang version in the sense that it passes through the attribute setter. Saving is not subjected to validation checks. Returns true if the record could be saved.

    +
    @@ -989,15 +875,10 @@

    -

    - - touch(*names, time: nil) - -

    +

    touch(*names, time: nil)

    - -
    -

    Saves the record with the updated_at/on attributes set to the current time or the time specified. Please note that no validation is performed and only the after_touch, after_commit and after_rollback callbacks are executed.

    +
    +

    Saves the record with the updated_at/on attributes set to the current time or the time specified. Please note that no validation is performed and only the after_touch, after_commit and after_rollback callbacks are executed.

    This method can be passed attribute names and an optional time argument. If attribute names are passed, they are updated along with updated_at/on attributes. If no time argument is passed, the current time is used as default.

    @@ -1026,8 +907,7 @@

    ball = Ball.new
     ball.touch(:updated_at)   # => raises ActiveRecordError
     
    -

    - +
    @@ -1068,17 +948,11 @@

    -

    - - update(attributes) - -

    +

    update(attributes)

    - -
    -

    Updates the attributes of the model from the passed-in hash and saves the record, all wrapped in a transaction. If the object is invalid, the saving will fail and false will be returned.

    -
    - +
    +

    Updates the attributes of the model from the passed-in hash and saves the record, all wrapped in a transaction. If the object is invalid, the saving will fail and false will be returned.

    +
    @@ -1108,17 +982,11 @@

    -

    - - update!(attributes) - -

    +

    update!(attributes)

    - -
    -

    Updates its receiver just like update but calls save! instead of save, so an exception is raised if the record is invalid and saving will fail.

    -
    - +
    +

    Updates its receiver just like update but calls save! instead of save, so an exception is raised if the record is invalid and saving will fail.

    +
    @@ -1148,15 +1016,10 @@

    -

    - - update_attribute(name, value) - -

    +

    update_attribute(name, value)

    - -
    -

    Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records. Also note that

    +
    +

    Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records. Also note that

    - +
    @@ -1200,15 +1062,10 @@

    -

    - - update_attribute!(name, value) - -

    +

    update_attribute!(name, value)

    - -
    -

    Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records. Also note that

    +
    +

    Updates a single attribute and saves the record. This is especially useful for boolean flags on existing records. Also note that

    - +
    @@ -1252,17 +1108,11 @@

    -

    - - update_column(name, value, touch: nil) - -

    +

    update_column(name, value, touch: nil)

    - -
    -

    Equivalent to update_columns(name => value).

    -
    - +
    +

    Equivalent to update_columns(name => value).

    +
    @@ -1287,15 +1137,10 @@

    -

    - - update_columns(attributes) - -

    +

    update_columns(attributes)

    - -
    -

    Updates the attributes directly in the database issuing an UPDATE SQL statement and sets them in the receiver:

    +
    +

    Updates the attributes directly in the database issuing an UPDATE SQL statement and sets them in the receiver:

    user.update_columns(last_request_at: Time.current)
     
    @@ -1328,8 +1173,7 @@

    Examples

    # Update with touch option. user.update_columns(last_request_at: Time.current, touch: true) -
    - +
    diff --git a/src/classes/ActiveRecord/Persistence/ClassMethods.html b/src/classes/ActiveRecord/Persistence/ClassMethods.html index ef104b4e3f..10348e187a 100644 --- a/src/classes/ActiveRecord/Persistence/ClassMethods.html +++ b/src/classes/ActiveRecord/Persistence/ClassMethods.html @@ -82,15 +82,10 @@

    Methods

    Instance Public methods

    -

    - - build(attributes = nil, &block) - -

    +

    build(attributes = nil, &block)

    - -
    -

    Builds an object (or multiple objects) and returns either the built object or a list of built objects.

    +
    +

    Builds an object (or multiple objects) and returns either the built object or a list of built objects.

    The attributes parameter can be either a Hash or an Array of Hashes. These Hashes describe the attributes on the objects that are to be built.

    @@ -112,8 +107,7 @@

    Examples

    u.is_admin = false end -
    - +
    @@ -142,15 +136,10 @@

    Examples

    -

    - - create(attributes = nil, &block) - -

    +

    create(attributes = nil, &block)

    - -
    -

    Creates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not.

    +
    +

    Creates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not.

    The attributes parameter can be either a Hash or an Array of Hashes. These Hashes describe the attributes on the objects that are to be created.

    @@ -172,8 +161,7 @@

    Examples

    u.is_admin = false end -
    - +
    @@ -204,19 +192,13 @@

    Examples

    -

    - - create!(attributes = nil, &block) - -

    +

    create!(attributes = nil, &block)

    - -
    -

    Creates an object (or multiple objects) and saves it to the database, if validations pass. Raises a RecordInvalid error if validations fail, unlike Base#create.

    +
    +

    Creates an object (or multiple objects) and saves it to the database, if validations pass. Raises a RecordInvalid error if validations fail, unlike Base#create.

    The attributes parameter can be either a Hash or an Array of Hashes. These describe which attributes to be created on the object, or multiple objects when given an Array of Hashes.

    -
    - +
    @@ -247,21 +229,15 @@

    -

    - - instantiate(attributes, column_types = {}, &block) - -

    +

    instantiate(attributes, column_types = {}, &block)

    - -
    -

    Given an attributes hash, instantiate returns a new instance of the appropriate class. Accepts only keys as strings.

    +
    +

    Given an attributes hash, instantiate returns a new instance of the appropriate class. Accepts only keys as strings.

    For example, Post.all may return Comments, Messages, and Emails by storing the record’s subclass in a type attribute. By calling instantiate instead of new, finder methods ensure they get new instances of the appropriate class for each record.

    See ActiveRecord::Inheritance#discriminate_class_for_record to see how this “single-table” inheritance mapping is implemented.

    -
    - +
    @@ -287,15 +263,10 @@

    -

    - - query_constraints(*columns_list) - -

    +

    query_constraints(*columns_list)

    - -
    -

    Accepts a list of attribute names to be used in the WHERE clause of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for first and last finder methods.

    +
    +

    Accepts a list of attribute names to be used in the WHERE clause of SELECT / UPDATE / DELETE queries and in the ORDER BY clause for first and last finder methods.

    class Developer < ActiveRecord::Base
       query_constraints :company_id, :id
    @@ -325,8 +296,7 @@ 

    developer.reload # SELECT "developers".* FROM "developers" WHERE "developers"."company_id" = 1 AND "developers"."id" = 1 LIMIT 1

    -
    - +
    @@ -354,15 +324,10 @@

    -

    - - update(id = :all, attributes) - -

    +

    update(id = :all, attributes)

    - -
    -

    Updates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not.

    +
    +

    Updates an object (or multiple objects) and saves it to the database, if validations pass. The resulting object is returned whether the object was saved successfully to the database or not.

    Parameters

    • @@ -386,8 +351,7 @@

      Examples

      Note: Updating a large number of records will run an UPDATE query for each record, which may cause a performance issue. When running callbacks is not needed for each record update, it is preferred to use update_all for updating all records in a single query.

      -
    - +
    @@ -432,17 +396,11 @@

    Examples

    -

    - - update!(id = :all, attributes) - -

    +

    update!(id = :all, attributes)

    - -
    -

    Updates the object (or multiple objects) just like update but calls update! instead of update, so an exception is raised if the record is invalid and saving will fail.

    -
    - +
    +

    Updates the object (or multiple objects) just like update but calls update! instead of update, so an exception is raised if the record is invalid and saving will fail.

    +
    diff --git a/src/classes/ActiveRecord/Promise.html b/src/classes/ActiveRecord/Promise.html index 7172059f80..d27ad21759 100644 --- a/src/classes/ActiveRecord/Promise.html +++ b/src/classes/ActiveRecord/Promise.html @@ -74,17 +74,11 @@

    Methods

    Instance Public methods

    -

    - - pending?() - -

    +

    pending?()

    - -
    -

    Returns whether the associated query is still being executed or not.

    -
    - +
    +

    Returns whether the associated query is still being executed or not.

    +
    @@ -109,21 +103,15 @@

    -

    - - then(&block) - -

    +

    then(&block)

    - -
    -

    Returns a new ActiveRecord::Promise that will apply the passed block when the value is accessed:

    +
    +

    Returns a new ActiveRecord::Promise that will apply the passed block when the value is accessed:

    Post.async_pick(:title).then { |title| title.upcase }.value
     # => "POST TITLE"
     
    -
    - +
    @@ -148,17 +136,11 @@

    -

    - - value() - -

    +

    value()

    - -
    -

    Returns the query result. If the query wasn’t completed yet, accessing value will block until the query completes. If the query failed, value will raise the corresponding error.

    -
    - +
    +

    Returns the query result. If the query wasn’t completed yet, accessing value will block until the query completes. If the query failed, value will raise the corresponding error.

    +
    diff --git a/src/classes/ActiveRecord/QueryCache/ClassMethods.html b/src/classes/ActiveRecord/QueryCache/ClassMethods.html index 8df67a72de..00b9d0c01e 100644 --- a/src/classes/ActiveRecord/QueryCache/ClassMethods.html +++ b/src/classes/ActiveRecord/QueryCache/ClassMethods.html @@ -68,17 +68,11 @@

    Methods

    Instance Public methods

    -

    - - cache(&block) - -

    +

    cache(&block)

    - -
    -

    Enable the query cache within the block if Active Record is configured. If it’s not, it will execute the given block.

    -
    - +
    +

    Enable the query cache within the block if Active Record is configured. If it’s not, it will execute the given block.

    +
    @@ -113,21 +107,15 @@

    -

    - - uncached(dirties: true, &block) - -

    +

    uncached(dirties: true, &block)

    - -
    -

    Runs the block with the query cache disabled.

    +
    +

    Runs the block with the query cache disabled.

    If the query cache was enabled before the block was executed, it is enabled again after it.

    Set dirties: false to prevent query caches on all connections from being cleared by write operations. (By default, write operations dirty all connections’ query caches in case they are replicas whose cache would now be outdated.)

    -
    - +
    diff --git a/src/classes/ActiveRecord/QueryMethods.html b/src/classes/ActiveRecord/QueryMethods.html index 5a03f21915..22ab7d7bf9 100644 --- a/src/classes/ActiveRecord/QueryMethods.html +++ b/src/classes/ActiveRecord/QueryMethods.html @@ -261,23 +261,17 @@

    Constants

    Instance Public methods

    -

    - - and(other) - -

    +

    and(other)

    - -
    -

    Returns a new relation, which is the logical intersection of this relation and the one passed as an argument.

    +
    +

    Returns a new relation, which is the logical intersection of this relation and the one passed as an argument.

    The two relations must be structurally compatible: they must be scoping the same model, and they must differ only by where (if no group has been defined) or having (if a group is present).

    Post.where(id: [1, 2]).and(Post.where(id: [2, 3]))
     # SELECT `posts`.* FROM `posts` WHERE `posts`.`id` IN (1, 2) AND `posts`.`id` IN (2, 3)
     
    -
    - +
    @@ -306,15 +300,10 @@

    -

    - - annotate(*args) - -

    +

    annotate(*args)

    - -
    -

    Adds an SQL comment to queries generated from this relation. For example:

    +
    +

    Adds an SQL comment to queries generated from this relation. For example:

    User.annotate("selecting user names").select(:name)
     # SELECT "users"."name" FROM "users" /* selecting user names */
    @@ -326,8 +315,7 @@ 

    The SQL block comment delimiters, “/*” and “*/”, will be added automatically.

    Some escaping is performed, however untrusted user input should not be used.

    -

    - +
    @@ -353,15 +341,10 @@

    -

    - - create_with(value) - -

    +

    create_with(value)

    - -
    -

    Sets attributes to be used when creating new records from a relation object.

    +
    +

    Sets attributes to be used when creating new records from a relation object.

    users = User.where(name: 'Oscar')
     users.new.name # => 'Oscar'
    @@ -375,8 +358,7 @@ 

    users = users.create_with(nil)
     users.new.name # => 'Oscar'
     
    -

    - +
    @@ -401,15 +383,10 @@

    -

    - - distinct(value = true) - -

    +

    distinct(value = true)

    - -
    -

    Specifies whether the records should be unique or not. For example:

    +
    +

    Specifies whether the records should be unique or not. For example:

    User.select(:name)
     # Might return two records with the same name
    @@ -420,8 +397,7 @@ 

    User.select(:name).distinct.distinct(false) # You can also remove the uniqueness

    -
    - +
    @@ -446,15 +422,10 @@

    -

    - - eager_load(*args) - -

    +

    eager_load(*args)

    - -
    -

    Specify associations args to be eager loaded using a LEFT OUTER JOIN. Performs a single query joining all specified associations. For example:

    +
    +

    Specify associations args to be eager loaded using a LEFT OUTER JOIN. Performs a single query joining all specified associations. For example:

    users = User.eager_load(:address).limit(5)
     users.each do |user|
    @@ -478,8 +449,7 @@ 

    NOTE: Loading the associations in a join can result in many rows that contain redundant data and it performs poorly at scale.

    -
    - +
    @@ -505,15 +475,10 @@

    -

    - - excluding(*records) - -

    +

    excluding(*records)

    - -
    -

    Excludes the specified record (or collection of records) from the resulting relation. For example:

    +
    +

    Excludes the specified record (or collection of records) from the resulting relation. For example:

    Post.excluding(post)
     # SELECT "posts".* FROM "posts" WHERE "posts"."id" != 1
    @@ -536,13 +501,14 @@ 

    This is short-hand for .where.not(id: post.id) and .where.not(id: [post_one.id, post_two.id]).

    An ArgumentError will be raised if either no records are specified, or if any of the records in the collection (if a collection is passed in) are not instances of the same model that the relation is scoping.

    -

    - +
    -
    - Also aliased as: without -
    +

    + Also aliased as: + + without. +

    @@ -574,15 +540,10 @@

    -

    - - extending(*modules, &block) - -

    +

    extending(*modules, &block)

    - -
    -

    Used to extend a scope with additional methods, either through a module or through a block provided.

    +
    +

    Used to extend a scope with additional methods, either through a module or through a block provided.

    The object returned is a relation, which can be further extended.

    @@ -621,8 +582,7 @@

    Using a Block

    end end
    -
    - +
    @@ -651,15 +611,10 @@

    Using a Block

    -

    - - extract_associated(association) - -

    +

    extract_associated(association)

    - -
    -

    Extracts a named association from the relation. The named association is first preloaded, then the individual association records are collected from the relation. Like so:

    +
    +

    Extracts a named association from the relation. The named association is first preloaded, then the individual association records are collected from the relation. Like so:

    account.memberships.extract_associated(:user)
     # => Returns collection of User records
    @@ -669,8 +624,7 @@ 

    account.memberships.preload(:user).collect(&:user)
     
    -

    - +
    @@ -695,15 +649,10 @@

    -

    - - from(value, subquery_name = nil) - -

    +

    from(value, subquery_name = nil)

    - -
    -

    Specifies the table from which the records will be fetched. For example:

    +
    +

    Specifies the table from which the records will be fetched. For example:

    Topic.select('title').from('posts')
     # SELECT title FROM posts
    @@ -738,8 +687,7 @@ 

    # FROM colors c, JSONB_ARRAY_ELEMENTS(colored_things) AS colorvalues(colorvalue) # WHERE (colorvalue->>'color' = 'red')

    -
    - +
    @@ -764,15 +712,10 @@

    -

    - - group(*args) - -

    +

    group(*args)

    - -
    -

    Allows to specify a group attribute:

    +
    +

    Allows to specify a group attribute:

    User.group(:name)
     # SELECT "users".* FROM "users" GROUP BY name
    @@ -795,8 +738,7 @@ 

    User.select([:id, :first_name]).group(:id, :first_name).first(3)
     # => [#<User id: 1, first_name: "Bill">, #<User id: 2, first_name: "Earl">, #<User id: 3, first_name: "Beto">]
     
    -

    - +
    @@ -822,20 +764,14 @@

    -

    - - having(opts, *rest) - -

    +

    having(opts, *rest)

    - -
    -

    Allows to specify a HAVING clause. Note that you can’t use HAVING without also specifying a GROUP clause.

    +
    +

    Allows to specify a HAVING clause. Note that you can’t use HAVING without also specifying a GROUP clause.

    Order.having('SUM(price) > 30').group('user_id')
     
    -
    - +
    @@ -860,15 +796,10 @@

    -

    - - in_order_of(column, values, filter: true) - -

    +

    in_order_of(column, values, filter: true)

    - -
    -

    Applies an ORDER BY clause based on a given column, ordered and filtered by a specific set of values.

    +
    +

    Applies an ORDER BY clause based on a given column, ordered and filtered by a specific set of values.

    User.in_order_of(:id, [1, 5, 3])
     # SELECT "users".* FROM "users"
    @@ -917,8 +848,7 @@ 

    # ELSE 3 # END ASC

    -
    - +
    @@ -965,15 +895,10 @@

    -

    - - includes(*args) - -

    +

    includes(*args)

    - -
    -

    Specify associations args to be eager loaded to prevent N + 1 queries. A separate query is performed for each association, unless a join is required by conditions.

    +
    +

    Specify associations args to be eager loaded to prevent N + 1 queries. A separate query is performed for each association, unless a join is required by conditions.

    For example:

    @@ -1028,8 +953,7 @@

    Conditions

    NOTE: Conditions affect both sides of an association. For example, the above code will return only users that have a post named “example”, and will only include posts named “example”, even when a matching user has other additional posts.

    -
    - +
    @@ -1055,15 +979,10 @@

    Conditions

    -

    - - invert_where() - -

    +

    invert_where()

    - -
    -

    Allows you to invert an entire where clause instead of manually applying conditions.

    +
    +

    Allows you to invert an entire where clause instead of manually applying conditions.

    class User
       scope :active, -> { where(accepted: true, locked: false) }
    @@ -1093,8 +1012,7 @@ 

    User.where(role: 'admin').inactive # WHERE NOT (`role` = 'admin' AND `accepted` = 1 AND `locked` = 0)

    -
    - +
    @@ -1119,15 +1037,10 @@

    -

    - - joins(*args) - -

    +

    joins(*args)

    - -
    -

    Performs JOINs on args. The given symbol(s) should match the name of the association(s).

    +
    +

    Performs JOINs on args. The given symbol(s) should match the name of the association(s).

    User.joins(:posts)
     # SELECT "users".*
    @@ -1158,8 +1071,7 @@ 

    User.joins("LEFT JOIN bookmarks ON bookmarks.bookmarkable_type = 'Post' AND bookmarks.user_id = users.id")
     # SELECT "users".* FROM "users" LEFT JOIN bookmarks ON bookmarks.bookmarkable_type = 'Post' AND bookmarks.user_id = users.id
     
    -

    - +
    @@ -1185,24 +1097,17 @@

    -

    - - left_joins(*args) - -

    +

    left_joins(*args)

    -
    - -
    - -
    - Alias for: left_outer_joins -
    +

    + Alias for: + left_outer_joins. +

    @@ -1210,26 +1115,22 @@

    -

    - - left_outer_joins(*args) - -

    +

    left_outer_joins(*args)

    - -
    -

    Performs LEFT OUTER JOINs on args:

    +
    +

    Performs LEFT OUTER JOINs on args:

    User.left_outer_joins(:posts)
     # SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id"
     
    -
    - +
    -
    - Also aliased as: left_joins -
    +

    + Also aliased as: + + left_joins. +

    @@ -1254,22 +1155,16 @@

    -

    - - limit(value) - -

    +

    limit(value)

    - -
    -

    Specifies a limit for the number of records to retrieve.

    +
    +

    Specifies a limit for the number of records to retrieve.

    User.limit(10) # generated SQL has 'LIMIT 10'
     
     User.limit(10).limit(20) # generated SQL has 'LIMIT 20'
     
    -
    - +
    @@ -1294,17 +1189,11 @@

    -

    - - lock(locks = true) - -

    +

    lock(locks = true)

    - -
    -

    Specifies locking settings (default to true). For more information on locking, please see ActiveRecord::Locking.

    -
    - +
    +

    Specifies locking settings (default to true). For more information on locking, please see ActiveRecord::Locking.

    +
    @@ -1329,15 +1218,10 @@

    -

    - - none() - -

    +

    none()

    - -
    -

    Returns a chainable relation with zero records.

    +
    +

    Returns a chainable relation with zero records.

    The returned relation implements the Null Object pattern. It is an object with defined null behavior and always returns an empty array of records without querying the database.

    @@ -1361,8 +1245,7 @@

    end end -

    - +
    @@ -1387,15 +1270,10 @@

    -

    - - offset(value) - -

    +

    offset(value)

    - -
    -

    Specifies the number of rows to skip before returning rows.

    +
    +

    Specifies the number of rows to skip before returning rows.

    User.offset(10) # generated SQL has "OFFSET 10"
     
    @@ -1404,8 +1282,7 @@

    User.offset(10).order("name ASC")
     
    -

    - +
    @@ -1430,15 +1307,10 @@

    -

    - - optimizer_hints(*args) - -

    +

    optimizer_hints(*args)

    - -
    -

    Specify optimizer hints to be used in the SELECT statement.

    +
    +

    Specify optimizer hints to be used in the SELECT statement.

    Example (for MySQL):

    @@ -1451,8 +1323,7 @@

    Topic.optimizer_hints("SeqScan(topics)", "Parallel(topics 8)")
     # SELECT /*+ SeqScan(topics) Parallel(topics 8) */ "topics".* FROM "topics"
     
    -

    - +
    @@ -1478,23 +1349,17 @@

    -

    - - or(other) - -

    +

    or(other)

    - -
    -

    Returns a new relation, which is the logical union of this relation and the one passed as an argument.

    +
    +

    Returns a new relation, which is the logical union of this relation and the one passed as an argument.

    The two relations must be structurally compatible: they must be scoping the same model, and they must differ only by where (if no group has been defined) or having (if a group is present).

    Post.where("id = 1").or(Post.where("author_id = 3"))
     # SELECT `posts`.* FROM `posts` WHERE ((id = 1) OR (author_id = 3))
     
    -
    - +
    @@ -1527,15 +1392,10 @@

    -

    - - order(*args) - -

    +

    order(*args)

    - -
    -

    Applies an ORDER BY clause to a query.

    +
    +

    Applies an ORDER BY clause to a query.

    order accepts arguments in one of several formats.

    @@ -1588,8 +1448,7 @@

    Arel<
    User.order(Arel.sql("payload->>'kind'"))
     # SELECT "users".* FROM "users" ORDER BY payload->>'kind'
     
    -

    - +
    @@ -1617,15 +1476,10 @@

    Arel<

    -

    - - preload(*args) - -

    +

    preload(*args)

    - -
    -

    Specify associations args to be eager loaded using separate queries. A separate query is performed for each association.

    +
    +

    Specify associations args to be eager loaded using separate queries. A separate query is performed for each association.

    users = User.preload(:address).limit(5)
     users.each do |user|
    @@ -1646,8 +1500,7 @@ 

    # SELECT "friends".* FROM "friends" WHERE "friends"."user_id" IN (1,2,3,4,5) # SELECT ...

    -
    - +
    @@ -1673,15 +1526,10 @@

    -

    - - readonly(value = true) - -

    +

    readonly(value = true)

    - -
    -

    Mark a relation as readonly. Attempting to update a record will result in an error.

    +
    +

    Mark a relation as readonly. Attempting to update a record will result in an error.

    users = User.readonly
     users.first.save
    @@ -1694,8 +1542,7 @@ 

    users.first.save # => true

    -
    - +
    @@ -1720,15 +1567,10 @@

    -

    - - references(*table_names) - -

    +

    references(*table_names)

    - -
    -

    Use to indicate that the given table_names are referenced by an SQL string, and should therefore be +JOIN+ed in any query rather than loaded separately. This method only works in conjunction with includes. See includes for more details.

    +
    +

    Use to indicate that the given table_names are referenced by an SQL string, and should therefore be +JOIN+ed in any query rather than loaded separately. This method only works in conjunction with includes. See includes for more details.

    User.includes(:posts).where("posts.name = 'foo'")
     # Doesn't JOIN the posts table, resulting in an error.
    @@ -1736,8 +1578,7 @@ 

    User.includes(:posts).where("posts.name = 'foo'").references(:posts) # Query now knows the string references posts, so adds a JOIN

    -
    - +
    @@ -1763,15 +1604,10 @@

    -

    - - regroup(*args) - -

    +

    regroup(*args)

    - -
    -

    Allows you to change a previously set group statement.

    +
    +

    Allows you to change a previously set group statement.

    Post.group(:title, :body)
     # SELECT `posts`.`*` FROM `posts` GROUP BY `posts`.`title`, `posts`.`body`
    @@ -1781,8 +1617,7 @@ 

    This is short-hand for unscope(:group).group(fields). Note that we’re unscoping the entire group statement.

    -
    - +
    @@ -1808,15 +1643,10 @@

    -

    - - reorder(*args) - -

    +

    reorder(*args)

    - -
    -

    Replaces any existing order defined on the relation with the specified order.

    +
    +

    Replaces any existing order defined on the relation with the specified order.

    User.order('email DESC').reorder('id ASC') # generated SQL has 'ORDER BY id ASC'
     
    @@ -1827,8 +1657,7 @@

    generates a query with ORDER BY id ASC, name ASC.

    -

    - +
    @@ -1856,15 +1685,10 @@

    -

    - - reselect(*args) - -

    +

    reselect(*args)

    - -
    -

    Allows you to change a previously set select statement.

    +
    +

    Allows you to change a previously set select statement.

    Post.select(:title, :body)
     # SELECT `posts`.`title`, `posts`.`body` FROM `posts`
    @@ -1874,8 +1698,7 @@ 

    This is short-hand for unscope(:select).select(fields). Note that we’re unscoping the entire select statement.

    -
    - +
    @@ -1902,20 +1725,14 @@

    -

    - - reverse_order() - -

    +

    reverse_order()

    - -
    -

    Reverse the existing order clause on the relation.

    +
    +

    Reverse the existing order clause on the relation.

    User.order('name ASC').reverse_order # generated SQL has 'ORDER BY name DESC'
     
    -
    - +
    @@ -1940,15 +1757,10 @@

    -

    - - rewhere(conditions) - -

    +

    rewhere(conditions)

    - -
    -

    Allows you to change a previously set where condition for a given attribute, instead of appending to that condition.

    +
    +

    Allows you to change a previously set where condition for a given attribute, instead of appending to that condition.

    Post.where(trashed: true).where(trashed: false)
     # WHERE `trashed` = 1 AND `trashed` = 0
    @@ -1961,8 +1773,7 @@ 

    This is short-hand for unscope(where: conditions.keys).where(conditions). Note that unlike reorder, we’re only unscoping the named conditions – not the entire where statement.

    -
    - +
    @@ -1994,15 +1805,10 @@

    -

    - - select(*fields) - -

    +

    select(*fields)

    - -
    -

    Works in two unique ways.

    +
    +

    Works in two unique ways.

    First: takes a block so it can be used just like Array#select.

    @@ -2051,8 +1857,7 @@

    Model.select(:field).first.other_field
     # => ActiveModel::MissingAttributeError: missing attribute 'other_field' for Model
     
    -

    - +
    @@ -2088,22 +1893,16 @@

    -

    - - strict_loading(value = true) - -

    +

    strict_loading(value = true)

    - -
    -

    Sets the returned relation to strict_loading mode. This will raise an error if the record tries to lazily load an association.

    +
    +

    Sets the returned relation to strict_loading mode. This will raise an error if the record tries to lazily load an association.

    user = User.strict_loading.first
     user.comments.to_a
     # => ActiveRecord::StrictLoadingViolationError
     
    -
    - +
    @@ -2128,15 +1927,10 @@

    -

    - - structurally_compatible?(other) - -

    +

    structurally_compatible?(other)

    - -
    -

    Checks whether the given relation is structurally compatible with this relation, to determine if it’s possible to use the and and or methods without raising an error. Structurally compatible is defined as: they must be scoping the same model, and they must differ only by where (if no group has been defined) or having (if a group is present).

    +
    +

    Checks whether the given relation is structurally compatible with this relation, to determine if it’s possible to use the and and or methods without raising an error. Structurally compatible is defined as: they must be scoping the same model, and they must differ only by where (if no group has been defined) or having (if a group is present).

    Post.where("id = 1").structurally_compatible?(Post.where("author_id = 3"))
     # => true
    @@ -2144,8 +1938,7 @@ 

    Post.joins(:comments).structurally_compatible?(Post.where("id = 1")) # => false

    -
    - +
    @@ -2170,17 +1963,11 @@

    -

    - - uniq!(name) - -

    +

    uniq!(name)

    - -
    -

    Deduplicate multiple values.

    -
    - +
    +

    Deduplicate multiple values.

    +
    @@ -2208,15 +1995,10 @@

    -

    - - unscope(*args) - -

    +

    unscope(*args)

    - -
    -

    Removes an unwanted relation that is already defined on a chain of relations. This is useful when passing around chains of relations and would like to modify the relations without reconstructing the entire chain.

    +
    +

    Removes an unwanted relation that is already defined on a chain of relations. This is useful when passing around chains of relations and would like to modify the relations without reconstructing the entire chain.

    User.order('email DESC').unscope(:order) == User.all
     
    @@ -2246,8 +2028,7 @@

    has_many :comments, -> { unscope(where: :trashed) }
     
    -

    - +
    @@ -2273,15 +2054,10 @@

    -

    - - where(*args) - -

    +

    where(*args)

    - -
    -

    Returns a new relation, which is the result of filtering the current relation according to the conditions in the arguments.

    +
    +

    Returns a new relation, which is the result of filtering the current relation according to the conditions in the arguments.

    where accepts conditions in one of several formats. In the examples below, the resulting SQL is given as an illustration; the actual query generated may be different depending on the database adapter.

    @@ -2408,8 +2184,7 @@

    No Argument

    Blank Condition

    If the condition is any blank-ish object, then where is a no-op and returns the current relation.

    -
    - +
    @@ -2440,15 +2215,10 @@

    Blank Condition

    -

    - - with(*args) - -

    +

    with(*args)

    - -
    -

    Add a Common Table Expression (CTE) that you can then reference within another SELECT statement.

    +
    +

    Add a Common Table Expression (CTE) that you can then reference within another SELECT statement.

    Note: CTE’s are only supported in MySQL for versions 8.0 and above. You will not be able to use CTE’s with MySQL 5.7.

    @@ -2510,8 +2280,7 @@

    .with(posts_with_comments: Post.where("comments_count > ?", 0)) .with(posts_with_tags: Post.where("tags_count > ?", 0)) -

    - +
    @@ -2538,15 +2307,10 @@

    -

    - - with_recursive(*args) - -

    +

    with_recursive(*args)

    - -
    -

    Add a recursive Common Table Expression (CTE) that you can then reference within another SELECT statement.

    +
    +

    Add a recursive Common Table Expression (CTE) that you can then reference within another SELECT statement.

    Post.with_recursive(post_and_replies: [Post.where(id: 42), Post.joins('JOIN post_and_replies ON posts.in_reply_to_id = post_and_replies.id')])
     # => ActiveRecord::Relation
    @@ -2559,8 +2323,7 @@ 

    See ‘#with` for more information.

    -
    - +
    @@ -2586,24 +2349,17 @@

    -

    - - without(*records) - -

    +

    without(*records)

    -
    - -
    - -
    - Alias for: excluding -
    +

    + Alias for: + excluding. +

    diff --git a/src/classes/ActiveRecord/QueryMethods/WhereChain.html b/src/classes/ActiveRecord/QueryMethods/WhereChain.html index 7a7ac3728c..f0688a4094 100644 --- a/src/classes/ActiveRecord/QueryMethods/WhereChain.html +++ b/src/classes/ActiveRecord/QueryMethods/WhereChain.html @@ -78,15 +78,10 @@

    Methods

    Instance Public methods

    -

    - - associated(*associations) - -

    +

    associated(*associations)

    - -
    -

    Returns a new relation with joins and where clause to identify associated relations.

    +
    +

    Returns a new relation with joins and where clause to identify associated relations.

    For example, posts that are associated to a related author:

    @@ -118,8 +113,7 @@

    # LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" # WHERE "author"."id" IS NOT NULL -

    - +
    @@ -158,15 +152,10 @@

    -

    - - missing(*associations) - -

    +

    missing(*associations)

    - -
    -

    Returns a new relation with left outer joins and where clause to identify missing relations.

    +
    +

    Returns a new relation with left outer joins and where clause to identify missing relations.

    For example, posts that are missing a related author:

    @@ -184,8 +173,7 @@

    # LEFT OUTER JOIN "comments" ON "comments"."post_id" = "posts"."id" # WHERE "authors"."id" IS NULL AND "comments"."id" IS NULL -

    - +
    @@ -221,15 +209,10 @@

    -

    - - not(opts, *rest) - -

    +

    not(opts, *rest)

    - -
    -

    Returns a new relation expressing WHERE + NOT condition according to the conditions in the arguments.

    +
    +

    Returns a new relation expressing WHERE + NOT condition according to the conditions in the arguments.

    not accepts conditions as a string, array, or hash. See QueryMethods#where for more details on each format.

    @@ -259,8 +242,7 @@

    # SELECT * FROM users WHERE NOT (nullable_country = 'UK') # => [] -

    - +
    diff --git a/src/classes/ActiveRecord/Querying.html b/src/classes/ActiveRecord/Querying.html index 9200347464..e047a0ea34 100644 --- a/src/classes/ActiveRecord/Querying.html +++ b/src/classes/ActiveRecord/Querying.html @@ -70,17 +70,11 @@

    Methods

    Instance Public methods

    -

    - - async_count_by_sql(sql) - -

    +

    async_count_by_sql(sql)

    - -
    -

    Same as count_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as count_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -107,17 +101,11 @@

    -

    - - async_find_by_sql(sql, binds = [], preparable: nil, allow_retry: false, &block) - -

    +

    async_find_by_sql(sql, binds = [], preparable: nil, allow_retry: false, &block)

    - -
    -

    Same as find_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise.

    -
    - +
    +

    Same as find_by_sql but perform the query asynchronously and returns an ActiveRecord::Promise.

    +
    @@ -146,15 +134,10 @@

    -

    - - count_by_sql(sql) - -

    +

    count_by_sql(sql)

    - -
    -

    Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. The use of this method should be restricted to complicated SQL queries that can’t be executed using the ActiveRecord::Calculations class methods. Look into those before using this method, as it could lock you into a specific database engine or require a code change to switch database engines.

    +
    +

    Returns the result of an SQL statement that should only include a COUNT(*) in the SELECT part. The use of this method should be restricted to complicated SQL queries that can’t be executed using the ActiveRecord::Calculations class methods. Look into those before using this method, as it could lock you into a specific database engine or require a code change to switch database engines.

    Product.count_by_sql "SELECT COUNT(*) FROM sales s, customers c WHERE s.customer_id = c.id"
     # => 12
    @@ -164,8 +147,7 @@ 

    Parameters

    • sql - An SQL statement which should return a count query from the database, see the example above.

    -
    - +
    @@ -192,15 +174,10 @@

    Parameters

    -

    - - find_by_sql(sql, binds = [], preparable: nil, allow_retry: false, &block) - -

    +

    find_by_sql(sql, binds = [], preparable: nil, allow_retry: false, &block)

    - -
    -

    Executes a custom SQL query against your database and returns all the results. The results will be returned as an array, with the requested columns encapsulated as attributes of the model you call this method from. For example, if you call Product.find_by_sql, then the results will be returned in a Product object with the attributes you specified in the SQL query.

    +
    +

    Executes a custom SQL query against your database and returns all the results. The results will be returned as an array, with the requested columns encapsulated as attributes of the model you call this method from. For example, if you call Product.find_by_sql, then the results will be returned in a Product object with the attributes you specified in the SQL query.

    If you call a complicated SQL query which spans multiple tables, the columns specified by the SELECT will be attributes of the model, whether or not they are columns of the corresponding table.

    @@ -218,8 +195,7 @@

    Note that building your own SQL query string from user input may expose your application to injection attacks.

    -

    - +
    diff --git a/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html b/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html index d96ef14cd0..ca12d29f03 100644 --- a/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html +++ b/src/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - attr_readonly(*attributes) - -

    +

    attr_readonly(*attributes)

    - -
    -

    Attributes listed as readonly will be used to create a new record. Assigning a new value to a readonly attribute on a persisted record raises an error.

    +
    +

    Attributes listed as readonly will be used to create a new record. Assigning a new value to a readonly attribute on a persisted record raises an error.

    By setting config.active_record.raise_on_assign_to_attr_readonly to false, it will not raise. The value will change in memory, but will not be persisted on save.

    @@ -84,8 +79,7 @@

    Examples

    post.title = "a different title" # raises ActiveRecord::ReadonlyAttributeError post.update(title: "a different title") # raises ActiveRecord::ReadonlyAttributeError -
    - +
    @@ -114,17 +108,11 @@

    Examples

    -

    - - readonly_attributes() - -

    +

    readonly_attributes()

    - -
    -

    Returns an array of all the attributes that have been specified as readonly.

    -
    - +
    +

    Returns an array of all the attributes that have been specified as readonly.

    +
    diff --git a/src/classes/ActiveRecord/RecordInvalid.html b/src/classes/ActiveRecord/RecordInvalid.html index dc4dcc66c8..a810effd6b 100644 --- a/src/classes/ActiveRecord/RecordInvalid.html +++ b/src/classes/ActiveRecord/RecordInvalid.html @@ -92,17 +92,9 @@

    Attributes

    Class Public methods

    -

    - - new(record = nil) - -

    +

    new(record = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/RecordNotDestroyed.html b/src/classes/ActiveRecord/RecordNotDestroyed.html index 02f21d3089..f265cda483 100644 --- a/src/classes/ActiveRecord/RecordNotDestroyed.html +++ b/src/classes/ActiveRecord/RecordNotDestroyed.html @@ -92,17 +92,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, record = nil) - -

    +

    new(message = nil, record = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/RecordNotFound.html b/src/classes/ActiveRecord/RecordNotFound.html index 72c7190a07..811ce36dab 100644 --- a/src/classes/ActiveRecord/RecordNotFound.html +++ b/src/classes/ActiveRecord/RecordNotFound.html @@ -99,17 +99,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, model = nil, primary_key = nil, id = nil) - -

    +

    new(message = nil, model = nil, primary_key = nil, id = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/RecordNotSaved.html b/src/classes/ActiveRecord/RecordNotSaved.html index b0606286a1..f78847cc7a 100644 --- a/src/classes/ActiveRecord/RecordNotSaved.html +++ b/src/classes/ActiveRecord/RecordNotSaved.html @@ -92,17 +92,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, record = nil) - -

    +

    new(message = nil, record = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Reflection/ClassMethods.html b/src/classes/ActiveRecord/Reflection/ClassMethods.html index 6f7903631a..e64297518e 100644 --- a/src/classes/ActiveRecord/Reflection/ClassMethods.html +++ b/src/classes/ActiveRecord/Reflection/ClassMethods.html @@ -88,20 +88,14 @@

    Methods

    Instance Public methods

    -

    - - reflect_on_aggregation(aggregation) - -

    +

    reflect_on_aggregation(aggregation)

    - -
    -

    Returns the AggregateReflection object for the named aggregation (use the symbol).

    +
    +

    Returns the AggregateReflection object for the named aggregation (use the symbol).

    Account.reflect_on_aggregation(:balance) # => the balance AggregateReflection
     
    -
    - +
    @@ -126,17 +120,11 @@

    -

    - - reflect_on_all_aggregations() - -

    +

    reflect_on_all_aggregations()

    - -
    -

    Returns an array of AggregateReflection objects for all the aggregations in the class.

    -
    - +
    +

    Returns an array of AggregateReflection objects for all the aggregations in the class.

    +
    @@ -161,23 +149,17 @@

    -

    - - reflect_on_all_associations(macro = nil) - -

    +

    reflect_on_all_associations(macro = nil)

    - -
    -

    Returns an array of AssociationReflection objects for all the associations in the class. If you only want to reflect on a certain association type, pass in the symbol (:has_many, :has_one, :belongs_to) as the first parameter.

    +
    +

    Returns an array of AssociationReflection objects for all the associations in the class. If you only want to reflect on a certain association type, pass in the symbol (:has_many, :has_one, :belongs_to) as the first parameter.

    Example:

    Account.reflect_on_all_associations             # returns an array of all associations
     Account.reflect_on_all_associations(:has_many)  # returns an array of all has_many associations
     
    -
    - +
    @@ -204,17 +186,11 @@

    -

    - - reflect_on_all_autosave_associations() - -

    +

    reflect_on_all_autosave_associations()

    - -
    -

    Returns an array of AssociationReflection objects for all associations which have :autosave enabled.

    -
    - +
    +

    Returns an array of AssociationReflection objects for all associations which have :autosave enabled.

    +
    @@ -241,21 +217,15 @@

    -

    - - reflect_on_association(association) - -

    +

    reflect_on_association(association)

    - -
    -

    Returns the AssociationReflection object for the association (use the symbol).

    +
    +

    Returns the AssociationReflection object for the association (use the symbol).

    Account.reflect_on_association(:owner)             # returns the owner AssociationReflection
     Invoice.reflect_on_association(:line_items).macro  # returns :has_many
     
    -
    - +
    @@ -280,20 +250,14 @@

    -

    - - reflections() - -

    +

    reflections()

    - -
    -

    Returns a Hash of name of the reflection as the key and an AssociationReflection as the value.

    +
    +

    Returns a Hash of name of the reflection as the key and an AssociationReflection as the value.

    Account.reflections # => {"balance" => AggregateReflection}
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/Reflection/MacroReflection.html b/src/classes/ActiveRecord/Reflection/MacroReflection.html index daa42b903d..2e3cab918f 100644 --- a/src/classes/ActiveRecord/Reflection/MacroReflection.html +++ b/src/classes/ActiveRecord/Reflection/MacroReflection.html @@ -131,17 +131,9 @@

    Attributes

    Class Public methods

    -

    - - new(name, scope, options, active_record) - -

    +

    new(name, scope, options, active_record)

    -
    - -
    - @@ -177,17 +169,11 @@

    Instance Public methods

    -

    - - ==(other_aggregation) - -

    +

    ==(other_aggregation)

    - -
    -

    Returns true if self and other_aggregation have the same name attribute, active_record attribute, and other_aggregation has an options hash assigned to it.

    -
    - +
    +

    Returns true if self and other_aggregation have the same name attribute, active_record attribute, and other_aggregation has an options hash assigned to it.

    +
    @@ -216,17 +202,9 @@

    -

    - - autosave=(autosave) - -

    +

    autosave=(autosave)

    -
    - -
    - @@ -255,17 +233,9 @@

    -

    - - compute_class(name) - -

    +

    compute_class(name)

    -
    - -
    - @@ -290,15 +260,10 @@

    -

    - - klass() - -

    +

    klass()

    - -
    -

    Returns the class for the macro.

    +
    +

    Returns the class for the macro.

    composed_of :balance, class_name: 'Money' returns the Money class has_many :clients returns the Client class

    @@ -311,8 +276,7 @@

    Note: Do not call klass.new or klass.create to instantiate a new association object. Use build_association or create_association instead. This allows plugins to hook into association object creation.

    -

    - +
    @@ -337,17 +301,9 @@

    -

    - - scope_for(relation, owner = nil) - -

    +

    scope_for(relation, owner = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Relation.html b/src/classes/ActiveRecord/Relation.html index dc9255539c..8f22cc45e4 100644 --- a/src/classes/ActiveRecord/Relation.html +++ b/src/classes/ActiveRecord/Relation.html @@ -424,17 +424,9 @@

    Attributes

    Class Public methods

    -

    - - new(model, table: nil, predicate_builder: nil, values: {}) - -

    +

    new(model, table: nil, predicate_builder: nil, values: {})

    -
    - -
    - @@ -479,17 +471,11 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    - -
    -

    Compares two relations for equality.

    -
    - +
    +

    Compares two relations for equality.

    +
    @@ -521,22 +507,16 @@

    -

    - - any?(*args) - -

    +

    any?(*args)

    - -
    -

    Returns true if there are any records.

    +
    +

    Returns true if there are any records.

    When a pattern argument is given, this method checks whether elements in the Enumerable match the pattern via the case-equality operator (===).

    posts.any?(Post) # => true or false
     
    -
    - +
    @@ -564,17 +544,11 @@

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    Returns true if relation is blank.

    -
    - +
    +

    Returns true if relation is blank.

    +
    @@ -599,24 +573,17 @@

    -

    - - build(attributes = nil, &block) - -

    +

    build(attributes = nil, &block)

    -
    - -
    - -
    - Alias for: new -
    +

    + Alias for: + new. +

    @@ -624,15 +591,10 @@

    -

    - - cache_key(timestamp_column = "updated_at") - -

    +

    cache_key(timestamp_column = "updated_at")

    - -
    -

    Returns a stable cache key that can be used to identify this query. The cache key is built with a fingerprint of the SQL query.

    +
    +

    Returns a stable cache key that can be used to identify this query. The cache key is built with a fingerprint of the SQL query.

    Product.where("name like ?", "%Cosmic Encounter%").cache_key
     # => "products/query-1850ab3d302391b85b8693e941286659"
    @@ -649,8 +611,7 @@ 

    Product.where("name like ?", "%Game%").cache_key(:last_reviewed_at)
     
    -

    - +
    @@ -676,17 +637,11 @@

    -

    - - cache_key_with_version() - -

    +

    cache_key_with_version()

    - -
    -

    Returns a cache key along with the version.

    -
    - +
    +

    Returns a cache key along with the version.

    +
    @@ -715,22 +670,16 @@

    -

    - - cache_version(timestamp_column = :updated_at) - -

    +

    cache_version(timestamp_column = :updated_at)

    - -
    -

    Returns a cache version that can be used together with the cache key to form a recyclable caching scheme. The cache version is built with the number of records matching the query, and the timestamp of the last updated record. When a new record comes to match the query, or any of the existing records is updated or deleted, the cache version changes.

    +
    +

    Returns a cache version that can be used together with the cache key to form a recyclable caching scheme. The cache version is built with the number of records matching the query, and the timestamp of the last updated record. When a new record comes to match the query, or any of the existing records is updated or deleted, the cache version changes.

    If the collection is loaded, the method will iterate through the records to generate the timestamp, otherwise it will trigger one SQL query like:

    SELECT COUNT(*), MAX("products"."updated_at") FROM "products" WHERE (name like '%Cosmic Encounter%')
     
    -
    - +
    @@ -758,15 +707,10 @@

    -

    - - create(attributes = nil, &block) - -

    +

    create(attributes = nil, &block)

    - -
    -

    Tries to create a new record with the same scoped attributes defined in the relation. Returns the initialized object if validation fails.

    +
    +

    Tries to create a new record with the same scoped attributes defined in the relation. Returns the initialized object if validation fails.

    Expects arguments in the same format as ActiveRecord::Base.create.

    @@ -784,8 +728,7 @@

    Examples

    users.create(name: nil) # validation on name # => #<User id: nil, name: nil, ...>
    -
    - +
    @@ -815,19 +758,13 @@

    Examples

    -

    - - create!(attributes = nil, &block) - -

    +

    create!(attributes = nil, &block)

    - -
    -

    Similar to create, but calls create! on the base class. Raises an exception if a validation error occurs.

    +
    +

    Similar to create, but calls create! on the base class. Raises an exception if a validation error occurs.

    Expects arguments in the same format as ActiveRecord::Base.create!.

    -
    - +
    @@ -857,15 +794,10 @@

    -

    - - create_or_find_by(attributes, &block) - -

    +

    create_or_find_by(attributes, &block)

    - -
    -

    Attempts to create a record with the given attributes in a table that has a unique database constraint on one or several of its columns. If a row already exists with one or several of these unique constraints, the exception such an insertion would normally raise is caught, and the existing record with those attributes is found using find_by!.

    +
    +

    Attempts to create a record with the given attributes in a table that has a unique database constraint on one or several of its columns. If a row already exists with one or several of these unique constraints, the exception such an insertion would normally raise is caught, and the existing record with those attributes is found using find_by!.

    This is similar to find_or_create_by, but tries to create the record first. As such it is better suited for cases where the record is most likely not to exist yet.

    @@ -885,8 +817,7 @@

    This method will return a record if all given attributes are covered by unique constraints (unless the INSERT -> DELETE -> SELECT race condition is triggered), but if creation was attempted and failed due to validation errors it won’t be persisted, you get what create returns in such situation.

    -

    - +
    @@ -924,17 +855,11 @@

    -

    - - create_or_find_by!(attributes, &block) - -

    +

    create_or_find_by!(attributes, &block)

    - -
    -

    Like create_or_find_by, but calls create! so an exception is raised if the created record is invalid.

    -
    - +
    +

    Like create_or_find_by, but calls create! so an exception is raised if the created record is invalid.

    +
    @@ -972,15 +897,10 @@

    -

    - - delete(id_or_array) - -

    +

    delete(id_or_array)

    - -
    -

    Deletes the row with a primary key matching the id argument, using an SQL DELETE statement, and returns the number of rows deleted. Active Record objects are not instantiated, so the object’s callbacks are not executed, including any :dependent association options.

    +
    +

    Deletes the row with a primary key matching the id argument, using an SQL DELETE statement, and returns the number of rows deleted. Active Record objects are not instantiated, so the object’s callbacks are not executed, including any :dependent association options.

    You can delete multiple rows at once by passing an Array of ids.

    @@ -994,8 +914,7 @@

    Examples

    # Delete multiple rows Todo.delete([2,3,4]) -
    - +
    @@ -1022,15 +941,10 @@

    Examples

    -

    - - delete_all() - -

    +

    delete_all()

    - -
    -

    Deletes the records without instantiating the records first, and hence not calling the #destroy method nor invoking callbacks. This is a single SQL DELETE statement that goes straight to the database, much more efficient than destroy_all. Be careful with relations though, in particular :dependent rules defined on associations are not honored. Returns the number of rows affected.

    +
    +

    Deletes the records without instantiating the records first, and hence not calling the #destroy method nor invoking callbacks. This is a single SQL DELETE statement that goes straight to the database, much more efficient than destroy_all. Be careful with relations though, in particular :dependent rules defined on associations are not honored. Returns the number of rows affected.

    Post.where(person_id: 5).where(category: ['Something', 'Else']).delete_all
     
    @@ -1042,8 +956,7 @@

    Post.distinct.delete_all
     # => ActiveRecord::ActiveRecordError: delete_all doesn't support distinct
     
    -

    - +
    @@ -1090,15 +1003,10 @@

    -

    - - delete_by(*args) - -

    +

    delete_by(*args)

    - -
    -

    Finds and deletes all records matching the specified conditions. This is short-hand for relation.where(condition).delete_all. Returns the number of rows affected.

    +
    +

    Finds and deletes all records matching the specified conditions. This is short-hand for relation.where(condition).delete_all. Returns the number of rows affected.

    If no record is found, returns 0 as zero rows were affected.

    @@ -1106,8 +1014,7 @@

    Person.delete_by(name: 'Spartacus', rating: 4) Person.delete_by("published_at < ?", 2.weeks.ago) -

    - +
    @@ -1132,15 +1039,10 @@

    -

    - - destroy(id) - -

    +

    destroy(id)

    - -
    -

    Destroy an object (or multiple objects) that has the given id. The object is instantiated first, therefore all callbacks and filters are fired off before the object is deleted. This method is less efficient than delete but allows cleanup methods and other actions to be run.

    +
    +

    Destroy an object (or multiple objects) that has the given id. The object is instantiated first, therefore all callbacks and filters are fired off before the object is deleted. This method is less efficient than delete but allows cleanup methods and other actions to be run.

    This essentially finds the object (or multiple objects) with the given id, creates a new object from the attributes, and then calls destroy on it.

    @@ -1158,8 +1060,7 @@

    Examples

    todos = [1,2,3] Todo.destroy(todos) -
    - +
    @@ -1194,15 +1095,10 @@

    Examples

    -

    - - destroy_all() - -

    +

    destroy_all()

    - -
    -

    Destroys the records by instantiating each record and calling its #destroy method. Each object’s callbacks are executed (including :dependent association options). Returns the collection of objects that were destroyed; each will be frozen, to reflect that no changes should be made (since they can’t be persisted).

    +
    +

    Destroys the records by instantiating each record and calling its #destroy method. Each object’s callbacks are executed (including :dependent association options). Returns the collection of objects that were destroyed; each will be frozen, to reflect that no changes should be made (since they can’t be persisted).

    Note: Instantiation, callback execution, and deletion of each record can be time consuming when you’re removing many records at once. It generates at least one SQL DELETE query per record (or possibly more, to enforce your callbacks). If you want to delete many rows quickly, without concern for their associations or callbacks, use delete_all instead.

    @@ -1210,8 +1106,7 @@

    Examples

    Person.where(age: 0..18).destroy_all
     
    -
    - +
    @@ -1236,15 +1131,10 @@

    Examples

    -

    - - destroy_by(*args) - -

    +

    destroy_by(*args)

    - -
    -

    Finds and destroys all records matching the specified conditions. This is short-hand for relation.where(condition).destroy_all. Returns the collection of objects that were destroyed.

    +
    +

    Finds and destroys all records matching the specified conditions. This is short-hand for relation.where(condition).destroy_all. Returns the collection of objects that were destroyed.

    If no record is found, returns empty array.

    @@ -1252,8 +1142,7 @@

    Person.destroy_by(name: 'Spartacus', rating: 4) Person.destroy_by("published_at < ?", 2.weeks.ago) -

    - +
    @@ -1278,17 +1167,11 @@

    -

    - - eager_loading?() - -

    +

    eager_loading?()

    - -
    -

    Returns true if relation needs eager loading.

    -
    - +
    +

    Returns true if relation needs eager loading.

    +
    @@ -1315,17 +1198,11 @@

    -

    - - empty?() - -

    +

    empty?()

    - -
    -

    Returns true if there are no records.

    -
    - +
    +

    Returns true if there are no records.

    +
    @@ -1356,17 +1233,11 @@

    -

    - - encode_with(coder) - -

    +

    encode_with(coder)

    - -
    -

    Serializes the relation objects Array.

    -
    - +
    +

    Serializes the relation objects Array.

    +
    @@ -1391,15 +1262,10 @@

    -

    - - explain(*options) - -

    +

    explain(*options)

    - -
    -

    Runs EXPLAIN on the query or queries triggered by this relation and returns the result as a string. The string is formatted imitating the ones printed by the database shell.

    +
    +

    Runs EXPLAIN on the query or queries triggered by this relation and returns the result as a string. The string is formatted imitating the ones printed by the database shell.

    User.all.explain
     # EXPLAIN SELECT `users`.* FROM `users`
    @@ -1423,8 +1289,7 @@ 

    Please see further details in the Active Record Query Interface guide.

    -
    - +
    @@ -1449,15 +1314,10 @@

    -

    - - find_or_create_by(attributes, &block) - -

    +

    find_or_create_by(attributes, &block)

    - -
    -

    Finds the first record with the given attributes, or creates a record with the attributes if one is not found:

    +
    +

    Finds the first record with the given attributes, or creates a record with the attributes if one is not found:

    # Find the first user named "Penélope" or create a new one.
     User.find_or_create_by(first_name: 'Penélope')
    @@ -1489,8 +1349,7 @@ 

    If creation failed because of a unique constraint, this method will assume it encountered a race condition and will try finding the record once more. If somehow the second find still does not find a record because a concurrent DELETE happened, it will then raise an ActiveRecord::RecordNotFound exception.

    Please note this method is not atomic, it runs first a SELECT, and if there are no results an INSERT is attempted. So if the table doesn’t have a relevant unique constraint it could be the case that you end up with two or more similar records.

    -

    - +
    @@ -1515,17 +1374,11 @@

    -

    - - find_or_create_by!(attributes, &block) - -

    +

    find_or_create_by!(attributes, &block)

    - -
    -

    Like find_or_create_by, but calls create! so an exception is raised if the created record is invalid.

    -
    - +
    +

    Like find_or_create_by, but calls create! so an exception is raised if the created record is invalid.

    +
    @@ -1550,17 +1403,11 @@

    -

    - - find_or_initialize_by(attributes, &block) - -

    +

    find_or_initialize_by(attributes, &block)

    - -
    -

    Like find_or_create_by, but calls new instead of create.

    -
    - +
    +

    Like find_or_create_by, but calls new instead of create.

    +
    @@ -1585,17 +1432,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -1621,19 +1460,13 @@

    -

    - - insert(attributes, returning: nil, unique_by: nil, record_timestamps: nil) - -

    +

    insert(attributes, returning: nil, unique_by: nil, record_timestamps: nil)

    - -
    -

    Inserts a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    +
    +

    Inserts a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    See insert_all for documentation.

    -
    - +
    @@ -1658,19 +1491,13 @@

    -

    - - insert!(attributes, returning: nil, record_timestamps: nil) - -

    +

    insert!(attributes, returning: nil, record_timestamps: nil)

    - -
    -

    Inserts a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    +
    +

    Inserts a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    See insert_all! for more.

    -
    - +
    @@ -1695,15 +1522,10 @@

    -

    - - insert_all(attributes, returning: nil, unique_by: nil, record_timestamps: nil) - -

    +

    insert_all(attributes, returning: nil, unique_by: nil, record_timestamps: nil)

    - -
    -

    Inserts multiple records into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    +
    +

    Inserts multiple records into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    The attributes parameter is an Array of Hashes. Every Hash determines the attributes for a single row and must have the same keys.

    @@ -1762,8 +1584,7 @@

    Example

    { id: 2, title: "Eloquent Ruby" } ])
    -
    - +
    @@ -1788,15 +1609,10 @@

    Example

    -

    - - insert_all!(attributes, returning: nil, record_timestamps: nil) - -

    +

    insert_all!(attributes, returning: nil, record_timestamps: nil)

    - -
    -

    Inserts multiple records into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    +
    +

    Inserts multiple records into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    The attributes parameter is an Array of Hashes. Every Hash determines the attributes for a single row and must have the same keys.

    @@ -1838,8 +1654,7 @@

    Examples

    { id: 1, title: "Eloquent Ruby", author: "Russ" } ]) -
    - +
    @@ -1864,17 +1679,9 @@

    Examples

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -1904,17 +1711,11 @@

    -

    - - joined_includes_values() - -

    +

    joined_includes_values()

    - -
    -

    Joins that are also marked for preloading. In which case we should just eager load them. Note that this is a naive implementation because we could have strings and symbols which represent the same association, but that aren’t matched by this. Also, we could have nested hashes which partially match, e.g. { a: :b } & { a: [:b, :c] }

    -
    - +
    +

    Joins that are also marked for preloading. In which case we should just eager load them. Note that this is a naive implementation because we could have strings and symbols which represent the same association, but that aren’t matched by this. Also, we could have nested hashes which partially match, e.g. { a: :b } & { a: [:b, :c] }

    +
    @@ -1939,20 +1740,14 @@

    -

    - - load(&block) - -

    +

    load(&block)

    - -
    -

    Causes the records to be loaded from the database if they have not been loaded already. You can use this if for some reason you need to explicitly load some records before actually using them. The return value is the relation itself, not the records.

    +
    +

    Causes the records to be loaded from the database if they have not been loaded already. You can use this if for some reason you need to explicitly load some records before actually using them. The return value is the relation itself, not the records.

    Post.where(published: true).load # => #<ActiveRecord::Relation>
     
    -
    - +
    @@ -1982,15 +1777,10 @@

    -

    - - load_async() - -

    +

    load_async()

    - -
    -

    Schedule the query to be performed from a background thread pool.

    +
    +

    Schedule the query to be performed from a background thread pool.

    Post.where(published: true).load_async # => #<ActiveRecord::Relation>
     
    @@ -2003,8 +1793,7 @@

    ASYNC Post Load (0.0ms) (db time 2ms)  SELECT "posts".* FROM "posts" LIMIT 100
     
    -

    - +
    @@ -2044,17 +1833,11 @@

    -

    - - many?() - -

    +

    many?()

    - -
    -

    Returns true if there is more than one record.

    -
    - +
    +

    Returns true if there is more than one record.

    +
    @@ -2083,15 +1866,10 @@

    -

    - - new(attributes = nil, &block) - -

    +

    new(attributes = nil, &block)

    - -
    -

    Initializes new record from relation while maintaining the current scope.

    +
    +

    Initializes new record from relation while maintaining the current scope.

    Expects arguments in the same format as ActiveRecord::Base.new.

    @@ -2104,13 +1882,14 @@

    user = users.new { |user| user.name = 'Oscar' }
     user.name # => Oscar
     
    -

    - +
    -
    - Also aliased as: build -
    +

    + Also aliased as: + + build. +

    @@ -2139,22 +1918,16 @@

    -

    - - none?(*args) - -

    +

    none?(*args)

    - -
    -

    Returns true if there are no records.

    +
    +

    Returns true if there are no records.

    When a pattern argument is given, this method checks whether elements in the Enumerable match the pattern via the case-equality operator (===).

    posts.none?(Comment) # => true or false
     
    -
    - +
    @@ -2182,22 +1955,16 @@

    -

    - - one?(*args) - -

    +

    one?(*args)

    - -
    -

    Returns true if there is exactly one record.

    +
    +

    Returns true if there is exactly one record.

    When a pattern argument is given, this method checks whether elements in the Enumerable match the pattern via the case-equality operator (===).

    posts.one?(Post) # => true or false
     
    -
    - +
    @@ -2226,17 +1993,9 @@

    -

    - - pretty_print(pp) - -

    +

    pretty_print(pp)

    -
    - -
    - @@ -2266,17 +2025,9 @@

    -

    - - readonly?() - -

    +

    readonly?()

    -
    - -
    - @@ -2301,17 +2052,11 @@

    -

    - - reload() - -

    +

    reload()

    - -
    -

    Forces reloading of relation.

    -
    - +
    +

    Forces reloading of relation.

    +
    @@ -2337,17 +2082,9 @@

    -

    - - reset() - -

    +

    reset()

    -
    - -
    - @@ -2380,17 +2117,11 @@

    -

    - - scheduled?() - -

    +

    scheduled?()

    - -
    -

    Returns true if the relation was scheduled on the background thread pool.

    -
    - +
    +

    Returns true if the relation was scheduled on the background thread pool.

    +
    @@ -2415,17 +2146,9 @@

    -

    - - scope_for_create() - -

    +

    scope_for_create()

    -
    - -
    - @@ -2452,15 +2175,10 @@

    -

    - - scoping(all_queries: nil, &block) - -

    +

    scoping(all_queries: nil, &block)

    - -
    -

    Scope all queries to the current scope.

    +
    +

    Scope all queries to the current scope.

    Comment.where(post_id: 1).scoping do
       Comment.first
    @@ -2471,8 +2189,7 @@ 

    If all_queries: true is passed, scoping will apply to all queries for the relation including update and delete on instances. Once all_queries is set to true it cannot be set to false in a nested block.

    Please check unscoped if you want to remove all previous scopes (including the default_scope) during the execution of a block.

    -

    - +
    @@ -2504,17 +2221,11 @@

    -

    - - size() - -

    +

    size()

    - -
    -

    Returns size of the records.

    -
    - +
    +

    Returns size of the records.

    +
    @@ -2543,24 +2254,17 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - -
    - Alias for: to_ary -
    +

    + Alias for: + to_ary. +

    @@ -2568,22 +2272,18 @@

    -

    - - to_ary() - -

    +

    to_ary()

    - -
    -

    Converts relation objects to Array.

    -
    - +
    +

    Converts relation objects to Array.

    +
    -
    - Also aliased as: to_a -
    +

    + Also aliased as: + + to_a. +

    @@ -2607,21 +2307,15 @@

    -

    - - to_sql() - -

    +

    to_sql()

    - -
    -

    Returns sql statement for the relation.

    +
    +

    Returns sql statement for the relation.

    User.where(name: 'Oscar').to_sql
     # SELECT "users".* FROM "users"  WHERE "users"."name" = 'Oscar'
     
    -
    - +
    @@ -2655,15 +2349,10 @@

    -

    - - touch_all(*names, time: nil) - -

    +

    touch_all(*names, time: nil)

    - -
    -

    Touches all records in the current relation, setting the updated_at/updated_on attributes to the current time or the time specified. It does not instantiate the involved models, and it does not trigger Active Record callbacks or validations. This method can be passed attribute names and an optional time argument. If attribute names are passed, they are updated along with updated_at/updated_on attributes. If no time argument is passed, the current time is used as default.

    +
    +

    Touches all records in the current relation, setting the updated_at/updated_on attributes to the current time or the time specified. It does not instantiate the involved models, and it does not trigger Active Record callbacks or validations. This method can be passed attribute names and an optional time argument. If attribute names are passed, they are updated along with updated_at/updated_on attributes. If no time argument is passed, the current time is used as default.

    Examples

    @@ -2683,8 +2372,7 @@

    Examples

    Person.where(name: 'David').touch_all # => "UPDATE \"people\" SET \"updated_at\" = '2018-01-04 22:55:23.132670' WHERE \"people\".\"name\" = 'David'"
    -
    - +
    @@ -2709,15 +2397,10 @@

    Examples

    -

    - - update_all(updates) - -

    +

    update_all(updates)

    - -
    -

    Updates all records in the current relation with details given. This method constructs a single SQL UPDATE statement and sends it straight to the database. It does not instantiate the involved models and it does not trigger Active Record callbacks or validations. However, values passed to update_all will still go through Active Record’s normal type casting and serialization. Returns the number of rows affected.

    +
    +

    Updates all records in the current relation with details given. This method constructs a single SQL UPDATE statement and sends it straight to the database. It does not instantiate the involved models and it does not trigger Active Record callbacks or validations. However, values passed to update_all will still go through Active Record’s normal type casting and serialization. Returns the number of rows affected.

    Note: As Active Record callbacks are not triggered, this method will not automatically update updated_at/updated_on columns.

    @@ -2743,8 +2426,7 @@

    Examples

    # Update all books with 'Rails' in their title Book.where('title LIKE ?', '%Rails%').update_all(title: Arel.sql("title + ' - volume 1'")) -
    - +
    @@ -2808,15 +2490,10 @@

    Examples

    -

    - - update_counters(counters) - -

    +

    update_counters(counters)

    - -
    -

    Updates the counters of the records in the current relation.

    +
    +

    Updates the counters of the records in the current relation.

    Parameters

    • @@ -2832,8 +2509,7 @@

      Examples

      # For Posts by a given author increment the comment_count by 1.
       Post.where(author_id: author.id).update_counters(comment_count: 1)
       
      -
    - +
    @@ -2874,19 +2550,13 @@

    Examples

    -

    - - upsert(attributes, **kwargs) - -

    +

    upsert(attributes, **kwargs)

    - -
    -

    Updates or inserts (upserts) a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    +
    +

    Updates or inserts (upserts) a single record into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    See upsert_all for documentation.

    -
    - +
    @@ -2911,15 +2581,10 @@

    -

    - - upsert_all(attributes, on_duplicate: :update, update_only: nil, returning: nil, unique_by: nil, record_timestamps: nil) - -

    +

    upsert_all(attributes, on_duplicate: :update, update_only: nil, returning: nil, unique_by: nil, record_timestamps: nil)

    - -
    -

    Updates or inserts (upserts) multiple records into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    +
    +

    Updates or inserts (upserts) multiple records into the database in a single SQL INSERT statement. It does not instantiate any models nor does it trigger Active Record callbacks or validations. Though passed values go through Active Record’s type casting and serialization.

    The attributes parameter is an Array of Hashes. Every Hash determines the attributes for a single row and must have the same keys.

    @@ -3009,8 +2674,7 @@

    Examples

    Book.find_by(isbn: "1").title # => "Eloquent Ruby" -
    - +
    @@ -3035,17 +2699,9 @@

    Examples

    -

    - - values() - -

    +

    values()

    -
    - -
    - @@ -3073,17 +2729,9 @@

    Instance Protected methods

    -

    - - load_records(records) - -

    +

    load_records(records)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Result.html b/src/classes/ActiveRecord/Result.html index 9088dfa5b4..ba07b8db1c 100644 --- a/src/classes/ActiveRecord/Result.html +++ b/src/classes/ActiveRecord/Result.html @@ -200,17 +200,9 @@

    Attributes

    Class Public methods

    -

    - - new(columns, rows, column_types = nil, affected_rows: nil) - -

    +

    new(columns, rows, column_types = nil, affected_rows: nil)

    -
    - -
    - @@ -247,17 +239,9 @@

    Instance Public methods

    -

    - - [](idx) - -

    +

    [](idx)

    -
    - -
    - @@ -282,17 +266,11 @@

    -

    - - column_types() - -

    +

    column_types()

    - -
    -

    Returns the ActiveRecord::Type type of all columns. Note that not all database adapters return the result types, so the hash may be empty.

    -
    - +
    +

    Returns the ActiveRecord::Type type of all columns. Note that not all database adapters return the result types, so the hash may be empty.

    +
    @@ -328,21 +306,15 @@

    -

    - - each(&block) - -

    +

    each(&block)

    - -
    -

    Calls the given block once for each element in row collection, passing row as parameter. Each row is a Hash-like, read only object.

    +
    +

    Calls the given block once for each element in row collection, passing row as parameter. Each row is a Hash-like, read only object.

    To get real hashes, use .to_a.each.

    Returns an Enumerator if no block is given.

    -
    - +
    @@ -371,17 +343,11 @@

    -

    - - empty?() - -

    +

    empty?()

    - -
    -

    Returns true if there are no records, otherwise false.

    -
    - +
    +

    Returns true if there are no records, otherwise false.

    +
    @@ -406,17 +372,11 @@

    -

    - - includes_column?(name) - -

    +

    includes_column?(name)

    - -
    -

    Returns true if this result set includes the column named name

    -
    - +
    +

    Returns true if this result set includes the column named name

    +
    @@ -441,17 +401,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -477,17 +429,11 @@

    -

    - - last(n = nil) - -

    +

    last(n = nil)

    - -
    -

    Returns the last record from the rows collection.

    -
    - +
    +

    Returns the last record from the rows collection.

    +
    @@ -512,17 +458,11 @@

    -

    - - length() - -

    +

    length()

    - -
    -

    Returns the number of elements in the rows array.

    -
    - +
    +

    Returns the number of elements in the rows array.

    +
    @@ -547,24 +487,17 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - -
    - Alias for: to_ary -
    +

    + Alias for: + to_ary. +

    @@ -572,22 +505,18 @@

    -

    - - to_ary() - -

    +

    to_ary()

    - -
    -

    Returns an array of hashes representing each row record.

    -
    - +
    +

    Returns an array of hashes representing each row record.

    +
    -
    - Also aliased as: to_a -
    +

    + Also aliased as: + + to_a. +

    diff --git a/src/classes/ActiveRecord/Result/IndexedRow.html b/src/classes/ActiveRecord/Result/IndexedRow.html index 2793ba98c0..cb630dd1e5 100644 --- a/src/classes/ActiveRecord/Result/IndexedRow.html +++ b/src/classes/ActiveRecord/Result/IndexedRow.html @@ -103,17 +103,9 @@

    Methods

    Class Public methods

    -

    - - new(column_indexes, row) - -

    +

    new(column_indexes, row)

    -
    - -
    - @@ -143,17 +135,9 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    -
    - -
    - @@ -182,17 +166,9 @@

    -

    - - [](column) - -

    +

    [](column)

    -
    - -
    - @@ -219,17 +195,9 @@

    -

    - - each_key(&block) - -

    +

    each_key(&block)

    -
    - -
    - @@ -254,17 +222,9 @@

    -

    - - fetch(column) - -

    +

    fetch(column)

    -
    - -
    - @@ -295,17 +255,9 @@

    -

    - - key?(column) - -

    +

    key?(column)

    -
    - -
    - @@ -330,17 +282,9 @@

    -

    - - keys() - -

    +

    keys()

    -
    - -
    - @@ -365,24 +309,17 @@

    -

    - - length() - -

    +

    length()

    -
    - -
    - -
    - Alias for: size -
    +

    + Alias for: + size. +

    @@ -390,22 +327,16 @@

    -

    - - size() - -

    +

    size()

    -
    - -
    - -
    - Also aliased as: length -
    +

    + Also aliased as: + + length. +

    @@ -429,22 +360,16 @@

    -

    - - to_h() - -

    +

    to_h()

    -
    - -
    - -
    - Also aliased as: to_hash -
    +

    + Also aliased as: + + to_hash. +

    @@ -468,24 +393,17 @@

    -

    - - to_hash() - -

    +

    to_hash()

    -
    - -
    - -
    - Alias for: to_h -
    +

    + Alias for: + to_h. +

    diff --git a/src/classes/ActiveRecord/RuntimeRegistry/Stats.html b/src/classes/ActiveRecord/RuntimeRegistry/Stats.html index 1f805ef3de..b98424eab6 100644 --- a/src/classes/ActiveRecord/RuntimeRegistry/Stats.html +++ b/src/classes/ActiveRecord/RuntimeRegistry/Stats.html @@ -105,17 +105,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -147,17 +139,9 @@

    Instance Public methods

    -

    - - reset_runtimes() - -

    +

    reset_runtimes()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/SQLWarning.html b/src/classes/ActiveRecord/SQLWarning.html index 156da810e8..700cd4ee5a 100644 --- a/src/classes/ActiveRecord/SQLWarning.html +++ b/src/classes/ActiveRecord/SQLWarning.html @@ -99,17 +99,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, code = nil, level = nil, sql = nil, connection_pool = nil) - -

    +

    new(message = nil, code = nil, level = nil, sql = nil, connection_pool = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Sanitization/ClassMethods.html b/src/classes/ActiveRecord/Sanitization/ClassMethods.html index 86c4686ae4..3dba90cd8d 100644 --- a/src/classes/ActiveRecord/Sanitization/ClassMethods.html +++ b/src/classes/ActiveRecord/Sanitization/ClassMethods.html @@ -82,24 +82,17 @@

    Methods

    Instance Public methods

    -

    - - sanitize_sql(condition) - -

    +

    sanitize_sql(condition)

    -
    - -
    - - +

    + Alias for: + sanitize_sql_for_conditions. +

    @@ -107,15 +100,10 @@

    -

    - - sanitize_sql_array(ary) - -

    +

    sanitize_sql_array(ary)

    - -
    -

    Accepts an array of conditions. The array has each value sanitized and interpolated into the SQL statement. If using named bind variables in SQL statements where a colon is required verbatim use a backslash to escape.

    +
    +

    Accepts an array of conditions. The array has each value sanitized and interpolated into the SQL statement. If using named bind variables in SQL statements where a colon is required verbatim use a backslash to escape.

    sanitize_sql_array(["name=? and group_id=?", "foo'bar", 4])
     # => "name='foo''bar' and group_id=4"
    @@ -137,8 +125,7 @@ 

    Before using this method, please consider if Arel.sql would be better for your use-case

    -
    - +
    @@ -178,15 +165,10 @@

    -

    - - sanitize_sql_for_assignment(assignments, default_table_name = table_name) - -

    +

    sanitize_sql_for_assignment(assignments, default_table_name = table_name)

    - -
    -

    Accepts an array or hash of SQL conditions and sanitizes them into a valid SQL fragment for a SET clause.

    +
    +

    Accepts an array or hash of SQL conditions and sanitizes them into a valid SQL fragment for a SET clause.

    sanitize_sql_for_assignment(["name=? and group_id=?", nil, 4])
     # => "name=NULL and group_id=4"
    @@ -209,8 +191,7 @@ 

    sanitize_sql_for_assignment(["role = ?", 0])
     # => "role = '0'"
     
    -

    - +
    @@ -239,15 +220,10 @@

    -

    - - sanitize_sql_for_conditions(condition) - -

    +

    sanitize_sql_for_conditions(condition)

    - -
    -

    Accepts an array of SQL conditions and sanitizes them into a valid SQL fragment for a WHERE clause.

    +
    +

    Accepts an array of SQL conditions and sanitizes them into a valid SQL fragment for a WHERE clause.

    sanitize_sql_for_conditions(["name=? and group_id=?", "foo'bar", 4])
     # => "name='foo''bar' and group_id=4"
    @@ -270,13 +246,14 @@ 

    sanitize_sql_for_conditions(["role = ?", 0])
     # => "role = '0'"
     
    -

    - +
    -
    - Also aliased as: sanitize_sql -
    +

    + Also aliased as: + + sanitize_sql. +

    @@ -305,15 +282,10 @@

    -

    - - sanitize_sql_for_order(condition) - -

    +

    sanitize_sql_for_order(condition)

    - -
    -

    Accepts an array, or string of SQL conditions and sanitizes them into a valid SQL fragment for an ORDER clause.

    +
    +

    Accepts an array, or string of SQL conditions and sanitizes them into a valid SQL fragment for an ORDER clause.

    sanitize_sql_for_order([Arel.sql("field(id, ?)"), [1,3,2]])
     # => "field(id, 1,3,2)"
    @@ -321,8 +293,7 @@ 

    sanitize_sql_for_order("id ASC") # => "id ASC"

    -
    - +
    @@ -362,21 +333,15 @@

    -

    - - sanitize_sql_hash_for_assignment(attrs, table) - -

    +

    sanitize_sql_hash_for_assignment(attrs, table)

    - -
    -

    Sanitizes a hash of attribute/value pairs into SQL conditions for a SET clause.

    +
    +

    Sanitizes a hash of attribute/value pairs into SQL conditions for a SET clause.

    sanitize_sql_hash_for_assignment({ status: nil, group_id: 1 }, "posts")
     # => "`posts`.`status` = NULL, `posts`.`group_id` = 1"
     
    -
    - +
    @@ -407,15 +372,10 @@

    -

    - - sanitize_sql_like(string, escape_character = "\\") - -

    +

    sanitize_sql_like(string, escape_character = "\\")

    - -
    -

    Sanitizes a string so that it is safe to use within an SQL LIKE statement. This method uses escape_character to escape all occurrences of itself, “_” and “%”.

    +
    +

    Sanitizes a string so that it is safe to use within an SQL LIKE statement. This method uses escape_character to escape all occurrences of itself, “_” and “%”.

    sanitize_sql_like("100% true!")
     # => "100\\% true!"
    @@ -429,8 +389,7 @@ 

    sanitize_sql_like("snake_cased_string", "!") # => "snake!_cased!_string"

    -
    - +
    diff --git a/src/classes/ActiveRecord/Schema.html b/src/classes/ActiveRecord/Schema.html index 4ad5c01b95..e0f39fb21c 100644 --- a/src/classes/ActiveRecord/Schema.html +++ b/src/classes/ActiveRecord/Schema.html @@ -120,17 +120,9 @@

    Included Modules

    Class Public methods

    -

    - - [](version) - -

    +

    [](version)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html b/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html index d349cb8765..f999fe8039 100644 --- a/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html +++ b/src/classes/ActiveRecord/Schema/Definition/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - define(info = {}, &block) - -

    +

    define(info = {}, &block)

    - -
    -

    Eval the given block. All methods available to the current connection adapter are available within the block, so you can easily use the database definition DSL to build up your schema ( create_table, add_index, etc.).

    +
    +

    Eval the given block. All methods available to the current connection adapter are available within the block, so you can easily use the database definition DSL to build up your schema ( create_table, add_index, etc.).

    The info hash is optional, and if given is used to define metadata about the current schema (currently, only the schema’s version):

    @@ -74,8 +69,7 @@

    ... end -

    - +
    diff --git a/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html b/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html index 736160c30e..3e8afb0da2 100644 --- a/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html +++ b/src/classes/ActiveRecord/Scoping/Default/ClassMethods.html @@ -66,17 +66,11 @@

    Methods

    Instance Public methods

    -

    - - default_scopes?(all_queries: false) - -

    +

    default_scopes?(all_queries: false)

    - -
    -

    Checks if the model has any default scopes. If all_queries is set to true, the method will check if there are any default_scopes for the model where all_queries is true.

    -
    - +
    +

    Checks if the model has any default scopes. If all_queries is set to true, the method will check if there are any default_scopes for the model where all_queries is true.

    +
    @@ -105,15 +99,10 @@

    -

    - - unscoped(&block) - -

    +

    unscoped(&block)

    - -
    -

    Returns a scope for the model without the previously set scopes.

    +
    +

    Returns a scope for the model without the previously set scopes.

    class Post < ActiveRecord::Base
       belongs_to :user
    @@ -140,8 +129,7 @@ 

    Post.limit(10) # Fires "SELECT * FROM posts LIMIT 10" }

    -
    - +
    @@ -169,15 +157,10 @@

    Instance Private methods

    -

    - - default_scope(scope = nil, all_queries: nil, &block) - -

    +

    default_scope(scope = nil, all_queries: nil, &block)

    - -
    -

    Use this macro in your model to set a default scope for all operations on the model.

    +
    +

    Use this macro in your model to set a default scope for all operations on the model.

    class Article < ActiveRecord::Base
       default_scope { where(published: true) }
    @@ -229,8 +212,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html b/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html index 32140100d0..988d8b4904 100644 --- a/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html +++ b/src/classes/ActiveRecord/Scoping/Named/ClassMethods.html @@ -66,15 +66,10 @@

    Methods

    Instance Public methods

    -

    - - all(all_queries: nil) - -

    +

    all(all_queries: nil)

    - -
    -

    Returns an ActiveRecord::Relation scope object.

    +
    +

    Returns an ActiveRecord::Relation scope object.

    posts = Post.all
     posts.size # Fires "select count(*) from  posts" and returns the count
    @@ -86,8 +81,7 @@ 

    You can define a scope that applies to all finders using default_scope.

    -
    - +
    @@ -122,17 +116,11 @@

    -

    - - default_scoped(scope = relation, all_queries: nil) - -

    +

    default_scoped(scope = relation, all_queries: nil)

    - -
    -

    Returns a scope for the model with default scopes.

    -
    - +
    +

    Returns a scope for the model with default scopes.

    +
    @@ -157,15 +145,10 @@

    -

    - - scope(name, body, &block) - -

    +

    scope(name, body, &block)

    - -
    -

    Adds a class method for retrieving and querying objects. The method is intended to return an ActiveRecord::Relation object, which is composable with other scopes. If it returns nil or false, an all scope is returned instead.

    +
    +

    Adds a class method for retrieving and querying objects. The method is intended to return an ActiveRecord::Relation object, which is composable with other scopes. If it returns nil or false, an all scope is returned instead.

    A scope represents a narrowing of a database query, such as where(color: :red).select('shirts.*').includes(:washing_instructions).

    @@ -241,8 +224,7 @@

    Article.published.featured.latest_article
     Article.featured.titles
     
    -

    - +
    diff --git a/src/classes/ActiveRecord/SecurePassword/ClassMethods.html b/src/classes/ActiveRecord/SecurePassword/ClassMethods.html index e74deaccda..9c62395517 100644 --- a/src/classes/ActiveRecord/SecurePassword/ClassMethods.html +++ b/src/classes/ActiveRecord/SecurePassword/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - authenticate_by(attributes) - -

    +

    authenticate_by(attributes)

    - -
    -

    Given a set of attributes, finds a record using the non-password attributes, and then authenticates that record using the password attributes. Returns the record if authentication succeeds; otherwise, returns nil.

    +
    +

    Given a set of attributes, finds a record using the non-password attributes, and then authenticates that record using the password attributes. Returns the record if authentication succeeds; otherwise, returns nil.

    Regardless of whether a record is found, authenticate_by will cryptographically digest the given password attributes. This behavior helps mitigate timing-based enumeration attacks, wherein an attacker can determine if a passworded record exists even without knowing the password.

    @@ -90,8 +85,7 @@

    Examples

    User.authenticate_by(email: "jdoe@example.com") # => ArgumentError User.authenticate_by(password: "abc123") # => ArgumentError -
    - +
    diff --git a/src/classes/ActiveRecord/SecureToken/ClassMethods.html b/src/classes/ActiveRecord/SecureToken/ClassMethods.html index 5349797af0..36cb1598c9 100644 --- a/src/classes/ActiveRecord/SecureToken/ClassMethods.html +++ b/src/classes/ActiveRecord/SecureToken/ClassMethods.html @@ -62,17 +62,9 @@

    Methods

    Instance Public methods

    -

    - - generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH) - -

    +

    generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)

    -
    - -
    - @@ -97,15 +89,10 @@

    -

    - - has_secure_token(attribute = :token, length: MINIMUM_TOKEN_LENGTH, on: ActiveRecord.generate_secure_token_on) - -

    +

    has_secure_token(attribute = :token, length: MINIMUM_TOKEN_LENGTH, on: ActiveRecord.generate_secure_token_on)

    - -
    -

    Example using has_secure_token

    +
    +

    Example using has_secure_token

    # Schema: User(token:string, auth_token:string)
     class User < ActiveRecord::Base
    @@ -133,8 +120,7 @@ 

    Options

    The callback when the value is generated. When called with on: :initialize, the value is generated in an after_initialize callback, otherwise the value will be used in a before_ callback. When not specified, :on will use the value of config.active_record.generate_secure_token_on, which defaults to :initialize starting in Rails 7.1.

    -
    - +
    diff --git a/src/classes/ActiveRecord/Serialization.html b/src/classes/ActiveRecord/Serialization.html index 98fad3d25c..2361323bec 100644 --- a/src/classes/ActiveRecord/Serialization.html +++ b/src/classes/ActiveRecord/Serialization.html @@ -78,17 +78,9 @@

    Included Modules

    Instance Public methods

    -

    - - serializable_hash(options = nil) - -

    +

    serializable_hash(options = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/SignedId.html b/src/classes/ActiveRecord/SignedId.html index cb0cf1126e..55c471faa3 100644 --- a/src/classes/ActiveRecord/SignedId.html +++ b/src/classes/ActiveRecord/SignedId.html @@ -82,17 +82,11 @@

    Methods

    Class Public methods

    -

    - - signed_id_verifier_secret - -

    +

    signed_id_verifier_secret

    - -
    -

    Set the secret used for the signed id verifier instance when using Active Record outside of Rails. Within Rails, this is automatically set using the Rails application key generator.

    -
    - +
    +

    Set the secret used for the signed id verifier instance when using Active Record outside of Rails. Within Rails, this is automatically set using the Rails application key generator.

    +
    @@ -120,15 +114,10 @@

    Instance Public methods

    -

    - - signed_id(expires_in: nil, expires_at: nil, purpose: nil) - -

    +

    signed_id(expires_in: nil, expires_at: nil, purpose: nil)

    - -
    -

    Returns a signed id that’s generated using a preconfigured ActiveSupport::MessageVerifier instance.

    +
    +

    Returns a signed id that’s generated using a preconfigured ActiveSupport::MessageVerifier instance.

    This signed id is tamper proof, so it’s safe to send in an email or otherwise share with the outside world. However, as with any message signed with a ActiveSupport::MessageVerifier, the signed id is not encrypted. It’s just encoded and protected against tampering.

    @@ -142,8 +131,7 @@

    And you then change your find_signed calls to require this new purpose. Any old signed ids that were not created with the purpose will no longer find the record.

    -

    - +
    diff --git a/src/classes/ActiveRecord/SignedId/ClassMethods.html b/src/classes/ActiveRecord/SignedId/ClassMethods.html index a9fa242875..6f82e243f2 100644 --- a/src/classes/ActiveRecord/SignedId/ClassMethods.html +++ b/src/classes/ActiveRecord/SignedId/ClassMethods.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - find_signed(signed_id, purpose: nil, on_rotation: nil) - -

    +

    find_signed(signed_id, purpose: nil, on_rotation: nil)

    - -
    -

    Lets you find a record based on a signed id that’s safe to put into the world without risk of tampering. This is particularly useful for things like password reset or email verification, where you want the bearer of the signed id to be able to interact with the underlying record, but usually only within a certain time period.

    +
    +

    Lets you find a record based on a signed id that’s safe to put into the world without risk of tampering. This is particularly useful for things like password reset or email verification, where you want the bearer of the signed id to be able to interact with the underlying record, but usually only within a certain time period.

    You set the time period that the signed id is valid for during generation, using the instance method signed_id(expires_in: 15.minutes). If the time has elapsed before a signed find is attempted, the signed id will no longer be valid, and nil is returned.

    @@ -96,8 +91,7 @@

    Examples

    travel_back User.find_signed signed_id, purpose: :password_reset # => User.first
    -
    - +
    @@ -127,15 +121,10 @@

    Examples

    -

    - - find_signed!(signed_id, purpose: nil, on_rotation: nil) - -

    +

    find_signed!(signed_id, purpose: nil, on_rotation: nil)

    - -
    -

    Works like find_signed, but will raise an ActiveSupport::MessageVerifier::InvalidSignature exception if the signed_id has either expired, has a purpose mismatch, is for another record, or has been tampered with. It will also raise an ActiveRecord::RecordNotFound exception if the valid signed id can’t find a record.

    +
    +

    Works like find_signed, but will raise an ActiveSupport::MessageVerifier::InvalidSignature exception if the signed_id has either expired, has a purpose mismatch, is for another record, or has been tampered with. It will also raise an ActiveRecord::RecordNotFound exception if the valid signed id can’t find a record.

    Examples

    @@ -145,8 +134,7 @@

    Examples

    User.first.destroy User.find_signed! signed_id # => ActiveRecord::RecordNotFound -
    - +
    @@ -174,17 +162,9 @@

    Examples

    -

    - - signed_id_verifier() - -

    +

    signed_id_verifier()

    -
    - -
    - @@ -228,17 +208,11 @@

    -

    - - signed_id_verifier=(verifier) - -

    +

    signed_id_verifier=(verifier)

    - -
    -

    Allows you to pass in a custom verifier used for the signed ids. This also allows you to use different verifiers for different classes. This is also helpful if you need to rotate keys, as you can prepare your custom verifier for that in advance. See ActiveSupport::MessageVerifier for details.

    -
    - +
    +

    Allows you to pass in a custom verifier used for the signed ids. This also allows you to use different verifiers for different classes. This is also helpful if you need to rotate keys, as you can prepare your custom verifier for that in advance. See ActiveSupport::MessageVerifier for details.

    +
    diff --git a/src/classes/ActiveRecord/SignedId/DeprecateSignedIdVerifierSecret.html b/src/classes/ActiveRecord/SignedId/DeprecateSignedIdVerifierSecret.html index 515660ead5..b774ddf1f2 100644 --- a/src/classes/ActiveRecord/SignedId/DeprecateSignedIdVerifierSecret.html +++ b/src/classes/ActiveRecord/SignedId/DeprecateSignedIdVerifierSecret.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - signed_id_verifier_secret=(secret) - -

    +

    signed_id_verifier_secret=(secret)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/SoleRecordExceeded.html b/src/classes/ActiveRecord/SoleRecordExceeded.html index 07ea9dfc8c..4cadcd0508 100644 --- a/src/classes/ActiveRecord/SoleRecordExceeded.html +++ b/src/classes/ActiveRecord/SoleRecordExceeded.html @@ -83,17 +83,9 @@

    Attributes

    Class Public methods

    -

    - - new(record = nil) - -

    +

    new(record = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/SpawnMethods.html b/src/classes/ActiveRecord/SpawnMethods.html index d0f21b6192..055242a5d7 100644 --- a/src/classes/ActiveRecord/SpawnMethods.html +++ b/src/classes/ActiveRecord/SpawnMethods.html @@ -66,21 +66,15 @@

    Methods

    Instance Public methods

    -

    - - except(*skips) - -

    +

    except(*skips)

    - -
    -

    Removes the condition(s) specified in skips from the query.

    +
    +

    Removes the condition(s) specified in skips from the query.

    Post.order('id asc').except(:order)                  # removes the order condition
     Post.where('id > 10').order('id asc').except(:where) # removes the where condition but keeps the order
     
    -
    - +
    @@ -105,15 +99,10 @@

    -

    - - merge(other, *rest) - -

    +

    merge(other, *rest)

    - -
    -

    Merges in the conditions from other, if other is an ActiveRecord::Relation. Returns an array representing the intersection of the resulting records with other, if other is an array.

    +
    +

    Merges in the conditions from other, if other is an ActiveRecord::Relation. Returns an array representing the intersection of the resulting records with other, if other is an array.

    Post.where(published: true).joins(:comments).merge( Comment.where(spam: false) )
     # Performs a single join query with both where conditions.
    @@ -133,8 +122,7 @@ 

    This is mainly intended for sharing common conditions between multiple associations.

    For conditions that exist in both relations, those from other will take precedence. To find the intersection of two relations, use QueryMethods#and.

    -

    - +
    @@ -165,21 +153,15 @@

    -

    - - only(*onlies) - -

    +

    only(*onlies)

    - -
    -

    Keeps only the condition(s) specified in onlies in the query, removing all others.

    +
    +

    Keeps only the condition(s) specified in onlies in the query, removing all others.

    Post.order('id asc').only(:where)         # keeps only the where condition, removes the order
     Post.order('id asc').only(:where, :order) # keeps only the where and order conditions
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/StaleObjectError.html b/src/classes/ActiveRecord/StaleObjectError.html index e24f2d7668..cd269cc0c5 100644 --- a/src/classes/ActiveRecord/StaleObjectError.html +++ b/src/classes/ActiveRecord/StaleObjectError.html @@ -93,17 +93,9 @@

    Attributes

    Class Public methods

    -

    - - new(record = nil, attempted_action = nil) - -

    +

    new(record = nil, attempted_action = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html b/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html index a6a17173f7..94b27371f7 100644 --- a/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html +++ b/src/classes/ActiveRecord/StatementCache/PartialQueryCollector.html @@ -101,17 +101,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -141,17 +133,9 @@

    Instance Public methods

    -

    - - <<(str) - -

    +

    <<(str)

    -
    - -
    - @@ -177,17 +161,9 @@

    -

    - - add_bind(obj, &) - -

    +

    add_bind(obj, &)

    -
    - -
    - @@ -214,17 +190,9 @@

    -

    - - add_binds(binds, proc_for_binds = nil, &) - -

    +

    add_binds(binds, proc_for_binds = nil, &)

    -
    - -
    - @@ -254,17 +222,9 @@

    -

    - - value() - -

    +

    value()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/StatementInvalid.html b/src/classes/ActiveRecord/StatementInvalid.html index 0affa09b18..aa0c0eb4fc 100644 --- a/src/classes/ActiveRecord/StatementInvalid.html +++ b/src/classes/ActiveRecord/StatementInvalid.html @@ -97,17 +97,9 @@

    Attributes

    Class Public methods

    -

    - - new(message = nil, sql: nil, binds: nil, connection_pool: nil) - -

    +

    new(message = nil, sql: nil, binds: nil, connection_pool: nil)

    -
    - -
    - @@ -138,17 +130,9 @@

    Instance Public methods

    -

    - - set_query(sql, binds) - -

    +

    set_query(sql, binds)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Store.html b/src/classes/ActiveRecord/Store.html index 5a81cf743b..794b4411f0 100644 --- a/src/classes/ActiveRecord/Store.html +++ b/src/classes/ActiveRecord/Store.html @@ -174,17 +174,9 @@

    Attributes

    Instance Private methods

    -

    - - read_store_attribute(store_attribute, key) - -

    +

    read_store_attribute(store_attribute, key)

    -
    - -
    - @@ -210,17 +202,9 @@

    -

    - - write_store_attribute(store_attribute, key, value) - -

    +

    write_store_attribute(store_attribute, key, value)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Store/ClassMethods.html b/src/classes/ActiveRecord/Store/ClassMethods.html index 592d3ec0d6..beae3e6bf0 100644 --- a/src/classes/ActiveRecord/Store/ClassMethods.html +++ b/src/classes/ActiveRecord/Store/ClassMethods.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - store(store_attribute, options = {}) - -

    +

    store(store_attribute, options = {})

    -
    - -
    - @@ -103,17 +95,9 @@

    -

    - - store_accessor(store_attribute, *keys, prefix: nil, suffix: nil) - -

    +

    store_accessor(store_attribute, *keys, prefix: nil, suffix: nil)

    -
    - -
    - @@ -219,17 +203,9 @@

    -

    - - stored_attributes() - -

    +

    stored_attributes()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Suppressor/ClassMethods.html b/src/classes/ActiveRecord/Suppressor/ClassMethods.html index 56b1050293..fc327f890f 100644 --- a/src/classes/ActiveRecord/Suppressor/ClassMethods.html +++ b/src/classes/ActiveRecord/Suppressor/ClassMethods.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - suppress(&block) - -

    +

    suppress(&block)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Tasks/DatabaseTasks.html b/src/classes/ActiveRecord/Tasks/DatabaseTasks.html index f1b8454a74..9e30c3af11 100644 --- a/src/classes/ActiveRecord/Tasks/DatabaseTasks.html +++ b/src/classes/ActiveRecord/Tasks/DatabaseTasks.html @@ -335,23 +335,17 @@

    Attributes

    Class Public methods

    -

    - - structure_dump_flags - -

    +

    structure_dump_flags

    - -
    -

    Extra flags passed to database CLI tool (mysqldump/pg_dump) when calling db:schema:dump It can be used as a string/array (the typical case) or a hash (when you use multiple adapters) Example:

    +
    +

    Extra flags passed to database CLI tool (mysqldump/pg_dump) when calling db:schema:dump It can be used as a string/array (the typical case) or a hash (when you use multiple adapters) Example:

    ActiveRecord::Tasks::DatabaseTasks.structure_dump_flags = {
       mysql2: ['--no-defaults', '--skip-add-drop-table'],
       postgresql: '--no-tablespaces'
     }
     
    -
    - +
    @@ -375,17 +369,11 @@

    -

    - - structure_load_flags - -

    +

    structure_load_flags

    - -
    -

    Extra flags passed to database CLI tool when calling db:schema:load It can be used as a string/array (the typical case) or a hash (when you use multiple adapters)

    -
    - +
    +

    Extra flags passed to database CLI tool when calling db:schema:load It can be used as a string/array (the typical case) or a hash (when you use multiple adapters)

    +
    @@ -413,17 +401,9 @@

    Instance Public methods

    -

    - - cache_dump_filename(db_config, schema_cache_path: nil) - -

    +

    cache_dump_filename(db_config, schema_cache_path: nil)

    -
    - -
    - @@ -450,17 +430,9 @@

    -

    - - charset(configuration, *arguments) - -

    +

    charset(configuration, *arguments)

    -
    - -
    - @@ -486,17 +458,9 @@

    -

    - - charset_current(env_name = env, db_name = name) - -

    +

    charset_current(env_name = env, db_name = name)

    -
    - -
    - @@ -522,17 +486,9 @@

    -

    - - check_protected_environments!(environment = env) - -

    +

    check_protected_environments!(environment = env)

    -
    - -
    - @@ -561,17 +517,9 @@

    -

    - - check_schema_file(filename) - -

    +

    check_schema_file(filename)

    -
    - -
    - @@ -600,17 +548,9 @@

    -

    - - check_target_version() - -

    +

    check_target_version()

    -
    - -
    - @@ -637,17 +577,9 @@

    -

    - - clear_schema_cache(filename) - -

    +

    clear_schema_cache(filename)

    -
    - -
    - @@ -672,17 +604,9 @@

    -

    - - collation(configuration, *arguments) - -

    +

    collation(configuration, *arguments)

    -
    - -
    - @@ -708,17 +632,9 @@

    -

    - - collation_current(env_name = env, db_name = name) - -

    +

    collation_current(env_name = env, db_name = name)

    -
    - -
    - @@ -744,17 +660,9 @@

    -

    - - create(configuration, *arguments) - -

    +

    create(configuration, *arguments)

    -
    - -
    - @@ -787,17 +695,9 @@

    -

    - - create_all() - -

    +

    create_all()

    -
    - -
    - @@ -826,17 +726,9 @@

    -

    - - create_current(environment = env, name = nil) - -

    +

    create_current(environment = env, name = nil)

    -
    - -
    - @@ -863,17 +755,9 @@

    -

    - - db_dir() - -

    +

    db_dir()

    -
    - -
    - @@ -898,17 +782,9 @@

    -

    - - drop(configuration, *arguments) - -

    +

    drop(configuration, *arguments)

    -
    - -
    - @@ -941,17 +817,9 @@

    -

    - - drop_all() - -

    +

    drop_all()

    -
    - -
    - @@ -976,17 +844,9 @@

    -

    - - drop_current(environment = env) - -

    +

    drop_current(environment = env)

    -
    - -
    - @@ -1011,17 +871,9 @@

    -

    - - dump_all() - -

    +

    dump_all()

    -
    - -
    - @@ -1055,22 +907,16 @@

    -

    - - dump_schema_cache(conn_or_pool, filename) - -

    +

    dump_schema_cache(conn_or_pool, filename)

    - -
    -

    Dumps the schema cache in YAML format for the connection into the file

    +
    +

    Dumps the schema cache in YAML format for the connection into the file

    Examples

    ActiveRecord::Tasks::DatabaseTasks.dump_schema_cache(ActiveRecord::Base.lease_connection, "tmp/schema_dump.yaml")
     
    -
    - +
    @@ -1095,17 +941,9 @@

    Examples

    -

    - - env() - -

    +

    env()

    -
    - -
    - @@ -1130,17 +968,9 @@

    -

    - - fixtures_path() - -

    +

    fixtures_path()

    -
    - -
    - @@ -1169,17 +999,9 @@

    -

    - - load_schema_current(format = nil, file = nil, environment = env) - -

    +

    load_schema_current(format = nil, file = nil, environment = env)

    -
    - -
    - @@ -1208,17 +1030,9 @@

    -

    - - load_seed() - -

    +

    load_seed()

    -
    - -
    - @@ -1249,17 +1063,9 @@

    -

    - - migrate(version = nil, skip_initialize: false) - -

    +

    migrate(version = nil, skip_initialize: false)

    -
    - -
    - @@ -1303,17 +1109,9 @@

    -

    - - migrate_all() - -

    +

    migrate_all()

    -
    - -
    - @@ -1353,17 +1151,9 @@

    -

    - - migrate_status() - -

    +

    migrate_status()

    -
    - -
    - @@ -1399,17 +1189,9 @@

    -

    - - migrations_paths() - -

    +

    migrations_paths()

    -
    - -
    - @@ -1434,17 +1216,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -1469,17 +1243,9 @@

    -

    - - prepare_all() - -

    +

    prepare_all()

    -
    - -
    - @@ -1534,17 +1300,9 @@

    -

    - - purge(configuration) - -

    +

    purge(configuration)

    -
    - -
    - @@ -1570,17 +1328,9 @@

    -

    - - purge_all() - -

    +

    purge_all()

    -
    - -
    - @@ -1605,17 +1355,9 @@

    -

    - - purge_current(environment = env) - -

    +

    purge_current(environment = env)

    -
    - -
    - @@ -1642,17 +1384,9 @@

    -

    - - register_task(pattern, task) - -

    +

    register_task(pattern, task)

    -
    - -
    - @@ -1678,17 +1412,9 @@

    -

    - - root() - -

    +

    root()

    -
    - -
    - @@ -1713,17 +1439,9 @@

    -

    - - schema_dump_path(db_config, format = db_config.schema_format) - -

    +

    schema_dump_path(db_config, format = db_config.schema_format)

    -
    - -
    - @@ -1757,17 +1475,9 @@

    -

    - - schema_up_to_date?(configuration, _ = nil, file = nil) - -

    +

    schema_up_to_date?(configuration, _ = nil, file = nil)

    -
    - -
    - @@ -1804,17 +1514,9 @@

    -

    - - seed_loader() - -

    +

    seed_loader()

    -
    - -
    - @@ -1839,17 +1541,9 @@

    -

    - - structure_dump(configuration, *arguments) - -

    +

    structure_dump(configuration, *arguments)

    -
    - -
    - @@ -1877,17 +1571,9 @@

    -

    - - structure_load(configuration, *arguments) - -

    +

    structure_load(configuration, *arguments)

    -
    - -
    - @@ -1915,17 +1601,9 @@

    -

    - - target_version() - -

    +

    target_version()

    -
    - -
    - @@ -1950,17 +1628,9 @@

    -

    - - truncate_all(environment = env) - -

    +

    truncate_all(environment = env)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/TestFixtures.html b/src/classes/ActiveRecord/TestFixtures.html index ddf6ac221b..e483176193 100644 --- a/src/classes/ActiveRecord/TestFixtures.html +++ b/src/classes/ActiveRecord/TestFixtures.html @@ -78,17 +78,11 @@

    Methods

    Class Public methods

    -

    - - fixture_paths - -

    +

    fixture_paths

    - -
    -

    Returns the ActiveRecord::FixtureSet collection

    -
    - +
    +

    Returns the ActiveRecord::FixtureSet collection

    +
    @@ -101,17 +95,9 @@

    -

    - - fixture_paths=(fixture_paths) - -

    +

    fixture_paths=(fixture_paths)

    -
    - -
    - @@ -139,21 +125,15 @@

    Instance Public methods

    -

    - - fixture(fixture_set_name, *fixture_names) - -

    +

    fixture(fixture_set_name, *fixture_names)

    - -
    -

    Generic fixture accessor for fixture names that may conflict with other methods.

    +
    +

    Generic fixture accessor for fixture names that may conflict with other methods.

    assert_equal "Ruby on Rails", web_sites(:rubyonrails).name
     assert_equal "Ruby on Rails", fixture(:web_sites, :rubyonrails).name
     
    -
    - +
    diff --git a/src/classes/ActiveRecord/TestFixtures/ClassMethods.html b/src/classes/ActiveRecord/TestFixtures/ClassMethods.html index 779c777615..3650aa9af7 100644 --- a/src/classes/ActiveRecord/TestFixtures/ClassMethods.html +++ b/src/classes/ActiveRecord/TestFixtures/ClassMethods.html @@ -82,17 +82,9 @@

    Methods

    Instance Public methods

    -

    - - fixtures(*fixture_set_names) - -

    +

    fixtures(*fixture_set_names)

    -
    - -
    - @@ -129,15 +121,10 @@

    -

    - - set_fixture_class(class_names = {}) - -

    +

    set_fixture_class(class_names = {})

    - -
    -

    Sets the model class for a fixture when the class name cannot be inferred from the fixture name.

    +
    +

    Sets the model class for a fixture when the class name cannot be inferred from the fixture name.

    Examples:

    @@ -146,8 +133,7 @@

    The keys must be the fixture names, that coincide with the short paths to the fixture files.

    -

    - +
    @@ -172,17 +158,9 @@

    -

    - - setup_fixture_accessors(fixture_set_names = nil) - -

    +

    setup_fixture_accessors(fixture_set_names = nil)

    -
    - -
    - @@ -216,17 +194,11 @@

    -

    - - skip_transactional_tests_for_database(database_name) - -

    +

    skip_transactional_tests_for_database(database_name)

    - -
    -

    Do not use transactional tests for the given database. This overrides the default setting as defined by ‘use_transactional_tests`, which applies to all database connection pools not explicitly configured here.

    -
    - +
    +

    Do not use transactional tests for the given database. This overrides the default setting as defined by ‘use_transactional_tests`, which applies to all database connection pools not explicitly configured here.

    +
    @@ -251,17 +223,11 @@

    -

    - - use_transactional_tests_for_database(database_name, enabled = true) - -

    +

    use_transactional_tests_for_database(database_name, enabled = true)

    - -
    -

    Enable or disable transactions per database. This overrides the default setting as defined by ‘use_transactional_tests`, which applies to all database connection pools not explicitly configured here.

    -
    - +
    +

    Enable or disable transactions per database. This overrides the default setting as defined by ‘use_transactional_tests`, which applies to all database connection pools not explicitly configured here.

    +
    @@ -286,17 +252,11 @@

    -

    - - uses_transaction(*methods) - -

    +

    uses_transaction(*methods)

    - -
    -

    Prevents automatically wrapping each specified test in a transaction, to allow application logic transactions to be tested in a top-level (non-nested) context.

    -
    - +
    +

    Prevents automatically wrapping each specified test in a transaction, to allow application logic transactions to be tested in a top-level (non-nested) context.

    +
    @@ -322,17 +282,9 @@

    -

    - - uses_transaction?(method) - -

    +

    uses_transaction?(method)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/TokenFor.html b/src/classes/ActiveRecord/TokenFor.html index de350e5973..171d5c7c81 100644 --- a/src/classes/ActiveRecord/TokenFor.html +++ b/src/classes/ActiveRecord/TokenFor.html @@ -73,19 +73,13 @@

    Methods

    Instance Public methods

    -

    - - generate_token_for(purpose) - -

    +

    generate_token_for(purpose)

    - -
    -

    Generates a token for a predefined purpose.

    +
    +

    Generates a token for a predefined purpose.

    Use ClassMethods#generates_token_for to define a token purpose and behavior.

    -
    - +
    diff --git a/src/classes/ActiveRecord/TokenFor/ClassMethods.html b/src/classes/ActiveRecord/TokenFor/ClassMethods.html index bd89fc3240..85c9dea6b2 100644 --- a/src/classes/ActiveRecord/TokenFor/ClassMethods.html +++ b/src/classes/ActiveRecord/TokenFor/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - generates_token_for(purpose, expires_in: nil, &block) - -

    +

    generates_token_for(purpose, expires_in: nil, &block)

    - -
    -

    Defines the behavior of tokens generated for a specific purpose. A token can be generated by calling TokenFor#generate_token_for on a record. Later, that record can be fetched by calling find_by_token_for (or find_by_token_for!) with the same purpose and token.

    +
    +

    Defines the behavior of tokens generated for a specific purpose. A token can be generated by calling TokenFor#generate_token_for on a record. Later, that record can be fetched by calling find_by_token_for (or find_by_token_for!) with the same purpose and token.

    Tokens are signed so that they are tamper-proof. Thus they can be exposed to outside world as, for example, password reset tokens.

    @@ -97,8 +92,7 @@

    Examples

    user.update!(password: "new password") User.find_by_token_for(:password_reset, token) # => nil -
    - +
    diff --git a/src/classes/ActiveRecord/TokenFor/RelationMethods.html b/src/classes/ActiveRecord/TokenFor/RelationMethods.html index 010f9b4b06..bbad603c87 100644 --- a/src/classes/ActiveRecord/TokenFor/RelationMethods.html +++ b/src/classes/ActiveRecord/TokenFor/RelationMethods.html @@ -62,17 +62,11 @@

    Methods

    Instance Public methods

    -

    - - find_by_token_for(purpose, token) - -

    +

    find_by_token_for(purpose, token)

    - -
    -

    Finds a record using a given token for a predefined purpose. Returns nil if the token is invalid or the record was not found.

    -
    - +
    +

    Finds a record using a given token for a predefined purpose. Returns nil if the token is invalid or the record was not found.

    +
    @@ -98,17 +92,11 @@

    -

    - - find_by_token_for!(purpose, token) - -

    +

    find_by_token_for!(purpose, token)

    - -
    -

    Finds a record using a given token for a predefined purpose. Raises ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if the token is valid but the record was not found.

    -
    - +
    +

    Finds a record using a given token for a predefined purpose. Raises ActiveSupport::MessageVerifier::InvalidSignature if the token is invalid (e.g. expired, bad format, etc). Raises ActiveRecord::RecordNotFound if the token is valid but the record was not found.

    +
    diff --git a/src/classes/ActiveRecord/Transaction.html b/src/classes/ActiveRecord/Transaction.html index 878ad5ed1c..fefa1df783 100644 --- a/src/classes/ActiveRecord/Transaction.html +++ b/src/classes/ActiveRecord/Transaction.html @@ -158,23 +158,17 @@

    Constants

    Instance Public methods

    -

    - - after_commit(&block) - -

    +

    after_commit(&block)

    - -
    -

    Registers a block to be called after the transaction is fully committed.

    +
    +

    Registers a block to be called after the transaction is fully committed.

    If there is no currently open transactions, the block is called immediately, unless the transaction is finalized, in which case attempting to register the callback raises ActiveRecord::ActiveRecordError.

    If the transaction has a parent transaction, the callback is transferred to the parent when the current transaction commits, or dropped when the current transaction is rolled back. This operation is repeated until the outermost transaction is reached.

    If the callback raises an error, the transaction remains committed.

    -
    - +
    @@ -203,23 +197,17 @@

    -

    - - after_rollback(&block) - -

    +

    after_rollback(&block)

    - -
    -

    Registers a block to be called after the transaction is rolled back.

    +
    +

    Registers a block to be called after the transaction is rolled back.

    If there is no currently open transactions, the block is not called. But if the transaction is finalized, attempting to register the callback raises ActiveRecord::ActiveRecordError.

    If the transaction is successfully committed but has a parent transaction, the callback is automatically added to the parent transaction.

    If the entire chain of nested transactions are all successfully committed, the block is never called.

    -
    - +
    @@ -244,24 +232,17 @@

    -

    - - blank?() - -

    +

    blank?()

    -
    - -
    - -
    - Alias for: closed? -
    +

    + Alias for: + closed?. +

    @@ -269,22 +250,18 @@

    -

    - - closed?() - -

    +

    closed?()

    - -
    -

    Returns true if the transaction doesn’t exist or is finalized.

    -
    - +
    +

    Returns true if the transaction doesn’t exist or is finalized.

    +
    -
    - Also aliased as: blank? -
    +

    + Also aliased as: + + blank?. +

    @@ -308,17 +285,11 @@

    -

    - - open?() - -

    +

    open?()

    - -
    -

    Returns true if the transaction exists and isn’t finalized yet.

    -
    - +
    +

    Returns true if the transaction exists and isn’t finalized yet.

    +
    @@ -343,17 +314,11 @@

    -

    - - uuid() - -

    +

    uuid()

    - -
    -

    Returns a UUID for this transaction or nil if no transaction is open.

    -
    - +
    +

    Returns a UUID for this transaction or nil if no transaction is open.

    +
    diff --git a/src/classes/ActiveRecord/Transactions/ClassMethods.html b/src/classes/ActiveRecord/Transactions/ClassMethods.html index 761822da31..4d8edc70c4 100644 --- a/src/classes/ActiveRecord/Transactions/ClassMethods.html +++ b/src/classes/ActiveRecord/Transactions/ClassMethods.html @@ -260,15 +260,10 @@

    Methods

    Instance Public methods

    -

    - - after_commit(*args, &block) - -

    +

    after_commit(*args, &block)

    - -
    -

    This callback is called after a record has been created, updated, or destroyed.

    +
    +

    This callback is called after a record has been created, updated, or destroyed.

    You can specify that the callback should only be fired by a certain action with the :on option:

    @@ -279,8 +274,7 @@

    after_commit :do_foo_bar, on: [:create, :update] after_commit :do_bar_baz, on: [:update, :destroy] -

    - +
    @@ -306,17 +300,11 @@

    -

    - - after_create_commit(*args, &block) - -

    +

    after_create_commit(*args, &block)

    - -
    -

    Shortcut for after_commit :hook, on: :create.

    -
    - +
    +

    Shortcut for after_commit :hook, on: :create.

    +
    @@ -342,17 +330,11 @@

    -

    - - after_destroy_commit(*args, &block) - -

    +

    after_destroy_commit(*args, &block)

    - -
    -

    Shortcut for after_commit :hook, on: :destroy.

    -
    - +
    +

    Shortcut for after_commit :hook, on: :destroy.

    +
    @@ -378,19 +360,13 @@

    -

    - - after_rollback(*args, &block) - -

    +

    after_rollback(*args, &block)

    - -
    -

    This callback is called after a create, update, or destroy are rolled back.

    +
    +

    This callback is called after a create, update, or destroy are rolled back.

    Please check the documentation of after_commit for options.

    -
    - +
    @@ -416,17 +392,11 @@

    -

    - - after_save_commit(*args, &block) - -

    +

    after_save_commit(*args, &block)

    - -
    -

    Shortcut for after_commit :hook, on: [ :create, :update ].

    -
    - +
    +

    Shortcut for after_commit :hook, on: [ :create, :update ].

    +
    @@ -452,17 +422,11 @@

    -

    - - after_update_commit(*args, &block) - -

    +

    after_update_commit(*args, &block)

    - -
    -

    Shortcut for after_commit :hook, on: :update.

    -
    - +
    +

    Shortcut for after_commit :hook, on: :update.

    +
    @@ -488,21 +452,15 @@

    -

    - - current_transaction() - -

    +

    current_transaction()

    - -
    -

    Returns a representation of the current transaction state, which can be a top level transaction, a savepoint, or the absence of a transaction.

    +
    +

    Returns a representation of the current transaction state, which can be a top level transaction, a savepoint, or the absence of a transaction.

    An object is always returned, whether or not a transaction is currently active. To check if a transaction was opened, use current_transaction.open?.

    See the ActiveRecord::Transaction documentation for detailed behavior.

    -
    - +
    @@ -527,17 +485,11 @@

    -

    - - pool_transaction_isolation_level() - -

    +

    pool_transaction_isolation_level()

    - -
    -

    Returns the default isolation level for the connection pool, set earlier by with_pool_transaction_isolation_level.

    -
    - +
    +

    Returns the default isolation level for the connection pool, set earlier by with_pool_transaction_isolation_level.

    +
    @@ -562,17 +514,11 @@

    -

    - - set_callback(name, *filter_list, &block) - -

    +

    set_callback(name, *filter_list, &block)

    - -
    -

    Similar to ActiveSupport::Callbacks::ClassMethods#set_callback, but with support for options available on after_commit and after_rollback callbacks.

    -
    - +
    +

    Similar to ActiveSupport::Callbacks::ClassMethods#set_callback, but with support for options available on after_commit and after_rollback callbacks.

    +
    @@ -610,17 +556,11 @@

    -

    - - transaction(**options, &block) - -

    +

    transaction(**options, &block)

    - - - + @@ -649,17 +589,11 @@

    -

    - - with_pool_transaction_isolation_level(isolation_level, &block) - -

    +

    with_pool_transaction_isolation_level(isolation_level, &block)

    - -
    -

    Makes all transactions the current pool use the isolation level initiated within the block.

    -
    - +
    +

    Makes all transactions the current pool use the isolation level initiated within the block.

    +
    diff --git a/src/classes/ActiveRecord/Type.html b/src/classes/ActiveRecord/Type.html index e87f8f361f..d5059a65ef 100644 --- a/src/classes/ActiveRecord/Type.html +++ b/src/classes/ActiveRecord/Type.html @@ -403,17 +403,11 @@

    Constants

    Class Public methods

    -

    - - register(type_name, klass = nil, **options, &block) - -

    +

    register(type_name, klass = nil, **options, &block)

    - -
    -

    Add a new type to the registry, allowing it to be referenced as a symbol by ActiveRecord::Base.attribute. If your type is only meant to be used with a specific database adapter, you can do so by passing adapter: :postgresql. If your type has the same name as a native type for the current adapter, an exception will be raised unless you specify an :override option. override: true will cause your type to be used instead of the native type. override: false will cause the native type to be used over yours if one exists.

    -
    - +
    +

    Add a new type to the registry, allowing it to be referenced as a symbol by ActiveRecord::Base.attribute. If your type is only meant to be used with a specific database adapter, you can do so by passing adapter: :postgresql. If your type has the same name as a native type for the current adapter, an exception will be raised unless you specify an :override option. override: true will cause your type to be used instead of the native type. override: false will cause the native type to be used over yours if one exists.

    +
    diff --git a/src/classes/ActiveRecord/Type/Internal/Timezone.html b/src/classes/ActiveRecord/Type/Internal/Timezone.html index 9aa0a239ce..74951a269c 100644 --- a/src/classes/ActiveRecord/Type/Internal/Timezone.html +++ b/src/classes/ActiveRecord/Type/Internal/Timezone.html @@ -83,17 +83,9 @@

    Attributes

    Class Public methods

    -

    - - new(timezone: nil, **kwargs) - -

    +

    new(timezone: nil, **kwargs)

    -
    - -
    - @@ -123,17 +115,9 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    -
    - -
    - @@ -158,17 +142,9 @@

    -

    - - default_timezone() - -

    +

    default_timezone()

    -
    - -
    - @@ -193,17 +169,9 @@

    -

    - - is_utc?() - -

    +

    is_utc?()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Type/Json.html b/src/classes/ActiveRecord/Type/Json.html index cf84925da1..5ee637668a 100644 --- a/src/classes/ActiveRecord/Type/Json.html +++ b/src/classes/ActiveRecord/Type/Json.html @@ -107,17 +107,9 @@

    Constants

    Instance Public methods

    -

    - - accessor() - -

    +

    accessor()

    -
    - -
    - @@ -142,17 +134,9 @@

    -

    - - changed_in_place?(raw_old_value, new_value) - -

    +

    changed_in_place?(raw_old_value, new_value)

    -
    - -
    - @@ -177,17 +161,9 @@

    -

    - - deserialize(value) - -

    +

    deserialize(value)

    -
    - -
    - @@ -222,17 +198,9 @@

    -

    - - serialize(value) - -

    +

    serialize(value)

    -
    - -
    - @@ -257,17 +225,9 @@

    -

    - - type() - -

    +

    type()

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Type/Time.html b/src/classes/ActiveRecord/Type/Time.html index cb94933b6c..293786f579 100644 --- a/src/classes/ActiveRecord/Type/Time.html +++ b/src/classes/ActiveRecord/Type/Time.html @@ -78,17 +78,9 @@

    Included Modules

    Instance Public methods

    -

    - - serialize(value) - -

    +

    serialize(value)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/UnknownPrimaryKey.html b/src/classes/ActiveRecord/UnknownPrimaryKey.html index bc7ee43fd5..2ddefab730 100644 --- a/src/classes/ActiveRecord/UnknownPrimaryKey.html +++ b/src/classes/ActiveRecord/UnknownPrimaryKey.html @@ -83,17 +83,9 @@

    Attributes

    Class Public methods

    -

    - - new(model = nil, description = nil) - -

    +

    new(model = nil, description = nil)

    -
    - -
    - diff --git a/src/classes/ActiveRecord/Validations.html b/src/classes/ActiveRecord/Validations.html index ee069b652d..8f8c812f2b 100644 --- a/src/classes/ActiveRecord/Validations.html +++ b/src/classes/ActiveRecord/Validations.html @@ -105,17 +105,11 @@

    Methods

    Instance Public methods

    -

    - - save(**options) - -

    +

    save(**options)

    - -
    -

    The validation process on save can be skipped by passing validate: false. The validation context can be changed by passing context: context. The regular ActiveRecord::Base#save method is replaced with this when the validations module is mixed in, which it is by default.

    -
    - +
    +

    The validation process on save can be skipped by passing validate: false. The validation context can be changed by passing context: context. The regular ActiveRecord::Base#save method is replaced with this when the validations module is mixed in, which it is by default.

    +
    @@ -140,17 +134,11 @@

    -

    - - save!(**options) - -

    +

    save!(**options)

    - -
    -

    Attempts to save the record just like ActiveRecord::Base#save but will raise an ActiveRecord::RecordInvalid exception instead of returning false if the record is not valid.

    -
    - +
    +

    Attempts to save the record just like ActiveRecord::Base#save but will raise an ActiveRecord::RecordInvalid exception instead of returning false if the record is not valid.

    +
    @@ -175,28 +163,24 @@

    -

    - - valid?(context = nil) - -

    +

    valid?(context = nil)

    - -
    -

    Runs all the validations within the specified context. Returns true if no errors are found, false otherwise.

    +
    +

    Runs all the validations within the specified context. Returns true if no errors are found, false otherwise.

    Aliased as validate.

    If the argument is false (default is nil), the context is set to :create if new_record? is true, and to :update if it is not. If the argument is an array of contexts, post.valid?([:create, :update]), the validations are run within multiple contexts.

    Validations with no :on option will run no matter the context. Validations with some :on option will only run in the specified context.

    -
    - +
    -
    - Also aliased as: validate -
    +

    + Also aliased as: + + validate. +

    @@ -222,24 +206,17 @@

    -

    - - validate(context = nil) - -

    +

    validate(context = nil)

    -
    - -
    - -
    - Alias for: valid? -
    +

    + Alias for: + valid?. +

    diff --git a/src/classes/ActiveRecord/Validations/ClassMethods.html b/src/classes/ActiveRecord/Validations/ClassMethods.html index f5d8b48e3f..c6e440929d 100644 --- a/src/classes/ActiveRecord/Validations/ClassMethods.html +++ b/src/classes/ActiveRecord/Validations/ClassMethods.html @@ -92,19 +92,13 @@

    Methods

    Instance Public methods

    -

    - - validates_absence_of(*attr_names) - -

    +

    validates_absence_of(*attr_names)

    - -
    -

    Validates that the specified attributes are not present (as defined by Object#present?). If the attribute is an association, the associated object is also considered not present if it is marked for destruction.

    +
    +

    Validates that the specified attributes are not present (as defined by Object#present?). If the attribute is an association, the associated object is also considered not present if it is marked for destruction.

    See ActiveModel::Validations::HelperMethods.validates_absence_of for more information.

    -
    - +
    @@ -129,15 +123,10 @@

    -

    - - validates_associated(*attr_names) - -

    +

    validates_associated(*attr_names)

    - -
    -

    Validates whether the associated object or objects are all valid. Works with any kind of association.

    +
    +

    Validates whether the associated object or objects are all valid. Works with any kind of association.

    class Book < ActiveRecord::Base
       has_many :pages
    @@ -161,8 +150,7 @@ 

  • :unless - Specifies a method, proc, or string to call to determine if the validation should not occur (e.g. unless: :skip_validation, or unless: Proc.new { |user| user.signup_step <= 2 }). The method, proc, or string should return or evaluate to a true or false value.

  • -

    - +
    @@ -187,24 +175,20 @@

    -

    - - validates_length_of(*attr_names) - -

    +

    validates_length_of(*attr_names)

    - -
    -

    Validates that the specified attributes match the length restrictions supplied. If the attribute is an association, records that are marked for destruction are not counted.

    +
    +

    Validates that the specified attributes match the length restrictions supplied. If the attribute is an association, records that are marked for destruction are not counted.

    See ActiveModel::Validations::HelperMethods.validates_length_of for more information.

    -
    - +
    -
    - Also aliased as: validates_size_of -
    +

    + Also aliased as: + + validates_size_of. +

    @@ -228,19 +212,13 @@

    -

    - - validates_numericality_of(*attr_names) - -

    +

    validates_numericality_of(*attr_names)

    - -
    -

    Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if only_integer is false) or applying it to the regular expression /\A[+\-]?\d+\z/ (if only_integer is set to true). Kernel.Float precision defaults to the column’s precision value or 15.

    +
    +

    Validates whether the value of the specified attribute is numeric by trying to convert it to a float with Kernel.Float (if only_integer is false) or applying it to the regular expression /\A[+\-]?\d+\z/ (if only_integer is set to true). Kernel.Float precision defaults to the column’s precision value or 15.

    See ActiveModel::Validations::HelperMethods.validates_numericality_of for more information.

    -
    - +
    @@ -265,15 +243,10 @@

    -

    - - validates_presence_of(*attr_names) - -

    +

    validates_presence_of(*attr_names)

    - -
    -

    Validates that the specified attributes are not blank (as defined by Object#blank?). If the attribute is an association, the associated object is also considered blank if it is marked for destruction.

    +
    +

    Validates that the specified attributes are not blank (as defined by Object#blank?). If the attribute is an association, the associated object is also considered blank if it is marked for destruction.

    class Person < ActiveRecord::Base
       has_one :face
    @@ -288,8 +261,7 @@ 

    See ActiveModel::Validations::HelperMethods.validates_presence_of for more information.

    NOTE: This validation will not fail while using it with an association if the latter was assigned but not valid. If you want to ensure that it is both present and valid, you also need to use validates_associated.

    -

    - +
    @@ -314,24 +286,17 @@

    -

    - - validates_size_of(*attr_names) - -

    +

    validates_size_of(*attr_names)

    -
    - -
    - -
    - Alias for: validates_length_of -
    +

    + Alias for: + validates_length_of. +

    @@ -339,15 +304,10 @@

    -

    - - validates_uniqueness_of(*attr_names) - -

    +

    validates_uniqueness_of(*attr_names)

    - -
    -

    Validates whether the value of the specified attributes are unique across the system. Useful for making sure that only one user can be named “davidhh”.

    +
    +

    Validates whether the value of the specified attributes are unique across the system. Useful for making sure that only one user can be named “davidhh”.

    class Person < ActiveRecord::Base
       validates_uniqueness_of :user_name
    @@ -454,8 +414,7 @@ 

    Concur
  • ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.

  • -

    - +
    diff --git a/src/classes/ActiveStorage.html b/src/classes/ActiveStorage.html index 2991532547..afbb7ad719 100644 --- a/src/classes/ActiveStorage.html +++ b/src/classes/ActiveStorage.html @@ -585,17 +585,11 @@

    Methods

    Class Public methods

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Active Storage as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Storage as a Gem::Version.

    +
    @@ -620,17 +614,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Active Storage as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Storage as a Gem::Version.

    +
    diff --git a/src/classes/ActiveStorage/AnalyzeJob.html b/src/classes/ActiveStorage/AnalyzeJob.html index 195c796523..56c1f9cf93 100644 --- a/src/classes/ActiveStorage/AnalyzeJob.html +++ b/src/classes/ActiveStorage/AnalyzeJob.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - perform(blob) - -

    +

    perform(blob)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Analyzer.html b/src/classes/ActiveStorage/Analyzer.html index 02fc3da561..5a787a25ec 100644 --- a/src/classes/ActiveStorage/Analyzer.html +++ b/src/classes/ActiveStorage/Analyzer.html @@ -144,17 +144,11 @@

    Attributes

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    - -
    -

    Implement this method in a concrete subclass. Have it return true when given a blob from which the analyzer can extract metadata.

    -
    - +
    +

    Implement this method in a concrete subclass. Have it return true when given a blob from which the analyzer can extract metadata.

    +
    @@ -179,17 +173,11 @@

    -

    - - analyze_later?() - -

    +

    analyze_later?()

    - -
    -

    Implement this method in concrete subclasses. It will determine if blob analysis should be done in a job or performed inline. By default, analysis is enqueued in a job.

    -
    - +
    +

    Implement this method in concrete subclasses. It will determine if blob analysis should be done in a job or performed inline. By default, analysis is enqueued in a job.

    +
    @@ -214,17 +202,9 @@

    -

    - - new(blob) - -

    +

    new(blob)

    -
    - -
    - @@ -253,17 +233,11 @@

    Instance Public methods

    -

    - - metadata() - -

    +

    metadata()

    - -
    -

    Override this method in a concrete subclass. Have it return a Hash of metadata.

    -
    - +
    +

    Override this method in a concrete subclass. Have it return a Hash of metadata.

    +
    @@ -291,17 +265,11 @@

    Instance Private methods

    -

    - - download_blob_to_tempfile(&block) - -

    +

    download_blob_to_tempfile(&block)

    - -
    -

    Downloads the blob to a tempfile on disk. Yields the tempfile.

    -
    - +
    +

    Downloads the blob to a tempfile on disk. Yields the tempfile.

    +
    @@ -326,17 +294,9 @@

    -

    - - instrument(analyzer, &block) - -

    +

    instrument(analyzer, &block)

    -
    - -
    - @@ -361,17 +321,9 @@

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -396,17 +348,9 @@

    -

    - - tmpdir() - -

    +

    tmpdir()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html b/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html index 309c7d4899..8024df477f 100644 --- a/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html +++ b/src/classes/ActiveStorage/Analyzer/AudioAnalyzer.html @@ -83,17 +83,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - @@ -122,17 +114,9 @@

    Instance Public methods

    -

    - - metadata() - -

    +

    metadata()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html index c32f0a3be5..20fd0a9a13 100644 --- a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html +++ b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer.html @@ -104,17 +104,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - @@ -143,17 +135,9 @@

    Instance Public methods

    -

    - - metadata() - -

    +

    metadata()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html index 31b7eb461f..6223c5a1b0 100644 --- a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html +++ b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/ImageMagick.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html index 23e9551cf7..447d80ad8c 100644 --- a/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html +++ b/src/classes/ActiveStorage/Analyzer/ImageAnalyzer/Vips.html @@ -82,17 +82,9 @@

    Constants

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html b/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html index 15e153c751..1b95e72e46 100644 --- a/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html +++ b/src/classes/ActiveStorage/Analyzer/VideoAnalyzer.html @@ -100,17 +100,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - @@ -139,17 +131,9 @@

    Instance Public methods

    -

    - - metadata() - -

    +

    metadata()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Attached.html b/src/classes/ActiveStorage/Attached.html index 2838a03f19..3d8938eda3 100644 --- a/src/classes/ActiveStorage/Attached.html +++ b/src/classes/ActiveStorage/Attached.html @@ -141,17 +141,9 @@

    Attributes

    Class Public methods

    -

    - - new(name, record) - -

    +

    new(name, record)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Attached/Many.html b/src/classes/ActiveStorage/Attached/Many.html index f09ca1506c..899cdc63d1 100644 --- a/src/classes/ActiveStorage/Attached/Many.html +++ b/src/classes/ActiveStorage/Attached/Many.html @@ -96,15 +96,10 @@

    Methods

    Instance Public methods

    -

    - - attach(*attachables) - -

    +

    attach(*attachables)

    - -
    -

    Attaches one or more attachables to the record.

    +
    +

    Attaches one or more attachables to the record.

    If the record is persisted and unchanged, the attachments are saved to the database immediately. Otherwise, they’ll be saved to the DB when the record is next saved.

    @@ -113,8 +108,7 @@

    document.images.attach(io: File.open("/path/to/racecar.jpg"), filename: "racecar.jpg", content_type: "image/jpeg") document.images.attach([ first_blob, second_blob ]) -

    - +
    @@ -143,15 +137,10 @@

    -

    - - attached?() - -

    +

    attached?()

    - -
    -

    Returns true if any attachments have been made.

    +
    +

    Returns true if any attachments have been made.

    class Gallery < ApplicationRecord
       has_many_attached :photos
    @@ -159,8 +148,7 @@ 

    Gallery.new.photos.attached? # => false

    -
    - +
    @@ -185,19 +173,13 @@

    -

    - - attachments() - -

    +

    attachments()

    - -
    -

    Returns all the associated attachment records.

    +
    +

    Returns all the associated attachment records.

    All methods called on this proxy object that aren’t listed here will automatically be delegated to attachments.

    -
    - +
    @@ -222,17 +204,11 @@

    -

    - - blobs() - -

    +

    blobs()

    - -
    -

    Returns all attached blobs.

    -
    - +
    +

    Returns all attached blobs.

    +
    @@ -257,17 +233,11 @@

    -

    - - detach - -

    +

    detach

    - -
    -

    Deletes associated attachments without purging them, leaving their respective blobs in place.

    -
    - +
    +

    Deletes associated attachments without purging them, leaving their respective blobs in place.

    +
    @@ -291,17 +261,11 @@

    -

    - - purge - -

    +

    purge

    - -
    -

    Directly purges each associated attachment (i.e. destroys the blobs and attachments and deletes the files on the service).

    -
    - +
    +

    Directly purges each associated attachment (i.e. destroys the blobs and attachments and deletes the files on the service).

    +
    @@ -325,17 +289,11 @@

    -

    - - purge_later - -

    +

    purge_later

    - -
    -

    Purges each associated attachment through the queuing system.

    -
    - +
    +

    Purges each associated attachment through the queuing system.

    +
    diff --git a/src/classes/ActiveStorage/Attached/Model.html b/src/classes/ActiveStorage/Attached/Model.html index ca837b5251..6757a78c2a 100644 --- a/src/classes/ActiveStorage/Attached/Model.html +++ b/src/classes/ActiveStorage/Attached/Model.html @@ -90,20 +90,14 @@

    Methods

    Instance Public methods

    -

    - - *_attachment - -

    +

    *_attachment

    - -
    -

    Returns the attachment for the has_one_attached.

    +
    +

    Returns the attachment for the has_one_attached.

    User.last.avatar_attachment
     
    -
    - +
    @@ -116,20 +110,14 @@

    -

    - - *_attachments - -

    +

    *_attachments

    - -
    -

    Returns the attachments for the has_many_attached.

    +
    +

    Returns the attachments for the has_many_attached.

    Gallery.last.photos_attachments
     
    -
    - +
    @@ -142,20 +130,14 @@

    -

    - - *_blob - -

    +

    *_blob

    - -
    -

    Returns the blob for the has_one_attached attachment.

    +
    +

    Returns the blob for the has_one_attached attachment.

    User.last.avatar_blob
     
    -
    - +
    @@ -168,20 +150,14 @@

    -

    - - *_blobs - -

    +

    *_blobs

    - -
    -

    Returns the blobs for the has_many_attached attachments.

    +
    +

    Returns the blobs for the has_many_attached attachments.

    Gallery.last.photos_blobs
     
    -
    - +
    @@ -194,15 +170,10 @@

    -

    - - has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false) - -

    +

    has_many_attached(name, dependent: :purge_later, service: nil, strict_loading: false)

    - -
    -

    Specifies the relation between multiple attachments and the model.

    +
    +

    Specifies the relation between multiple attachments and the model.

    class Gallery < ApplicationRecord
       has_many_attached :photos
    @@ -247,8 +218,7 @@ 

    Note: Active Storage relies on polymorphic associations, which in turn store class names in the database. When renaming classes that use has_many, make sure to also update the class names in the active_storage_attachments.record_type polymorphic type column of the corresponding rows.

    -
    - +
    @@ -320,15 +290,10 @@

    -

    - - has_one_attached(name, dependent: :purge_later, service: nil, strict_loading: false) - -

    +

    has_one_attached(name, dependent: :purge_later, service: nil, strict_loading: false)

    - -
    -

    Specifies the relation between a single attachment and the model.

    +
    +

    Specifies the relation between a single attachment and the model.

    class User < ApplicationRecord
       has_one_attached :avatar
    @@ -373,8 +338,7 @@ 

    Note: Active Storage relies on polymorphic associations, which in turn store class names in the database. When renaming classes that use has_one_attached, make sure to also update the class names in the active_storage_attachments.record_type polymorphic type column of the corresponding rows.

    -
    - +
    @@ -444,15 +408,10 @@

    -

    - - with_attached_* - -

    +

    with_attached_*

    - -
    -

    Includes the attached blobs in your query to avoid N+1 queries.

    +
    +

    Includes the attached blobs in your query to avoid N+1 queries.

    If ActiveStorage.track_variants is enabled, it will also include the variants record and their attached blobs.

    @@ -463,8 +422,7 @@

    Gallery.with_attached_photos
     
    -

    - +
    diff --git a/src/classes/ActiveStorage/Attached/One.html b/src/classes/ActiveStorage/Attached/One.html index f4ca6dd478..85ceeb8b5d 100644 --- a/src/classes/ActiveStorage/Attached/One.html +++ b/src/classes/ActiveStorage/Attached/One.html @@ -96,15 +96,10 @@

    Methods

    Instance Public methods

    -

    - - attach(attachable) - -

    +

    attach(attachable)

    - -
    -

    Attaches an attachable to the record.

    +
    +

    Attaches an attachable to the record.

    If the record is persisted and unchanged, the attachment is saved to the database immediately. Otherwise, it’ll be saved to the DB when the record is next saved.

    @@ -113,8 +108,7 @@

    person.avatar.attach(io: File.open("/path/to/face.jpg"), filename: "face.jpg", content_type: "image/jpeg") person.avatar.attach(avatar_blob) # ActiveStorage::Blob object -

    - +
    @@ -143,15 +137,10 @@

    -

    - - attached?() - -

    +

    attached?()

    - -
    -

    Returns true if an attachment has been made.

    +
    +

    Returns true if an attachment has been made.

    class User < ApplicationRecord
       has_one_attached :avatar
    @@ -159,8 +148,7 @@ 

    User.new.avatar.attached? # => false

    -
    - +
    @@ -185,19 +173,13 @@

    -

    - - attachment() - -

    +

    attachment()

    - -
    -

    Returns the associated attachment record.

    +
    +

    Returns the associated attachment record.

    You don’t have to call this method to access the attachment’s methods as they are all available at the model level.

    -
    - +
    @@ -222,15 +204,10 @@

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    Returns true if an attachment is not attached.

    +
    +

    Returns true if an attachment is not attached.

    class User < ApplicationRecord
       has_one_attached :avatar
    @@ -238,8 +215,7 @@ 

    User.new.avatar.blank? # => true

    -
    - +
    @@ -264,17 +240,11 @@

    -

    - - detach - -

    +

    detach

    - -
    -

    Deletes the attachment without purging it, leaving its blob in place.

    -
    - +
    +

    Deletes the attachment without purging it, leaving its blob in place.

    +
    @@ -298,17 +268,11 @@

    -

    - - purge - -

    +

    purge

    - -
    -

    Directly purges the attachment (i.e. destroys the blob and attachment and deletes the file on the service).

    -
    - +
    +

    Directly purges the attachment (i.e. destroys the blob and attachment and deletes the file on the service).

    +
    @@ -332,17 +296,11 @@

    -

    - - purge_later - -

    +

    purge_later

    - -
    -

    Purges the attachment through the queuing system.

    -
    - +
    +

    Purges the attachment through the queuing system.

    +
    diff --git a/src/classes/ActiveStorage/Attachment.html b/src/classes/ActiveStorage/Attachment.html index a2cb159fb4..c0f6370766 100644 --- a/src/classes/ActiveStorage/Attachment.html +++ b/src/classes/ActiveStorage/Attachment.html @@ -110,20 +110,14 @@

    Methods

    Class Public methods

    -

    - - with_all_variant_records - -

    +

    with_all_variant_records

    - -
    -

    Eager load all variant records on an attachment at once.

    +
    +

    Eager load all variant records on an attachment at once.

    User.first.avatars.with_all_variant_records
     
    -
    - +
    @@ -153,17 +147,11 @@

    Instance Public methods

    -

    - - blob - -

    +

    blob

    - -
    -

    Returns the associated ActiveStorage::Blob.

    -
    - +
    +

    Returns the associated ActiveStorage::Blob.

    +
    @@ -187,15 +175,10 @@

    -

    - - preview(transformations) - -

    +

    preview(transformations)

    - -
    -

    Returns an ActiveStorage::Preview instance for the attachment with the set of transformations provided. Example:

    +
    +

    Returns an ActiveStorage::Preview instance for the attachment with the set of transformations provided. Example:

    video.preview(resize_to_limit: [100, 100]).processed.url
     
    @@ -208,8 +191,7 @@

    See ActiveStorage::Blob::Representable#preview for more information.

    Raises an ArgumentError if transformations is a Symbol which is an unknown pre-defined variant of the attachment.

    -

    - +
    @@ -235,17 +217,11 @@

    -

    - - purge() - -

    +

    purge()

    - -
    -

    Synchronously deletes the attachment and purges the blob.

    -
    - +
    +

    Synchronously deletes the attachment and purges the blob.

    +
    @@ -274,17 +250,11 @@

    -

    - - purge_later() - -

    +

    purge_later()

    - -
    -

    Deletes the attachment and enqueues a background job to purge the blob.

    -
    - +
    +

    Deletes the attachment and enqueues a background job to purge the blob.

    +
    @@ -313,17 +283,11 @@

    -

    - - record - -

    +

    record

    - -
    -

    Returns the associated record.

    -
    - +
    +

    Returns the associated record.

    +
    @@ -347,15 +311,10 @@

    -

    - - representation(transformations) - -

    +

    representation(transformations)

    - -
    -

    Returns an ActiveStorage::Preview or an ActiveStorage::Variant for the attachment with set of transformations provided. Example:

    +
    +

    Returns an ActiveStorage::Preview or an ActiveStorage::Variant for the attachment with set of transformations provided. Example:

    avatar.representation(resize_to_limit: [100, 100]).processed.url
     
    @@ -368,8 +327,7 @@

    See ActiveStorage::Blob::Representable#representation for more information.

    Raises an ArgumentError if transformations is a Symbol which is an unknown pre-defined variant of the attachment.

    -

    - +
    @@ -395,15 +353,10 @@

    -

    - - variant(transformations) - -

    +

    variant(transformations)

    - -
    -

    Returns an ActiveStorage::Variant or ActiveStorage::VariantWithRecord instance for the attachment with the set of transformations provided. Example:

    +
    +

    Returns an ActiveStorage::Variant or ActiveStorage::VariantWithRecord instance for the attachment with the set of transformations provided. Example:

    avatar.variant(resize_to_limit: [100, 100]).processed.url
     
    @@ -416,8 +369,7 @@

    See ActiveStorage::Blob::Representable#variant for more information.

    Raises an ArgumentError if transformations is a Symbol which is an unknown pre-defined variant of the attachment.

    -

    - +
    diff --git a/src/classes/ActiveStorage/Blob.html b/src/classes/ActiveStorage/Blob.html index 37b62f6b27..d4275eaaad 100644 --- a/src/classes/ActiveStorage/Blob.html +++ b/src/classes/ActiveStorage/Blob.html @@ -256,17 +256,11 @@

    Constants

    Class Public methods

    -

    - - compose(blobs, key: nil, filename:, content_type: nil, metadata: nil) - -

    +

    compose(blobs, key: nil, filename:, content_type: nil, metadata: nil)

    - -
    -

    Concatenate multiple blobs into a single “composed” blob.

    -
    - +
    +

    Concatenate multiple blobs into a single “composed” blob.

    +
    @@ -298,17 +292,11 @@

    -

    - - create_and_upload!(key: nil, io:, filename:, content_type: nil, metadata: nil, service_name: nil, identify: true, record: nil) - -

    +

    create_and_upload!(key: nil, io:, filename:, content_type: nil, metadata: nil, service_name: nil, identify: true, record: nil)

    - -
    -

    Creates a new blob instance and then uploads the contents of the given io to the service. The blob instance is going to be saved before the upload begins to prevent the upload clobbering another due to key collisions. When providing a content type, pass identify: false to bypass automatic content type inference.

    -
    - +
    +

    Creates a new blob instance and then uploads the contents of the given io to the service. The blob instance is going to be saved before the upload begins to prevent the upload clobbering another due to key collisions. When providing a content type, pass identify: false to bypass automatic content type inference.

    +
    @@ -335,17 +323,11 @@

    -

    - - create_before_direct_upload!(key: nil, filename:, byte_size:, checksum:, content_type: nil, metadata: nil, service_name: nil, record: nil) - -

    +

    create_before_direct_upload!(key: nil, filename:, byte_size:, checksum:, content_type: nil, metadata: nil, service_name: nil, record: nil)

    - -
    -

    Returns a saved blob without uploading a file to the service. This blob will point to a key where there is no file yet. It’s intended to be used together with a client-side upload, which will first create the blob in order to produce the signed URL for uploading. This signed URL points to the key generated by the blob. Once the form using the direct upload is submitted, the blob can be associated with the right record using the signed ID.

    -
    - +
    +

    Returns a saved blob without uploading a file to the service. This blob will point to a key where there is no file yet. It’s intended to be used together with a client-side upload, which will first create the blob in order to produce the signed URL for uploading. This signed URL points to the key generated by the blob. Once the form using the direct upload is submitted, the blob can be associated with the right record using the signed ID.

    +
    @@ -370,19 +352,13 @@

    -

    - - find_signed(id, record: nil, purpose: :blob_id) - -

    +

    find_signed(id, record: nil, purpose: :blob_id)

    - -
    -

    You can use the signed ID of a blob to refer to it on the client side without fear of tampering. This is particularly helpful for direct uploads where the client-side needs to refer to the blob that was created ahead of the upload itself on form submission.

    +
    +

    You can use the signed ID of a blob to refer to it on the client side without fear of tampering. This is particularly helpful for direct uploads where the client-side needs to refer to the blob that was created ahead of the upload itself on form submission.

    The signed ID is also used to create stable URLs for the blob through the BlobsController.

    -
    - +
    @@ -407,17 +383,11 @@

    -

    - - find_signed!(id, record: nil, purpose: :blob_id) - -

    +

    find_signed!(id, record: nil, purpose: :blob_id)

    - -
    -

    Works like find_signed, but will raise an ActiveSupport::MessageVerifier::InvalidSignature exception if the signed_id has either expired, has a purpose mismatch, or has been tampered with. It will also raise an ActiveRecord::RecordNotFound exception if the valid signed id can’t find a record.

    -
    - +
    +

    Works like find_signed, but will raise an ActiveSupport::MessageVerifier::InvalidSignature exception if the signed_id has either expired, has a purpose mismatch, or has been tampered with. It will also raise an ActiveRecord::RecordNotFound exception if the valid signed id can’t find a record.

    +
    @@ -442,17 +412,11 @@

    -

    - - generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH) - -

    +

    generate_unique_secure_token(length: MINIMUM_TOKEN_LENGTH)

    - -
    -

    To prevent problems with case-insensitive filesystems, especially in combination with databases which treat indices as case-sensitive, all blob keys generated are going to only contain the base-36 character alphabet and will therefore be lowercase. To maintain the same or higher amount of entropy as in the base-58 encoding used by has_secure_token the number of bytes used is increased to 28 from the standard 24

    -
    - +
    +

    To prevent problems with case-insensitive filesystems, especially in combination with databases which treat indices as case-sensitive, all blob keys generated are going to only contain the base-36 character alphabet and will therefore be lowercase. To maintain the same or higher amount of entropy as in the base-58 encoding used by has_secure_token the number of bytes used is increased to 28 from the standard 24

    +
    @@ -477,17 +441,11 @@

    -

    - - unattached - -

    +

    unattached

    - -
    -

    Returns the blobs that aren’t attached to any record.

    -
    - +
    +

    Returns the blobs that aren’t attached to any record.

    +
    @@ -515,17 +473,11 @@

    Instance Public methods

    -

    - - attachments - -

    +

    attachments

    - -
    -

    Returns the associated ActiveStorage::Attachment instances.

    -
    - +
    +

    Returns the associated ActiveStorage::Attachment instances.

    +
    @@ -549,17 +501,11 @@

    -

    - - audio?() - -

    +

    audio?()

    - -
    -

    Returns true if the content_type of this blob is in the audio range, like audio/mpeg.

    -
    - +
    +

    Returns true if the content_type of this blob is in the audio range, like audio/mpeg.

    +
    @@ -584,17 +530,9 @@

    -

    - - custom_metadata() - -

    +

    custom_metadata()

    -
    - -
    - @@ -619,17 +557,9 @@

    -

    - - custom_metadata=(metadata) - -

    +

    custom_metadata=(metadata)

    -
    - -
    - @@ -654,17 +584,11 @@

    -

    - - delete() - -

    +

    delete()

    - -
    -

    Deletes the files on the service associated with the blob. This should only be done if the blob is going to be deleted as well or you will essentially have a dead reference. It’s recommended to use purge and purge_later methods in most circumstances.

    -
    - +
    +

    Deletes the files on the service associated with the blob. This should only be done if the blob is going to be deleted as well or you will essentially have a dead reference. It’s recommended to use purge and purge_later methods in most circumstances.

    +
    @@ -690,17 +614,11 @@

    -

    - - download(&block) - -

    +

    download(&block)

    - -
    -

    Downloads the file associated with this blob. If no block is given, the entire file is read into memory and returned. That’ll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks.

    -
    - +
    +

    Downloads the file associated with this blob. If no block is given, the entire file is read into memory and returned. That’ll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks.

    +
    @@ -725,17 +643,11 @@

    -

    - - download_chunk(range) - -

    +

    download_chunk(range)

    - -
    -

    Downloads a part of the file associated with this blob.

    -
    - +
    +

    Downloads a part of the file associated with this blob.

    +
    @@ -760,17 +672,11 @@

    -

    - - filename() - -

    +

    filename()

    - -
    -

    Returns an ActiveStorage::Filename instance of the filename that can be queried for basename, extension, and a sanitized version of the filename that’s safe to use in URLs.

    -
    - +
    +

    Returns an ActiveStorage::Filename instance of the filename that can be queried for basename, extension, and a sanitized version of the filename that’s safe to use in URLs.

    +
    @@ -795,17 +701,11 @@

    -

    - - image?() - -

    +

    image?()

    - -
    -

    Returns true if the content_type of this blob is in the image range, like image/png.

    -
    - +
    +

    Returns true if the content_type of this blob is in the image range, like image/png.

    +
    @@ -830,17 +730,11 @@

    -

    - - key() - -

    +

    key()

    - -
    -

    Returns the key pointing to the file on the service that’s associated with this blob. The key is the secure-token format from Rails in lower case. So it’ll look like: xtapjjcjiudrlk3tmwyjgpuobabd. This key is not intended to be revealed directly to the user. Always refer to blobs using the signed_id or a verified form of the key.

    -
    - +
    +

    Returns the key pointing to the file on the service that’s associated with this blob. The key is the secure-token format from Rails in lower case. So it’ll look like: xtapjjcjiudrlk3tmwyjgpuobabd. This key is not intended to be revealed directly to the user. Always refer to blobs using the signed_id or a verified form of the key.

    +
    @@ -866,15 +760,10 @@

    -

    - - open(tmpdir: nil, &block) - -

    +

    open(tmpdir: nil, &block)

    - -
    -

    Downloads the blob to a tempfile on disk. Yields the tempfile.

    +
    +

    Downloads the blob to a tempfile on disk. Yields the tempfile.

    The tempfile’s name is prefixed with ActiveStorage- and the blob’s ID. Its extension matches that of the blob.

    @@ -888,8 +777,7 @@

    The tempfile is automatically closed and unlinked after the given block is executed.

    Raises ActiveStorage::IntegrityError if the downloaded data does not match the blob’s checksum.

    -

    - +
    @@ -921,17 +809,11 @@

    -

    - - purge() - -

    +

    purge()

    - -
    -

    Destroys the blob record and then deletes the file on the service. This is the recommended way to dispose of unwanted blobs. Note, though, that deleting the file off the service will initiate an HTTP connection to the service, which may be slow or prevented, so you should not use this method inside a transaction or in callbacks. Use purge_later instead.

    -
    - +
    +

    Destroys the blob record and then deletes the file on the service. This is the recommended way to dispose of unwanted blobs. Note, though, that deleting the file off the service will initiate an HTTP connection to the service, which may be slow or prevented, so you should not use this method inside a transaction or in callbacks. Use purge_later instead.

    +
    @@ -958,17 +840,11 @@

    -

    - - purge_later() - -

    +

    purge_later()

    - -
    -

    Enqueues an ActiveStorage::PurgeJob to call purge. This is the recommended way to purge blobs from a transaction, an Active Record callback, or in any other real-time scenario.

    -
    - +
    +

    Enqueues an ActiveStorage::PurgeJob to call purge. This is the recommended way to purge blobs from a transaction, an Active Record callback, or in any other real-time scenario.

    +
    @@ -993,17 +869,11 @@

    -

    - - service() - -

    +

    service()

    - -
    -

    Returns an instance of service, which can be configured globally or per attachment

    -
    - +
    +

    Returns an instance of service, which can be configured globally or per attachment

    +
    @@ -1028,17 +898,11 @@

    -

    - - service_headers_for_direct_upload() - -

    +

    service_headers_for_direct_upload()

    - -
    -

    Returns a Hash of headers for service_url_for_direct_upload requests.

    -
    - +
    +

    Returns a Hash of headers for service_url_for_direct_upload requests.

    +
    @@ -1063,17 +927,11 @@

    -

    - - service_url_for_direct_upload(expires_in: ActiveStorage.service_urls_expire_in) - -

    +

    service_url_for_direct_upload(expires_in: ActiveStorage.service_urls_expire_in)

    - -
    -

    Returns a URL that can be used to directly upload a file for this blob on the service. This URL is intended to be short-lived for security and only generated on-demand by the client-side JavaScript responsible for doing the uploading.

    -
    - +
    +

    Returns a URL that can be used to directly upload a file for this blob on the service. This URL is intended to be short-lived for security and only generated on-demand by the client-side JavaScript responsible for doing the uploading.

    +
    @@ -1098,17 +956,11 @@

    -

    - - signed_id(purpose: :blob_id, expires_in: nil, expires_at: nil) - -

    +

    signed_id(purpose: :blob_id, expires_in: nil, expires_at: nil)

    - -
    -

    Returns a signed ID for this blob that’s suitable for reference on the client-side without fear of tampering.

    -
    - +
    +

    Returns a signed ID for this blob that’s suitable for reference on the client-side without fear of tampering.

    +
    @@ -1133,17 +985,11 @@

    -

    - - text?() - -

    +

    text?()

    - -
    -

    Returns true if the content_type of this blob is in the text range, like text/plain.

    -
    - +
    +

    Returns true if the content_type of this blob is in the text range, like text/plain.

    +
    @@ -1168,21 +1014,15 @@

    -

    - - upload(io, identify: true) - -

    +

    upload(io, identify: true)

    - -
    -

    Uploads the io to the service on the key for this blob. Blobs are intended to be immutable, so you shouldn’t be using this method after a file has already been uploaded to fit with a blob. If you want to create a derivative blob, you should instead simply create a new blob based on the old one.

    +
    +

    Uploads the io to the service on the key for this blob. Blobs are intended to be immutable, so you shouldn’t be using this method after a file has already been uploaded to fit with a blob. If you want to create a derivative blob, you should instead simply create a new blob based on the old one.

    Prior to uploading, we compute the checksum, which is sent to the service for transit integrity validation. If the checksum does not match what the service receives, an exception will be raised. We also measure the size of the io and store that in byte_size on the blob record. The content type is automatically extracted from the io unless you specify a content_type and pass identify as false.

    Normally, you do not have to call this method directly at all. Use the create_and_upload! class method instead. If you do use this method directly, make sure you are using it on a persisted Blob as otherwise another blob’s data might get overwritten on the service.

    -
    - +
    @@ -1208,17 +1048,11 @@

    -

    - - url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline, filename: nil, **options) - -

    +

    url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline, filename: nil, **options)

    - -
    -

    Returns the URL of the blob on the service. This returns a permanent URL for public files, and returns a short-lived URL for private files. Private files are signed, and not for public use. Instead, the URL should only be exposed as a redirect from a stable, possibly authenticated URL. Hiding the URL behind a redirect also allows you to change services without updating all URLs.

    -
    - +
    +

    Returns the URL of the blob on the service. This returns a permanent URL for public files, and returns a short-lived URL for private files. Private files are signed, and not for public use. Instead, the URL should only be exposed as a redirect from a stable, possibly authenticated URL. Hiding the URL behind a redirect also allows you to change services without updating all URLs.

    +
    @@ -1244,17 +1078,11 @@

    -

    - - video?() - -

    +

    video?()

    - -
    -

    Returns true if the content_type of this blob is in the video range, like video/mp4.

    -
    - +
    +

    Returns true if the content_type of this blob is in the video range, like video/mp4.

    +
    diff --git a/src/classes/ActiveStorage/Blob/Analyzable.html b/src/classes/ActiveStorage/Blob/Analyzable.html index 7374372101..57d7deed4c 100644 --- a/src/classes/ActiveStorage/Blob/Analyzable.html +++ b/src/classes/ActiveStorage/Blob/Analyzable.html @@ -72,15 +72,10 @@

    Methods

    Instance Public methods

    -

    - - analyze() - -

    +

    analyze()

    - -
    -

    Extracts and stores metadata from the file associated with this blob using a relevant analyzer. Active Storage comes with built-in analyzers for images and videos. See ActiveStorage::Analyzer::ImageAnalyzer and ActiveStorage::Analyzer::VideoAnalyzer for information about the specific attributes they extract and the third-party libraries they require.

    +
    +

    Extracts and stores metadata from the file associated with this blob using a relevant analyzer. Active Storage comes with built-in analyzers for images and videos. See ActiveStorage::Analyzer::ImageAnalyzer and ActiveStorage::Analyzer::VideoAnalyzer for information about the specific attributes they extract and the third-party libraries they require.

    To choose the analyzer for a blob, Active Storage calls accept? on each registered analyzer in order. It uses the first analyzer for which accept? returns true when given the blob. If no registered analyzer accepts the blob, no metadata is extracted from it.

    @@ -96,8 +91,7 @@

    Outside of a Rails application, manipulate ActiveStorage.analyzers instead.

    You won’t ordinarily need to call this method from a Rails application. New blobs are automatically and asynchronously analyzed via analyze_later when they’re attached for the first time.

    -

    - +
    @@ -122,19 +116,13 @@

    -

    - - analyze_later() - -

    +

    analyze_later()

    - -
    -

    Enqueues an ActiveStorage::AnalyzeJob which calls analyze, or calls analyze inline based on analyzer class configuration.

    +
    +

    Enqueues an ActiveStorage::AnalyzeJob which calls analyze, or calls analyze inline based on analyzer class configuration.

    This method is automatically called for a blob when it’s attached for the first time. You can call it to analyze a blob again (e.g. if you add a new analyzer or modify an existing one).

    -
    - +
    @@ -163,17 +151,11 @@

    -

    - - analyzed?() - -

    +

    analyzed?()

    - -
    -

    Returns true if the blob has been analyzed.

    -
    - +
    +

    Returns true if the blob has been analyzed.

    +
    diff --git a/src/classes/ActiveStorage/Blob/Identifiable.html b/src/classes/ActiveStorage/Blob/Identifiable.html index 0c6ef4b775..badc7df4f3 100644 --- a/src/classes/ActiveStorage/Blob/Identifiable.html +++ b/src/classes/ActiveStorage/Blob/Identifiable.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - identified?() - -

    +

    identified?()

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - identify() - -

    +

    identify()

    -
    - -
    - @@ -143,17 +127,9 @@

    -

    - - identify_without_saving() - -

    +

    identify_without_saving()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Blob/Representable.html b/src/classes/ActiveStorage/Blob/Representable.html index 122ca29f54..11545621a9 100644 --- a/src/classes/ActiveStorage/Blob/Representable.html +++ b/src/classes/ActiveStorage/Blob/Representable.html @@ -78,15 +78,10 @@

    Methods

    Instance Public methods

    -

    - - preview(transformations) - -

    +

    preview(transformations)

    - -
    -

    Returns an ActiveStorage::Preview instance with the set of transformations provided. A preview is an image generated from a non-image blob. Active Storage comes with built-in previewers for videos and PDF documents. The video previewer extracts the first frame from a video and the PDF previewer extracts the first page from a PDF document.

    +
    +

    Returns an ActiveStorage::Preview instance with the set of transformations provided. A preview is an image generated from a non-image blob. Active Storage comes with built-in previewers for videos and PDF documents. The video previewer extracts the first frame from a video and the PDF previewer extracts the first page from a PDF document.

    blob.preview(resize_to_limit: [100, 100]).processed.url
     
    @@ -97,8 +92,7 @@

    This method raises ActiveStorage::UnpreviewableError if no previewer accepts the receiving blob. To determine whether a blob is accepted by any previewer, call ActiveStorage::Blob#previewable?.

    -

    - +
    @@ -127,17 +121,11 @@

    -

    - - previewable?() - -

    +

    previewable?()

    - -
    -

    Returns true if any registered previewer accepts the blob. By default, this will return true for videos and PDF documents.

    -
    - +
    +

    Returns true if any registered previewer accepts the blob. By default, this will return true for videos and PDF documents.

    +
    @@ -162,17 +150,11 @@

    -

    - - representable?() - -

    +

    representable?()

    - -
    -

    Returns true if the blob is variable or previewable.

    -
    - +
    +

    Returns true if the blob is variable or previewable.

    +
    @@ -197,15 +179,10 @@

    -

    - - representation(transformations) - -

    +

    representation(transformations)

    - -
    -

    Returns an ActiveStorage::Preview for a previewable blob or an ActiveStorage::Variant for a variable image blob.

    +
    +

    Returns an ActiveStorage::Preview for a previewable blob or an ActiveStorage::Variant for a variable image blob.

    blob.representation(resize_to_limit: [100, 100]).processed.url
     
    @@ -213,8 +190,7 @@

    Raises ActiveStorage::UnrepresentableError if the receiving blob is neither variable nor previewable. Call ActiveStorage::Blob#representable? to determine whether a blob is representable.

    See ActiveStorage::Blob#preview and ActiveStorage::Blob#variant for more information.

    -

    - +
    @@ -246,17 +222,11 @@

    -

    - - variable?() - -

    +

    variable?()

    - -
    -

    Returns true if the variant processor can transform the blob (its content type is in ActiveStorage.variable_content_types).

    -
    - +
    +

    Returns true if the variant processor can transform the blob (its content type is in ActiveStorage.variable_content_types).

    +
    @@ -281,15 +251,10 @@

    -

    - - variant(transformations) - -

    +

    variant(transformations)

    - -
    -

    Returns an ActiveStorage::Variant or ActiveStorage::VariantWithRecord instance with the set of transformations provided. This is only relevant for image files, and it allows any image to be transformed for size, colors, and the like. Example:

    +
    +

    Returns an ActiveStorage::Variant or ActiveStorage::VariantWithRecord instance with the set of transformations provided. This is only relevant for image files, and it allows any image to be transformed for size, colors, and the like. Example:

    avatar.variant(resize_to_limit: [100, 100]).processed.url
     
    @@ -362,8 +327,7 @@

    Options

    <%= image_tag user.avatar.variant(resize_to_limit: [100, 100], format: :jpeg, saver: { subsample_mode: "on", strip: true, interlace: true, quality: 80 }) %>
    -
    - +
    diff --git a/src/classes/ActiveStorage/Blobs/ProxyController.html b/src/classes/ActiveStorage/Blobs/ProxyController.html index 62a450f3ae..e51920f342 100644 --- a/src/classes/ActiveStorage/Blobs/ProxyController.html +++ b/src/classes/ActiveStorage/Blobs/ProxyController.html @@ -94,17 +94,9 @@

    Included Modules

    Instance Public methods

    -

    - - show() - -

    +

    show()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Blobs/RedirectController.html b/src/classes/ActiveStorage/Blobs/RedirectController.html index 3d79ff3d02..d3d7bcacc5 100644 --- a/src/classes/ActiveStorage/Blobs/RedirectController.html +++ b/src/classes/ActiveStorage/Blobs/RedirectController.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - show() - -

    +

    show()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/DirectUploadsController.html b/src/classes/ActiveStorage/DirectUploadsController.html index efdf790498..e031855375 100644 --- a/src/classes/ActiveStorage/DirectUploadsController.html +++ b/src/classes/ActiveStorage/DirectUploadsController.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - create() - -

    +

    create()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/DiskController.html b/src/classes/ActiveStorage/DiskController.html index 2fa26aa5f1..07f79f300d 100644 --- a/src/classes/ActiveStorage/DiskController.html +++ b/src/classes/ActiveStorage/DiskController.html @@ -74,17 +74,9 @@

    Methods

    Instance Public methods

    -

    - - show() - -

    +

    show()

    -
    - -
    - @@ -115,17 +107,9 @@

    -

    - - update() - -

    +

    update()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Filename.html b/src/classes/ActiveStorage/Filename.html index 4fb067ebc6..26a5de1a17 100644 --- a/src/classes/ActiveStorage/Filename.html +++ b/src/classes/ActiveStorage/Filename.html @@ -123,17 +123,9 @@

    Included Modules

    Class Public methods

    -

    - - new(filename) - -

    +

    new(filename)

    -
    - -
    - @@ -158,17 +150,11 @@

    -

    - - wrap(filename) - -

    +

    wrap(filename)

    - -
    -

    Returns a Filename instance based on the given filename. If the filename is a Filename, it is returned unmodified. If it is a String, it is passed to ActiveStorage::Filename.new.

    -
    - +
    +

    Returns a Filename instance based on the given filename. If the filename is a Filename, it is returned unmodified. If it is a String, it is passed to ActiveStorage::Filename.new.

    +
    @@ -197,17 +183,9 @@

    Instance Public methods

    -

    - - <=>(other) - -

    +

    <=>(other)

    -
    - -
    - @@ -232,17 +210,9 @@

    -

    - - as_json(*) - -

    +

    as_json(*)

    -
    - -
    - @@ -267,22 +237,16 @@

    -

    - - base() - -

    +

    base()

    - -
    -

    Returns the part of the filename preceding any extension.

    +
    +

    Returns the part of the filename preceding any extension.

    ActiveStorage::Filename.new("racecar.jpg").base # => "racecar"
     ActiveStorage::Filename.new("racecar").base     # => "racecar"
     ActiveStorage::Filename.new(".gitignore").base  # => ".gitignore"
     
    -
    - +
    @@ -307,24 +271,17 @@

    -

    - - extension() - -

    +

    extension()

    -
    - -
    - - +

    + Alias for: + extension_without_delimiter. +

    @@ -332,22 +289,16 @@

    -

    - - extension_with_delimiter() - -

    +

    extension_with_delimiter()

    - -
    -

    Returns the extension of the filename (i.e. the substring following the last dot, excluding a dot at the beginning) with the dot that precedes it. If the filename has no extension, an empty string is returned.

    +
    +

    Returns the extension of the filename (i.e. the substring following the last dot, excluding a dot at the beginning) with the dot that precedes it. If the filename has no extension, an empty string is returned.

    ActiveStorage::Filename.new("racecar.jpg").extension_with_delimiter # => ".jpg"
     ActiveStorage::Filename.new("racecar").extension_with_delimiter     # => ""
     ActiveStorage::Filename.new(".gitignore").extension_with_delimiter  # => ""
     
    -
    - +
    @@ -372,27 +323,23 @@

    -

    - - extension_without_delimiter() - -

    +

    extension_without_delimiter()

    - -
    -

    Returns the extension of the filename (i.e. the substring following the last dot, excluding a dot at the beginning). If the filename has no extension, an empty string is returned.

    +
    +

    Returns the extension of the filename (i.e. the substring following the last dot, excluding a dot at the beginning). If the filename has no extension, an empty string is returned.

    ActiveStorage::Filename.new("racecar.jpg").extension_without_delimiter # => "jpg"
     ActiveStorage::Filename.new("racecar").extension_without_delimiter     # => ""
     ActiveStorage::Filename.new(".gitignore").extension_without_delimiter  # => ""
     
    -
    - +
    -
    - Also aliased as: extension -
    +

    + Also aliased as: + + extension. +

    @@ -416,23 +363,17 @@

    -

    - - sanitized() - -

    +

    sanitized()

    - -
    -

    Returns the sanitized filename.

    +
    +

    Returns the sanitized filename.

    ActiveStorage::Filename.new("foo:bar.jpg").sanitized # => "foo-bar.jpg"
     ActiveStorage::Filename.new("foo/bar.jpg").sanitized # => "foo-bar.jpg"
     

    Characters considered unsafe for storage (e.g. , $, and the RTL override character) are replaced with a dash.

    -
    - +
    @@ -457,22 +398,18 @@

    -

    - - to_s() - -

    +

    to_s()

    - -
    -

    Returns the sanitized version of the filename.

    -
    - +
    +

    Returns the sanitized version of the filename.

    +
    -
    - Also aliased as: to_str -
    +

    + Also aliased as: + + to_str. +

    @@ -496,24 +433,17 @@

    -

    - - to_str() - -

    +

    to_str()

    -
    - -
    - -
    - Alias for: to_s -
    +

    + Alias for: + to_s. +

    diff --git a/src/classes/ActiveStorage/FixtureSet.html b/src/classes/ActiveStorage/FixtureSet.html index f496eb6ba2..2636ebadcb 100644 --- a/src/classes/ActiveStorage/FixtureSet.html +++ b/src/classes/ActiveStorage/FixtureSet.html @@ -128,15 +128,10 @@

    Included Modules

    Class Public methods

    -

    - - blob(filename:, **attributes) - -

    +

    blob(filename:, **attributes)

    - -
    -

    Generate a YAML-encoded representation of an ActiveStorage::Blob instance’s attributes, resolve the file relative to the directory mentioned by ActiveSupport::Testing::FileFixtures.file_fixture, and upload the file to the Service

    +
    +

    Generate a YAML-encoded representation of an ActiveStorage::Blob instance’s attributes, resolve the file relative to the directory mentioned by ActiveSupport::Testing::FileFixtures.file_fixture, and upload the file to the Service

    Examples

    @@ -151,8 +146,7 @@

    Examples

    service_name: "public" ) %> -
    - +
    @@ -181,17 +175,9 @@

    Examples

    Instance Public methods

    -

    - - prepare(instance, **attributes) - -

    +

    prepare(instance, **attributes)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/MirrorJob.html b/src/classes/ActiveStorage/MirrorJob.html index 9e5725aa57..ead916a2c0 100644 --- a/src/classes/ActiveStorage/MirrorJob.html +++ b/src/classes/ActiveStorage/MirrorJob.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - perform(key, checksum:) - -

    +

    perform(key, checksum:)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Preview.html b/src/classes/ActiveStorage/Preview.html index a768cfbf6a..509351acc9 100644 --- a/src/classes/ActiveStorage/Preview.html +++ b/src/classes/ActiveStorage/Preview.html @@ -144,17 +144,9 @@

    Attributes

    Class Public methods

    -

    - - new(blob, variation_or_variation_key) - -

    +

    new(blob, variation_or_variation_key)

    -
    - -
    - @@ -183,17 +175,11 @@

    Instance Public methods

    -

    - - download(&block) - -

    +

    download(&block)

    - -
    -

    Downloads the file associated with this preview’s variant. If no block is given, the entire file is read into memory and returned. That’ll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks. Raises ActiveStorage::Preview::UnprocessedError if the preview has not been processed yet.

    -
    - +
    +

    Downloads the file associated with this preview’s variant. If no block is given, the entire file is read into memory and returned. That’ll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks. Raises ActiveStorage::Preview::UnprocessedError if the preview has not been processed yet.

    +
    @@ -222,17 +208,11 @@

    -

    - - image() - -

    +

    image()

    - -
    -

    Returns the blob’s attached preview image.

    -
    - +
    +

    Returns the blob’s attached preview image.

    +
    @@ -257,17 +237,11 @@

    -

    - - key() - -

    +

    key()

    - -
    -

    Returns a combination key of the blob and the variation that together identifies a specific variant.

    -
    - +
    +

    Returns a combination key of the blob and the variation that together identifies a specific variant.

    +
    @@ -296,22 +270,16 @@

    -

    - - processed() - -

    +

    processed()

    - -
    -

    Processes the preview if it has not been processed yet. Returns the receiving ActiveStorage::Preview instance for convenience:

    +
    +

    Processes the preview if it has not been processed yet. Returns the receiving ActiveStorage::Preview instance for convenience:

    blob.preview(resize_to_limit: [100, 100]).processed.url
     

    Processing a preview generates an image from its blob and attaches the preview image to the blob. Because the preview image is stored with the blob, it is only generated once.

    -
    - +
    @@ -338,19 +306,13 @@

    -

    - - url(**options) - -

    +

    url(**options)

    - -
    -

    Returns the URL of the preview’s variant on the service. Raises ActiveStorage::Preview::UnprocessedError if the preview has not been processed yet.

    +
    +

    Returns the URL of the preview’s variant on the service. Raises ActiveStorage::Preview::UnprocessedError if the preview has not been processed yet.

    This method synchronously processes a variant of the preview image, so do not call it in views. Instead, generate a stable URL that redirects to the URL returned by this method.

    -
    - +
    diff --git a/src/classes/ActiveStorage/PreviewImageJob.html b/src/classes/ActiveStorage/PreviewImageJob.html index ba9e93bb11..252de1766a 100644 --- a/src/classes/ActiveStorage/PreviewImageJob.html +++ b/src/classes/ActiveStorage/PreviewImageJob.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - perform(blob, variations) - -

    +

    perform(blob, variations)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Previewer.html b/src/classes/ActiveStorage/Previewer.html index af96e25331..7193baf104 100644 --- a/src/classes/ActiveStorage/Previewer.html +++ b/src/classes/ActiveStorage/Previewer.html @@ -132,17 +132,11 @@

    Attributes

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    - -
    -

    Implement this method in a concrete subclass. Have it return true when given a blob from which the previewer can generate an image.

    -
    - +
    +

    Implement this method in a concrete subclass. Have it return true when given a blob from which the previewer can generate an image.

    +
    @@ -167,17 +161,9 @@

    -

    - - new(blob) - -

    +

    new(blob)

    -
    - -
    - @@ -206,17 +192,11 @@

    Instance Public methods

    -

    - - preview(**options) - -

    +

    preview(**options)

    - -
    -

    Override this method in a concrete subclass. Have it yield an attachable preview image (i.e. anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to the underlying blob that is created.

    -
    - +
    +

    Override this method in a concrete subclass. Have it yield an attachable preview image (i.e. anything accepted by ActiveStorage::Attached::One#attach). Pass the additional options to the underlying blob that is created.

    +
    @@ -244,17 +224,11 @@

    Instance Private methods

    -

    - - download_blob_to_tempfile(&block) - -

    +

    download_blob_to_tempfile(&block)

    - -
    -

    Downloads the blob to a tempfile on disk. Yields the tempfile.

    -
    - +
    +

    Downloads the blob to a tempfile on disk. Yields the tempfile.

    +
    @@ -279,15 +253,10 @@

    -

    - - draw(*argv) - -

    +

    draw(*argv)

    - -
    -

    Executes a system command, capturing its binary output in a tempfile. Yields the tempfile.

    +
    +

    Executes a system command, capturing its binary output in a tempfile. Yields the tempfile.

    Use this method to shell out to a system library (e.g. muPDF or FFmpeg) for preview image generation. The resulting tempfile can be used as the :io value in an attachable Hash:

    @@ -301,8 +270,7 @@

    The output tempfile is opened in the directory returned by tmpdir.

    -

    - +
    @@ -333,17 +301,9 @@

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -368,17 +328,9 @@

    -

    - - tmpdir() - -

    +

    tmpdir()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html b/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html index 485bdddc9c..82f39820f9 100644 --- a/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html +++ b/src/classes/ActiveStorage/Previewer/MuPDFPreviewer.html @@ -79,17 +79,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - @@ -114,17 +106,9 @@

    -

    - - mutool_exists?() - -

    +

    mutool_exists?()

    -
    - -
    - @@ -153,17 +137,9 @@

    -

    - - mutool_path() - -

    +

    mutool_path()

    -
    - -
    - @@ -188,17 +164,9 @@

    -

    - - pdf?(content_type) - -

    +

    pdf?(content_type)

    -
    - -
    - @@ -227,17 +195,9 @@

    Instance Public methods

    -

    - - preview(**options) - -

    +

    preview(**options)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html b/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html index 6de870caf7..a11a4c4063 100644 --- a/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html +++ b/src/classes/ActiveStorage/Previewer/PopplerPDFPreviewer.html @@ -79,17 +79,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - @@ -114,17 +106,9 @@

    -

    - - pdf?(content_type) - -

    +

    pdf?(content_type)

    -
    - -
    - @@ -149,17 +133,9 @@

    -

    - - pdftoppm_exists?() - -

    +

    pdftoppm_exists?()

    -
    - -
    - @@ -186,17 +162,9 @@

    -

    - - pdftoppm_path() - -

    +

    pdftoppm_path()

    -
    - -
    - @@ -225,17 +193,9 @@

    Instance Public methods

    -

    - - preview(**options) - -

    +

    preview(**options)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Previewer/VideoPreviewer.html b/src/classes/ActiveStorage/Previewer/VideoPreviewer.html index 197541630c..c4820ee97d 100644 --- a/src/classes/ActiveStorage/Previewer/VideoPreviewer.html +++ b/src/classes/ActiveStorage/Previewer/VideoPreviewer.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - accept?(blob) - -

    +

    accept?(blob)

    -
    - -
    - @@ -110,17 +102,9 @@

    -

    - - ffmpeg_exists?() - -

    +

    ffmpeg_exists?()

    -
    - -
    - @@ -147,17 +131,9 @@

    -

    - - ffmpeg_path() - -

    +

    ffmpeg_path()

    -
    - -
    - @@ -186,17 +162,9 @@

    Instance Public methods

    -

    - - preview(**options) - -

    +

    preview(**options)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/PurgeJob.html b/src/classes/ActiveStorage/PurgeJob.html index 4b21d3e673..4329516ff4 100644 --- a/src/classes/ActiveStorage/PurgeJob.html +++ b/src/classes/ActiveStorage/PurgeJob.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - perform(blob) - -

    +

    perform(blob)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html b/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html index a51dcf36d7..817d2320b6 100644 --- a/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html +++ b/src/classes/ActiveStorage/Reflection/ActiveRecordExtensions/ClassMethods.html @@ -62,17 +62,11 @@

    Methods

    Instance Public methods

    -

    - - reflect_on_all_attachments() - -

    +

    reflect_on_all_attachments()

    - -
    -

    Returns an array of reflection objects for all the attachments in the class.

    -
    - +
    +

    Returns an array of reflection objects for all the attachments in the class.

    +
    @@ -97,21 +91,15 @@

    -

    - - reflect_on_attachment(attachment) - -

    +

    reflect_on_attachment(attachment)

    - -
    -

    Returns the reflection object for the named attachment.

    +
    +

    Returns the reflection object for the named attachment.

    User.reflect_on_attachment(:avatar)
     # => the avatar reflection
     
    -
    - +
    diff --git a/src/classes/ActiveStorage/Representations/ProxyController.html b/src/classes/ActiveStorage/Representations/ProxyController.html index b2661fbe68..47b78a110d 100644 --- a/src/classes/ActiveStorage/Representations/ProxyController.html +++ b/src/classes/ActiveStorage/Representations/ProxyController.html @@ -94,17 +94,9 @@

    Included Modules

    Instance Public methods

    -

    - - show() - -

    +

    show()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Representations/RedirectController.html b/src/classes/ActiveStorage/Representations/RedirectController.html index c0424f887c..26c168d7c8 100644 --- a/src/classes/ActiveStorage/Representations/RedirectController.html +++ b/src/classes/ActiveStorage/Representations/RedirectController.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - show() - -

    +

    show()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Service.html b/src/classes/ActiveStorage/Service.html index 1de1185882..f1d31afc51 100644 --- a/src/classes/ActiveStorage/Service.html +++ b/src/classes/ActiveStorage/Service.html @@ -201,17 +201,11 @@

    Attributes

    Class Public methods

    -

    - - configure(service_name, configurations) - -

    +

    configure(service_name, configurations)

    - -
    -

    Configure an Active Storage service by name from a set of configurations, typically loaded from a YAML file. The Active Storage engine uses this to set the global Active Storage service when the app boots.

    -
    - +
    +

    Configure an Active Storage service by name from a set of configurations, typically loaded from a YAML file. The Active Storage engine uses this to set the global Active Storage service when the app boots.

    +
    @@ -240,17 +234,11 @@

    Instance Public methods

    -

    - - compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}) - -

    +

    compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})

    - -
    -

    Concatenate multiple files into a single “composed” file.

    -
    - +
    +

    Concatenate multiple files into a single “composed” file.

    +
    @@ -275,17 +263,11 @@

    -

    - - delete(key) - -

    +

    delete(key)

    - -
    -

    Delete the file at the key.

    -
    - +
    +

    Delete the file at the key.

    +
    @@ -310,17 +292,11 @@

    -

    - - delete_prefixed(prefix) - -

    +

    delete_prefixed(prefix)

    - -
    -

    Delete files at keys starting with the prefix.

    -
    - +
    +

    Delete files at keys starting with the prefix.

    +
    @@ -345,17 +321,11 @@

    -

    - - download(key) - -

    +

    download(key)

    - -
    -

    Return the content of the file at the key.

    -
    - +
    +

    Return the content of the file at the key.

    +
    @@ -380,17 +350,11 @@

    -

    - - download_chunk(key, range) - -

    +

    download_chunk(key, range)

    - -
    -

    Return the partial content in the byte range of the file at the key.

    -
    - +
    +

    Return the partial content in the byte range of the file at the key.

    +
    @@ -415,17 +379,11 @@

    -

    - - exist?(key) - -

    +

    exist?(key)

    - -
    -

    Return true if a file exists at the key.

    -
    - +
    +

    Return true if a file exists at the key.

    +
    @@ -450,17 +408,11 @@

    -

    - - headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: {}) - -

    +

    headers_for_direct_upload(key, filename:, content_type:, content_length:, checksum:, custom_metadata: {})

    - -
    -

    Returns a Hash of headers for url_for_direct_upload requests.

    -
    - +
    +

    Returns a Hash of headers for url_for_direct_upload requests.

    +
    @@ -485,17 +437,9 @@

    -

    - - open(*args, **options, &block) - -

    +

    open(*args, **options, &block)

    -
    - -
    - @@ -520,17 +464,9 @@

    -

    - - public?() - -

    +

    public?()

    -
    - -
    - @@ -555,17 +491,11 @@

    -

    - - update_metadata(key, **metadata) - -

    +

    update_metadata(key, **metadata)

    - -
    -

    Update metadata for the file identified by key in the service. Override in subclasses only if the service needs to store specific metadata that has to be updated upon identification.

    -
    - +
    +

    Update metadata for the file identified by key in the service. Override in subclasses only if the service needs to store specific metadata that has to be updated upon identification.

    +
    @@ -589,17 +519,11 @@

    -

    - - upload(key, io, checksum: nil, **options) - -

    +

    upload(key, io, checksum: nil, **options)

    - -
    -

    Upload the io to the key specified. If a checksum is provided, the service will ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.

    -
    - +
    +

    Upload the io to the key specified. If a checksum is provided, the service will ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.

    +
    @@ -624,17 +548,11 @@

    -

    - - url(key, **options) - -

    +

    url(key, **options)

    - -
    -

    Returns the URL for the file at the key. This returns a permanent URL for public files, and returns a short-lived URL for private files. For private files you can provide the disposition (:inline or :attachment), filename, and content_type that you wish the file to be served with on request. Additionally, you can also provide the amount of seconds the URL will be valid for, specified in expires_in.

    -
    - +
    +

    Returns the URL for the file at the key. This returns a permanent URL for public files, and returns a short-lived URL for private files. For private files you can provide the disposition (:inline or :attachment), filename, and content_type that you wish the file to be served with on request. Additionally, you can also provide the amount of seconds the URL will be valid for, specified in expires_in.

    +
    @@ -670,17 +588,11 @@

    -

    - - url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {}) - -

    +

    url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})

    - -
    -

    Returns a signed, temporary URL that a direct upload file can be PUT to on the key. The URL will be valid for the amount of seconds specified in expires_in. You must also provide the content_type, content_length, and checksum of the file that will be uploaded. All these attributes will be validated by the service upon upload.

    -
    - +
    +

    Returns a signed, temporary URL that a direct upload file can be PUT to on the key. The URL will be valid for the amount of seconds specified in expires_in. You must also provide the content_type, content_length, and checksum of the file that will be uploaded. All these attributes will be validated by the service upon upload.

    +
    diff --git a/src/classes/ActiveStorage/Service/DiskService.html b/src/classes/ActiveStorage/Service/DiskService.html index 58010a0cbb..921d213918 100644 --- a/src/classes/ActiveStorage/Service/DiskService.html +++ b/src/classes/ActiveStorage/Service/DiskService.html @@ -121,17 +121,9 @@

    Attributes

    Class Public methods

    -

    - - new(root:, public: false, **options) - -

    +

    new(root:, public: false, **options)

    -
    - -
    - @@ -161,17 +153,9 @@

    Instance Public methods

    -

    - - compose(source_keys, destination_key, **) - -

    +

    compose(source_keys, destination_key, **)

    -
    - -
    - @@ -202,17 +186,9 @@

    -

    - - delete(key) - -

    +

    delete(key)

    -
    - -
    - @@ -241,17 +217,9 @@

    -

    - - delete_prefixed(prefix) - -

    +

    delete_prefixed(prefix)

    -
    - -
    - @@ -280,17 +248,9 @@

    -

    - - download(key, &block) - -

    +

    download(key, &block)

    -
    - -
    - @@ -325,17 +285,9 @@

    -

    - - download_chunk(key, range) - -

    +

    download_chunk(key, range)

    -
    - -
    - @@ -367,17 +319,9 @@

    -

    - - exist?(key) - -

    +

    exist?(key)

    -
    - -
    - @@ -406,17 +350,9 @@

    -

    - - headers_for_direct_upload(key, content_type:, **) - -

    +

    headers_for_direct_upload(key, content_type:, **)

    -
    - -
    - @@ -441,17 +377,9 @@

    -

    - - upload(key, io, checksum: nil, **) - -

    +

    upload(key, io, checksum: nil, **)

    -
    - -
    - @@ -479,17 +407,9 @@

    -

    - - url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {}) - -

    +

    url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Service/GCSService.html b/src/classes/ActiveStorage/Service/GCSService.html index 8944d6d078..7830d64bae 100644 --- a/src/classes/ActiveStorage/Service/GCSService.html +++ b/src/classes/ActiveStorage/Service/GCSService.html @@ -126,17 +126,9 @@

    Methods

    Class Public methods

    -

    - - new(public: false, **config) - -

    +

    new(public: false, **config)

    -
    - -
    - @@ -166,17 +158,9 @@

    Instance Public methods

    -

    - - compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}) - -

    +

    compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})

    -
    - -
    - @@ -205,17 +189,9 @@

    -

    - - delete(key) - -

    +

    delete(key)

    -
    - -
    - @@ -244,17 +220,9 @@

    -

    - - delete_prefixed(prefix) - -

    +

    delete_prefixed(prefix)

    -
    - -
    - @@ -285,17 +253,9 @@

    -

    - - download(key, &block) - -

    +

    download(key, &block)

    -
    - -
    - @@ -330,17 +290,9 @@

    -

    - - download_chunk(key, range) - -

    +

    download_chunk(key, range)

    -
    - -
    - @@ -369,17 +321,9 @@

    -

    - - exist?(key) - -

    +

    exist?(key)

    -
    - -
    - @@ -408,17 +352,9 @@

    -

    - - headers_for_direct_upload(key, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **) - -

    +

    headers_for_direct_upload(key, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)

    -
    - -
    - @@ -450,17 +386,9 @@

    -

    - - update_metadata(key, content_type:, disposition: nil, filename: nil, custom_metadata: {}) - -

    +

    update_metadata(key, content_type:, disposition: nil, filename: nil, custom_metadata: {})

    -
    - -
    - @@ -491,17 +419,9 @@

    -

    - - upload(key, io, checksum: nil, content_type: nil, disposition: nil, filename: nil, custom_metadata: {}) - -

    +

    upload(key, io, checksum: nil, content_type: nil, disposition: nil, filename: nil, custom_metadata: {})

    -
    - -
    - @@ -535,17 +455,9 @@

    -

    - - url_for_direct_upload(key, expires_in:, checksum:, custom_metadata: {}, **) - -

    +

    url_for_direct_upload(key, expires_in:, checksum:, custom_metadata: {}, **)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Service/MirrorService.html b/src/classes/ActiveStorage/Service/MirrorService.html index a15f160c5e..2d32702983 100644 --- a/src/classes/ActiveStorage/Service/MirrorService.html +++ b/src/classes/ActiveStorage/Service/MirrorService.html @@ -120,17 +120,9 @@

    Attributes

    Class Public methods

    -

    - - new(primary:, mirrors:) - -

    +

    new(primary:, mirrors:)

    -
    - -
    - @@ -167,17 +159,11 @@

    Instance Public methods

    -

    - - delete(key) - -

    +

    delete(key)

    - -
    -

    Delete the file at the key on all services.

    -
    - +
    +

    Delete the file at the key on all services.

    +
    @@ -202,17 +188,11 @@

    -

    - - delete_prefixed(prefix) - -

    +

    delete_prefixed(prefix)

    - -
    -

    Delete files at keys starting with the prefix on all services.

    -
    - +
    +

    Delete files at keys starting with the prefix on all services.

    +
    @@ -237,17 +217,11 @@

    -

    - - mirror(key, checksum:) - -

    +

    mirror(key, checksum:)

    - -
    -

    Copy the file at the key from the primary service to each of the mirrors where it doesn’t already exist.

    -
    - +
    +

    Copy the file at the key from the primary service to each of the mirrors where it doesn’t already exist.

    +
    @@ -281,17 +255,11 @@

    -

    - - upload(key, io, checksum: nil, **options) - -

    +

    upload(key, io, checksum: nil, **options)

    - -
    -

    Upload the io to the key specified to all services. The upload to the primary service is done synchronously whereas the upload to the mirrors is done asynchronously. If a checksum is provided, all services will ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.

    -
    - +
    +

    Upload the io to the key specified to all services. The upload to the primary service is done synchronously whereas the upload to the mirrors is done asynchronously. If a checksum is provided, all services will ensure a match when the upload has completed or raise an ActiveStorage::IntegrityError.

    +
    diff --git a/src/classes/ActiveStorage/Service/S3Service.html b/src/classes/ActiveStorage/Service/S3Service.html index 4a87088182..421661276a 100644 --- a/src/classes/ActiveStorage/Service/S3Service.html +++ b/src/classes/ActiveStorage/Service/S3Service.html @@ -165,17 +165,9 @@

    Attributes

    Class Public methods

    -

    - - new(bucket:, upload: {}, public: false, **options) - -

    +

    new(bucket:, upload: {}, public: false, **options)

    -
    - -
    - @@ -212,17 +204,9 @@

    Instance Public methods

    -

    - - compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}) - -

    +

    compose(source_keys, destination_key, filename: nil, content_type: nil, disposition: nil, custom_metadata: {})

    -
    - -
    - @@ -262,17 +246,9 @@

    -

    - - delete(key) - -

    +

    delete(key)

    -
    - -
    - @@ -299,17 +275,9 @@

    -

    - - delete_prefixed(prefix) - -

    +

    delete_prefixed(prefix)

    -
    - -
    - @@ -336,17 +304,9 @@

    -

    - - download(key, &block) - -

    +

    download(key, &block)

    -
    - -
    - @@ -381,17 +341,9 @@

    -

    - - download_chunk(key, range) - -

    +

    download_chunk(key, range)

    -
    - -
    - @@ -420,17 +372,9 @@

    -

    - - exist?(key) - -

    +

    exist?(key)

    -
    - -
    - @@ -459,17 +403,9 @@

    -

    - - headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **) - -

    +

    headers_for_direct_upload(key, content_type:, checksum:, filename: nil, disposition: nil, custom_metadata: {}, **)

    -
    - -
    - @@ -496,17 +432,9 @@

    -

    - - upload(key, io, checksum: nil, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}, **) - -

    +

    upload(key, io, checksum: nil, filename: nil, content_type: nil, disposition: nil, custom_metadata: {}, **)

    -
    - -
    - @@ -539,17 +467,9 @@

    -

    - - url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {}) - -

    +

    url_for_direct_upload(key, expires_in:, content_type:, content_length:, checksum:, custom_metadata: {})

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Streaming.html b/src/classes/ActiveStorage/Streaming.html index 46b26cff3a..58fdb05ab4 100644 --- a/src/classes/ActiveStorage/Streaming.html +++ b/src/classes/ActiveStorage/Streaming.html @@ -93,17 +93,11 @@

    Constants

    Instance Private methods

    -

    - - send_blob_stream(blob, disposition: nil) - -

    +

    send_blob_stream(blob, disposition: nil)

    - -
    -

    Stream the blob from storage directly to the response. The disposition can be controlled by setting disposition. The content type and filename is set directly from the blob.

    -
    - +
    +

    Stream the blob from storage directly to the response. The disposition can be controlled by setting disposition. The content type and filename is set directly from the blob.

    +
    diff --git a/src/classes/ActiveStorage/TransformJob.html b/src/classes/ActiveStorage/TransformJob.html index 8ccbf570a3..a7423da8f5 100644 --- a/src/classes/ActiveStorage/TransformJob.html +++ b/src/classes/ActiveStorage/TransformJob.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - perform(blob, transformations) - -

    +

    perform(blob, transformations)

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Transformers/Transformer.html b/src/classes/ActiveStorage/Transformers/Transformer.html index 0d8fbc373a..a92bbec931 100644 --- a/src/classes/ActiveStorage/Transformers/Transformer.html +++ b/src/classes/ActiveStorage/Transformers/Transformer.html @@ -98,17 +98,9 @@

    Attributes

    Class Public methods

    -

    - - new(transformations) - -

    +

    new(transformations)

    -
    - -
    - @@ -137,17 +129,11 @@

    Instance Public methods

    -

    - - transform(file, format:) - -

    +

    transform(file, format:)

    - -
    -

    Applies the transformations to the source image in file, producing a target image in the specified format. Yields an open Tempfile containing the target image. Closes and unlinks the output tempfile after yielding to the given block. Returns the result of the block.

    -
    - +
    +

    Applies the transformations to the source image in file, producing a target image in the specified format. Yields an open Tempfile containing the target image. Closes and unlinks the output tempfile after yielding to the given block. Returns the result of the block.

    +
    @@ -181,17 +167,11 @@

    Instance Private methods

    -

    - - process(file, format:) - -

    +

    process(file, format:)

    - -
    -

    Returns an open Tempfile containing a transformed image in the given format. All subclasses implement this method.

    -
    - +
    +

    Returns an open Tempfile containing a transformed image in the given format. All subclasses implement this method.

    +
    diff --git a/src/classes/ActiveStorage/Transformers/Vips.html b/src/classes/ActiveStorage/Transformers/Vips.html index 93d2261664..36a651df2c 100644 --- a/src/classes/ActiveStorage/Transformers/Vips.html +++ b/src/classes/ActiveStorage/Transformers/Vips.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - processor() - -

    +

    processor()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Variant.html b/src/classes/ActiveStorage/Variant.html index b7ea5a6409..9bf2a9458a 100644 --- a/src/classes/ActiveStorage/Variant.html +++ b/src/classes/ActiveStorage/Variant.html @@ -162,17 +162,9 @@

    Attributes

    Class Public methods

    -

    - - new(blob, variation_or_variation_key) - -

    +

    new(blob, variation_or_variation_key)

    -
    - -
    - @@ -201,17 +193,11 @@

    Instance Public methods

    -

    - - destroy() - -

    +

    destroy()

    - -
    -

    Deletes variant file from service.

    -
    - +
    +

    Deletes variant file from service.

    +
    @@ -236,17 +222,11 @@

    -

    - - download(&block) - -

    +

    download(&block)

    - -
    -

    Downloads the file associated with this variant. If no block is given, the entire file is read into memory and returned. That’ll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks.

    -
    - +
    +

    Downloads the file associated with this variant. If no block is given, the entire file is read into memory and returned. That’ll use a lot of RAM for very large files. If a block is given, then the download is streamed and yielded in chunks.

    +
    @@ -271,17 +251,9 @@

    -

    - - filename() - -

    +

    filename()

    -
    - -
    - @@ -306,17 +278,11 @@

    -

    - - image() - -

    +

    image()

    - -
    -

    Returns the receiving variant. Allows ActiveStorage::Variant and ActiveStorage::Preview instances to be used interchangeably.

    -
    - +
    +

    Returns the receiving variant. Allows ActiveStorage::Variant and ActiveStorage::Preview instances to be used interchangeably.

    +
    @@ -341,17 +307,11 @@

    -

    - - key() - -

    +

    key()

    - -
    -

    Returns a combination key of the blob and the variation that together identifies a specific variant.

    -
    - +
    +

    Returns a combination key of the blob and the variation that together identifies a specific variant.

    +
    @@ -376,17 +336,11 @@

    -

    - - processed() - -

    +

    processed()

    - -
    -

    Returns the variant instance itself after it’s been processed or an existing processing has been found on the service.

    -
    - +
    +

    Returns the variant instance itself after it’s been processed or an existing processing has been found on the service.

    +
    @@ -412,19 +366,13 @@

    -

    - - url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline) - -

    +

    url(expires_in: ActiveStorage.service_urls_expire_in, disposition: :inline)

    - -
    -

    Returns the URL of the blob variant on the service. See ActiveStorage::Blob#url for details.

    +
    +

    Returns the URL of the blob variant on the service. See ActiveStorage::Blob#url for details.

    Use url_for(variant) (or the implied form, like link_to variant or redirect_to variant) to get the stable URL for a variant that points to the ActiveStorage::Representations::ProxyController or ActiveStorage::Representations::RedirectController, which in turn will use this service_call method for its redirection.

    -
    - +
    diff --git a/src/classes/ActiveStorage/VariantWithRecord.html b/src/classes/ActiveStorage/VariantWithRecord.html index ba68fc3f32..cfb159374b 100644 --- a/src/classes/ActiveStorage/VariantWithRecord.html +++ b/src/classes/ActiveStorage/VariantWithRecord.html @@ -109,17 +109,9 @@

    Attributes

    Class Public methods

    -

    - - new(blob, variation) - -

    +

    new(blob, variation)

    -
    - -
    - @@ -148,17 +140,11 @@

    Instance Public methods

    -

    - - destroy() - -

    +

    destroy()

    - -
    -

    Destroys record and deletes file from service.

    -
    - +
    +

    Destroys record and deletes file from service.

    +
    @@ -183,17 +169,9 @@

    -

    - - filename() - -

    +

    filename()

    -
    - -
    - @@ -218,17 +196,9 @@

    -

    - - image() - -

    +

    image()

    -
    - -
    - @@ -253,17 +223,9 @@

    -

    - - processed() - -

    +

    processed()

    -
    - -
    - diff --git a/src/classes/ActiveStorage/Variation.html b/src/classes/ActiveStorage/Variation.html index d7677ba685..3b97851f57 100644 --- a/src/classes/ActiveStorage/Variation.html +++ b/src/classes/ActiveStorage/Variation.html @@ -128,17 +128,11 @@

    Attributes

    Class Public methods

    -

    - - decode(key) - -

    +

    decode(key)

    - -
    -

    Returns a Variation instance with the transformations that were encoded by encode.

    -
    - +
    +

    Returns a Variation instance with the transformations that were encoded by encode.

    +
    @@ -163,17 +157,11 @@

    -

    - - encode(transformations) - -

    +

    encode(transformations)

    - -
    -

    Returns a signed key for the transformations, which can be used to refer to a specific variation in a URL or combined key (like ActiveStorage::Variant#key).

    -
    - +
    +

    Returns a signed key for the transformations, which can be used to refer to a specific variation in a URL or combined key (like ActiveStorage::Variant#key).

    +
    @@ -198,17 +186,9 @@

    -

    - - new(transformations) - -

    +

    new(transformations)

    -
    - -
    - @@ -233,17 +213,11 @@

    -

    - - wrap(variator) - -

    +

    wrap(variator)

    - -
    -

    Returns a Variation instance based on the given variator. If the variator is a Variation, it is returned unmodified. If it is a String, it is passed to ActiveStorage::Variation.decode. Otherwise, it is assumed to be a transformations Hash and is passed directly to the constructor.

    -
    - +
    +

    Returns a Variation instance based on the given variator. If the variator is a Variation, it is returned unmodified. If it is a String, it is passed to ActiveStorage::Variation.decode. Otherwise, it is assumed to be a transformations Hash and is passed directly to the constructor.

    +
    @@ -279,17 +253,9 @@

    Instance Public methods

    -

    - - content_type() - -

    +

    content_type()

    -
    - -
    - @@ -314,17 +280,9 @@

    -

    - - default_to(defaults) - -

    +

    default_to(defaults)

    -
    - -
    - @@ -349,17 +307,9 @@

    -

    - - digest() - -

    +

    digest()

    -
    - -
    - @@ -384,17 +334,9 @@

    -

    - - format() - -

    +

    format()

    -
    - -
    - @@ -423,17 +365,11 @@

    -

    - - key() - -

    +

    key()

    - -
    -

    Returns a signed key for all the transformations that this variation was instantiated with.

    -
    - +
    +

    Returns a signed key for all the transformations that this variation was instantiated with.

    +
    @@ -458,17 +394,11 @@

    -

    - - transform(file, &block) - -

    +

    transform(file, &block)

    - -
    -

    Accepts a File object, performs the transformations against it, and saves the transformed image into a temporary file.

    -
    - +
    +

    Accepts a File object, performs the transformations against it, and saves the transformed image into a temporary file.

    +
    diff --git a/src/classes/ActiveSupport.html b/src/classes/ActiveSupport.html index 57dde748ee..439f13af6e 100644 --- a/src/classes/ActiveSupport.html +++ b/src/classes/ActiveSupport.html @@ -735,17 +735,9 @@

    Included Modules

    Class Public methods

    -

    - - cache_format_version() - -

    +

    cache_format_version()

    -
    - -
    - @@ -770,17 +762,9 @@

    -

    - - cache_format_version=(value) - -

    +

    cache_format_version=(value)

    -
    - -
    - @@ -805,17 +789,9 @@

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - @@ -842,17 +818,11 @@

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Active Support as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Support as a Gem::Version.

    +
    @@ -877,17 +847,9 @@

    -

    - - to_time_preserves_timezone() - -

    +

    to_time_preserves_timezone()

    -
    - -
    - @@ -915,17 +877,9 @@

    -

    - - to_time_preserves_timezone=(value) - -

    +

    to_time_preserves_timezone=(value)

    -
    - -
    - @@ -954,17 +908,9 @@

    -

    - - utc_to_local_returns_utc_offset_times() - -

    +

    utc_to_local_returns_utc_offset_times()

    -
    - -
    - @@ -989,17 +935,9 @@

    -

    - - utc_to_local_returns_utc_offset_times=(value) - -

    +

    utc_to_local_returns_utc_offset_times=(value)

    -
    - -
    - @@ -1024,17 +962,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Active Support as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Active Support as a Gem::Version.

    +
    diff --git a/src/classes/ActiveSupport/ActionableError/ClassMethods.html b/src/classes/ActiveSupport/ActionableError/ClassMethods.html index e9ee67a266..ed27d7c5a1 100644 --- a/src/classes/ActiveSupport/ActionableError/ClassMethods.html +++ b/src/classes/ActiveSupport/ActionableError/ClassMethods.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - action(name, &block) - -

    +

    action(name, &block)

    - -
    -

    Defines an action that can resolve the error.

    +
    +

    Defines an action that can resolve the error.

    class PendingMigrationError < MigrationError
       include ActiveSupport::ActionableError
    @@ -76,8 +71,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActiveSupport/ArrayInquirer.html b/src/classes/ActiveSupport/ArrayInquirer.html index e8ca2f47f2..ca725c2a59 100644 --- a/src/classes/ActiveSupport/ArrayInquirer.html +++ b/src/classes/ActiveSupport/ArrayInquirer.html @@ -79,15 +79,10 @@

    Methods

    Instance Public methods

    -

    - - any?(*candidates) - -

    +

    any?(*candidates)

    - -
    -

    Passes each element of candidates collection to ArrayInquirer collection. The method returns true if any element from the ArrayInquirer collection is equal to the stringified or symbolized form of any element in the candidates collection.

    +
    +

    Passes each element of candidates collection to ArrayInquirer collection. The method returns true if any element from the ArrayInquirer collection is equal to the stringified or symbolized form of any element in the candidates collection.

    If candidates collection is not given, method returns true.

    @@ -98,8 +93,7 @@

    variants.any?('phone', 'desktop') # => true variants.any?(:desktop, :watch) # => false -

    - +
    diff --git a/src/classes/ActiveSupport/Autoload.html b/src/classes/ActiveSupport/Autoload.html index 9b42e5a559..12b283460d 100644 --- a/src/classes/ActiveSupport/Autoload.html +++ b/src/classes/ActiveSupport/Autoload.html @@ -100,17 +100,9 @@

    Methods

    Instance Public methods

    -

    - - autoload(const_name, path = @_at_path) - -

    +

    autoload(const_name, path = @_at_path)

    -
    - -
    - @@ -145,17 +137,9 @@

    -

    - - autoload_at(path) - -

    +

    autoload_at(path)

    -
    - -
    - @@ -183,17 +167,9 @@

    -

    - - autoload_under(path) - -

    +

    autoload_under(path)

    -
    - -
    - @@ -221,17 +197,9 @@

    -

    - - eager_autoload() - -

    +

    eager_autoload()

    -
    - -
    - @@ -259,17 +227,9 @@

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/BacktraceCleaner.html b/src/classes/ActiveSupport/BacktraceCleaner.html index 1e48acb0e6..398c7217ba 100644 --- a/src/classes/ActiveSupport/BacktraceCleaner.html +++ b/src/classes/ActiveSupport/BacktraceCleaner.html @@ -137,17 +137,9 @@

    Constants

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -180,22 +172,16 @@

    Instance Public methods

    -

    - - add_filter(&block) - -

    +

    add_filter(&block)

    - -
    -

    Adds a filter from the block provided. Each line in the backtrace will be mapped against this filter.

    +
    +

    Adds a filter from the block provided. Each line in the backtrace will be mapped against this filter.

    # Will turn "/my/rails/root/app/models/person.rb" into "app/models/person.rb"
     root = "#{Rails.root}/"
     backtrace_cleaner.add_filter { |line| line.delete_prefix(root) }
     
    -
    - +
    @@ -220,21 +206,15 @@

    -

    - - add_silencer(&block) - -

    +

    add_silencer(&block)

    - -
    -

    Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from the clean backtrace.

    +
    +

    Adds a silencer from the block provided. If the silencer returns true for a given line, it will be excluded from the clean backtrace.

    # Will reject all lines that include the word "puma", like "/gems/puma/server.rb" or "/app/my_puma_server/rb"
     backtrace_cleaner.add_silencer { |line| /puma/.match?(line) }
     
    -
    - +
    @@ -259,22 +239,18 @@

    -

    - - clean(backtrace, kind = :silent) - -

    +

    clean(backtrace, kind = :silent)

    - -
    -

    Returns the backtrace after all filters and silencers have been run against it. Filters run first, then silencers.

    -
    - +
    +

    Returns the backtrace after all filters and silencers have been run against it. Filters run first, then silencers.

    +
    -
    - Also aliased as: filter -
    +

    + Also aliased as: + + filter. +

    @@ -307,17 +283,11 @@

    -

    - - clean_frame(frame, kind = :silent) - -

    +

    clean_frame(frame, kind = :silent)

    - -
    -

    Returns the frame with all filters applied. returns nil if the frame was silenced.

    -
    - +
    +

    Returns the frame with all filters applied. returns nil if the frame was silenced.

    +
    @@ -354,22 +324,16 @@

    -

    - - clean_locations(locations, kind = :silent) - -

    +

    clean_locations(locations, kind = :silent)

    - -
    -

    Given an array of Thread::Backtrace::Location objects, returns an array with the clean ones:

    +
    +

    Given an array of Thread::Backtrace::Location objects, returns an array with the clean ones:

    clean_locations = backtrace_cleaner.clean_locations(caller_locations)
     

    Filters and silencers receive strings as usual. However, the path attributes of the locations in the returned array are the original, unfiltered ones, since locations are immutable.

    -
    - +
    @@ -394,24 +358,17 @@

    -

    - - filter(backtrace, kind = :silent) - -

    +

    filter(backtrace, kind = :silent)

    -
    - -
    - -
    - Alias for: clean -
    +

    + Alias for: + clean. +

    @@ -419,19 +376,13 @@

    -

    - - first_clean_frame(kind = :silent) - -

    +

    first_clean_frame(kind = :silent)

    - -
    -

    Returns the first clean frame of the caller’s backtrace, or nil.

    +
    +

    Returns the first clean frame of the caller’s backtrace, or nil.

    Frames are strings.

    -
    - +
    @@ -466,19 +417,13 @@

    -

    - - first_clean_location(kind = :silent) - -

    +

    first_clean_location(kind = :silent)

    - -
    -

    Returns the first clean location of the caller’s call stack, or nil.

    +
    +

    Returns the first clean location of the caller’s call stack, or nil.

    Locations are Thread::Backtrace::Location objects. Since they are immutable, their path attributes are the original ones, but filters are applied internally so silencers can still rely on them.

    -
    - +
    @@ -512,17 +457,11 @@

    -

    - - remove_filters!() - -

    +

    remove_filters!()

    - -
    -

    Removes all filters, but leaves in the silencers. Useful if you suddenly need to see entire filepaths in the backtrace that you had already filtered out.

    -
    - +
    +

    Removes all filters, but leaves in the silencers. Useful if you suddenly need to see entire filepaths in the backtrace that you had already filtered out.

    +
    @@ -547,17 +486,11 @@

    -

    - - remove_silencers!() - -

    +

    remove_silencers!()

    - -
    -

    Removes all silencers, but leaves in the filters. Useful if your context of debugging suddenly expands as you suspect a bug in one of the libraries you use.

    -
    - +
    +

    Removes all silencers, but leaves in the filters. Useful if your context of debugging suddenly expands as you suspect a bug in one of the libraries you use.

    +
    diff --git a/src/classes/ActiveSupport/Benchmarkable.html b/src/classes/ActiveSupport/Benchmarkable.html index d86a27b9ae..0d93309520 100644 --- a/src/classes/ActiveSupport/Benchmarkable.html +++ b/src/classes/ActiveSupport/Benchmarkable.html @@ -64,15 +64,10 @@

    Methods

    Instance Public methods

    -

    - - benchmark(message = "Benchmarking", options = {}, &block) - -

    +

    benchmark(message = "Benchmarking", options = {}, &block)

    - -
    -

    Allows you to measure the execution time of a block in a template and records the result to the log. Wrap this block around expensive operations or possible bottlenecks to get a time reading for the operation. For example, let’s say you thought your file processing method was taking too long; you could wrap it in a benchmark block.

    +
    +

    Allows you to measure the execution time of a block in a template and records the result to the log. Wrap this block around expensive operations or possible bottlenecks to get a time reading for the operation. For example, let’s say you thought your file processing method was taking too long; you could wrap it in a benchmark block.

    <% benchmark 'Process data files' do %>
       <%= expensive_files_operation %>
    @@ -94,8 +89,7 @@ 

    <%= expensive_and_chatty_files_operation %> <% end %>

    -
    - +
    diff --git a/src/classes/ActiveSupport/BroadcastLogger.html b/src/classes/ActiveSupport/BroadcastLogger.html index bb74e89b76..7c05bf28de 100644 --- a/src/classes/ActiveSupport/BroadcastLogger.html +++ b/src/classes/ActiveSupport/BroadcastLogger.html @@ -236,17 +236,9 @@

    Attributes

    Class Public methods

    -

    - - new(*loggers) - -

    +

    new(*loggers)

    -
    - -
    - @@ -278,21 +270,15 @@

    Instance Public methods

    -

    - - broadcast_to(*loggers) - -

    +

    broadcast_to(*loggers)

    - -
    -

    Add logger(s) to the broadcast.

    +
    +

    Add logger(s) to the broadcast.

    broadcast_logger = ActiveSupport::BroadcastLogger.new
     broadcast_logger.broadcast_to(Logger.new(STDOUT), Logger.new(STDERR))
     
    -
    - +
    @@ -317,17 +303,11 @@

    -

    - - debug!() - -

    +

    debug!()

    - -
    -

    Sets the log level to Logger::DEBUG for the whole broadcast.

    -
    - +
    +

    Sets the log level to Logger::DEBUG for the whole broadcast.

    +
    @@ -352,17 +332,11 @@

    -

    - - debug?() - -

    +

    debug?()

    - -
    -

    True if the log level allows entries with severity Logger::DEBUG to be written to at least one broadcast. False otherwise.

    -
    - +
    +

    True if the log level allows entries with severity Logger::DEBUG to be written to at least one broadcast. False otherwise.

    +
    @@ -387,17 +361,11 @@

    -

    - - error!() - -

    +

    error!()

    - -
    -

    Sets the log level to Logger::ERROR for the whole broadcast.

    -
    - +
    +

    Sets the log level to Logger::ERROR for the whole broadcast.

    +
    @@ -422,17 +390,11 @@

    -

    - - error?() - -

    +

    error?()

    - -
    -

    True if the log level allows entries with severity Logger::ERROR to be written to at least one broadcast. False otherwise.

    -
    - +
    +

    True if the log level allows entries with severity Logger::ERROR to be written to at least one broadcast. False otherwise.

    +
    @@ -457,17 +419,11 @@

    -

    - - fatal!() - -

    +

    fatal!()

    - -
    -

    Sets the log level to Logger::FATAL for the whole broadcast.

    -
    - +
    +

    Sets the log level to Logger::FATAL for the whole broadcast.

    +
    @@ -492,17 +448,11 @@

    -

    - - fatal?() - -

    +

    fatal?()

    - -
    -

    True if the log level allows entries with severity Logger::FATAL to be written to at least one broadcast. False otherwise.

    -
    - +
    +

    True if the log level allows entries with severity Logger::FATAL to be written to at least one broadcast. False otherwise.

    +
    @@ -527,17 +477,11 @@

    -

    - - info!() - -

    +

    info!()

    - -
    -

    Sets the log level to Logger::INFO for the whole broadcast.

    -
    - +
    +

    Sets the log level to Logger::INFO for the whole broadcast.

    +
    @@ -562,17 +506,11 @@

    -

    - - info?() - -

    +

    info?()

    - -
    -

    True if the log level allows entries with severity Logger::INFO to be written to at least one broadcast. False otherwise.

    -
    - +
    +

    True if the log level allows entries with severity Logger::INFO to be written to at least one broadcast. False otherwise.

    +
    @@ -597,17 +535,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -635,17 +565,11 @@

    -

    - - level() - -

    +

    level()

    - -
    -

    Returns the lowest level of all the loggers in the broadcast.

    -
    - +
    +

    Returns the lowest level of all the loggers in the broadcast.

    +
    @@ -670,17 +594,9 @@

    -

    - - local_level() - -

    +

    local_level()

    -
    - -
    - @@ -709,17 +625,9 @@

    -

    - - local_level=(level) - -

    +

    local_level=(level)

    -
    - -
    - @@ -746,23 +654,17 @@

    -

    - - stop_broadcasting_to(logger) - -

    +

    stop_broadcasting_to(logger)

    - -
    -

    Remove a logger from the broadcast. When a logger is removed, messages sent to the broadcast will no longer be written to its sink.

    +
    +

    Remove a logger from the broadcast. When a logger is removed, messages sent to the broadcast will no longer be written to its sink.

    sink = Logger.new(STDOUT)
     broadcast_logger = ActiveSupport::BroadcastLogger.new
     
     broadcast_logger.stop_broadcasting_to(sink)
     
    -
    - +
    @@ -787,17 +689,11 @@

    -

    - - warn!() - -

    +

    warn!()

    - -
    -

    Sets the log level to Logger::WARN for the whole broadcast.

    -
    - +
    +

    Sets the log level to Logger::WARN for the whole broadcast.

    +
    @@ -822,17 +718,11 @@

    -

    - - warn?() - -

    +

    warn?()

    - -
    -

    True if the log level allows entries with severity Logger::WARN to be written to at least one broadcast. False otherwise.

    -
    - +
    +

    True if the log level allows entries with severity Logger::WARN to be written to at least one broadcast. False otherwise.

    +
    diff --git a/src/classes/ActiveSupport/Cache.html b/src/classes/ActiveSupport/Cache.html index c49c83393c..85a6f0f47a 100644 --- a/src/classes/ActiveSupport/Cache.html +++ b/src/classes/ActiveSupport/Cache.html @@ -204,15 +204,10 @@

    Attributes

    Class Public methods

    -

    - - expand_cache_key(key, namespace = nil) - -

    +

    expand_cache_key(key, namespace = nil)

    - -
    -

    Expands out the key argument into a key that can be used for the cache store. Optionally accepts a namespace, and all keys will be scoped within that namespace.

    +
    +

    Expands out the key argument into a key that can be used for the cache store. Optionally accepts a namespace, and all keys will be scoped within that namespace.

    If the key argument provided is an array, or responds to to_a, then each of elements in the array will be turned into parameters/keys and concatenated into a single key. For example:

    @@ -221,8 +216,7 @@

    The key argument can also respond to cache_key or to_param.

    -

    - +
    @@ -254,15 +248,10 @@

    -

    - - lookup_store(store = nil, *parameters) - -

    +

    lookup_store(store = nil, *parameters)

    - -
    -

    Creates a new Store object according to the given options.

    +
    +

    Creates a new Store object according to the given options.

    If no arguments are passed to this method, then a new ActiveSupport::Cache::MemoryStore object will be returned.

    @@ -286,8 +275,7 @@

    ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new)
     # => returns MyOwnCacheStore.new
     
    -

    - +
    diff --git a/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html b/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html index 56cd2b8e85..33d547055b 100644 --- a/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html +++ b/src/classes/ActiveSupport/Cache/Coder/LazyEntry.html @@ -71,17 +71,9 @@

    Methods

    Class Public methods

    -

    - - new(serializer, compressor, payload, **options) - -

    +

    new(serializer, compressor, payload, **options)

    -
    - -
    - @@ -113,17 +105,9 @@

    Instance Public methods

    -

    - - mismatched?(version) - -

    +

    mismatched?(version)

    -
    - -
    - @@ -150,17 +134,9 @@

    -

    - - value() - -

    +

    value()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html b/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html index 424e232c5e..aaf1862bac 100644 --- a/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html +++ b/src/classes/ActiveSupport/Cache/Coder/StringDeserializer.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(encoding) - -

    +

    new(encoding)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - load(payload) - -

    +

    load(payload)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/FileStore.html b/src/classes/ActiveSupport/Cache/FileStore.html index c2c2352bca..542a310b9b 100644 --- a/src/classes/ActiveSupport/Cache/FileStore.html +++ b/src/classes/ActiveSupport/Cache/FileStore.html @@ -143,17 +143,9 @@

    Attributes

    Class Public methods

    -

    - - new(cache_path, **options) - -

    +

    new(cache_path, **options)

    -
    - -
    - @@ -179,17 +171,11 @@

    -

    - - supports_cache_versioning?() - -

    +

    supports_cache_versioning?()

    - -
    -

    Advertise cache versioning support.

    -
    - +
    +

    Advertise cache versioning support.

    +
    @@ -218,17 +204,11 @@

    Instance Public methods

    -

    - - cleanup(options = nil) - -

    +

    cleanup(options = nil)

    - -
    -

    Preemptively iterates through all stored keys and removes the ones which have expired.

    -
    - +
    +

    Preemptively iterates through all stored keys and removes the ones which have expired.

    +
    @@ -257,17 +237,11 @@

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    - -
    -

    Deletes all items from the cache. In this case it deletes all the entries in the specified file store directory except for .keep or .gitkeep. Be careful which directory is specified in your config file when using FileStore because everything in that directory will be deleted.

    -
    - +
    +

    Deletes all items from the cache. In this case it deletes all the entries in the specified file store directory except for .keep or .gitkeep. Be careful which directory is specified in your config file when using FileStore because everything in that directory will be deleted.

    +
    @@ -294,15 +268,10 @@

    -

    - - decrement(name, amount = 1, **options) - -

    +

    decrement(name, amount = 1, **options)

    - -
    -

    Decrement a cached integer value. Returns the updated value.

    +
    +

    Decrement a cached integer value. Returns the updated value.

    If the key is unset, it will be set to -amount.

    @@ -314,8 +283,7 @@

    cache.write("baz", 5)
     cache.decrement("baz") # => 4
     
    -

    - +
    @@ -345,17 +313,9 @@

    -

    - - delete_matched(matcher, options = nil) - -

    +

    delete_matched(matcher, options = nil)

    -
    - -
    - @@ -388,15 +348,10 @@

    -

    - - increment(name, amount = 1, **options) - -

    +

    increment(name, amount = 1, **options)

    - -
    -

    Increment a cached integer value. Returns the updated value.

    +
    +

    Increment a cached integer value. Returns the updated value.

    If the key is unset, it starts from 0:

    @@ -409,8 +364,7 @@

    cache.write("baz", 5)
     cache.increment("baz") # => 6
     
    -

    - +
    diff --git a/src/classes/ActiveSupport/Cache/MemCacheStore.html b/src/classes/ActiveSupport/Cache/MemCacheStore.html index af0037e78b..c38bea45bb 100644 --- a/src/classes/ActiveSupport/Cache/MemCacheStore.html +++ b/src/classes/ActiveSupport/Cache/MemCacheStore.html @@ -133,22 +133,16 @@

    Constants

    Class Public methods

    -

    - - new(*addresses) - -

    +

    new(*addresses)

    - -
    -

    Creates a new MemCacheStore object, with the given memcached server addresses. Each address is either a host name, or a host-with-port string in the form of “host_name:port”. For example:

    +
    +

    Creates a new MemCacheStore object, with the given memcached server addresses. Each address is either a host name, or a host-with-port string in the form of “host_name:port”. For example:

    ActiveSupport::Cache::MemCacheStore.new("localhost", "server-downstairs.localnetwork:8229")
     

    If no addresses are provided, but ENV['MEMCACHE_SERVERS'] is defined, it will be used instead. Otherwise, MemCacheStore will connect to localhost:11211 (the default memcached port).

    -
    - +
    @@ -189,17 +183,11 @@

    -

    - - supports_cache_versioning?() - -

    +

    supports_cache_versioning?()

    - -
    -

    Advertise cache versioning support.

    -
    - +
    +

    Advertise cache versioning support.

    +
    @@ -228,17 +216,11 @@

    Instance Public methods

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    - -
    -

    Clear the entire cache on all memcached servers. This method should be used with care when shared cache is being used.

    -
    - +
    +

    Clear the entire cache on all memcached servers. This method should be used with care when shared cache is being used.

    +
    @@ -263,15 +245,10 @@

    -

    - - decrement(name, amount = 1, options = nil) - -

    +

    decrement(name, amount = 1, options = nil)

    - -
    -

    Decrement a cached integer value using the memcached decr atomic operator. Returns the updated value.

    +
    +

    Decrement a cached integer value using the memcached decr atomic operator. Returns the updated value.

    If the key is unset or has expired, it will be set to 0. Memcached does not support negative counters.

    @@ -291,8 +268,7 @@

    cache.decrement("baz") # => 3
     cache.read_counter("baz") # 3
     
    -

    - +
    @@ -324,15 +300,10 @@

    -

    - - increment(name, amount = 1, options = nil) - -

    +

    increment(name, amount = 1, options = nil)

    - -
    -

    Increment a cached integer value using the memcached incr atomic operator. Returns the updated value.

    +
    +

    Increment a cached integer value using the memcached incr atomic operator. Returns the updated value.

    If the key is unset or has expired, it will be set to amount:

    @@ -353,8 +324,7 @@

    cache.increment("baz") # => 7
     cache.read_counter("baz") # 7
     
    -

    - +
    @@ -386,17 +356,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -422,17 +384,11 @@

    -

    - - stats() - -

    +

    stats()

    - -
    -

    Get the statistics from the memcached servers.

    -
    - +
    +

    Get the statistics from the memcached servers.

    +
    @@ -457,23 +413,17 @@

    -

    - - write(name, value, options = nil) +

    write(name, value, options = nil) +

    - - - - -
    -

    Behaves the same as ActiveSupport::Cache::Store#write, but supports additional options specific to memcached.

    +
    +

    Behaves the same as ActiveSupport::Cache::Store#write, but supports additional options specific to memcached.

    Additional Options

    • raw: true - Sends the value directly to the server as raw bytes. The value must be a string or number. You can use memcached direct operations like increment and decrement only on raw values.

    -
    - +
    diff --git a/src/classes/ActiveSupport/Cache/MemoryStore.html b/src/classes/ActiveSupport/Cache/MemoryStore.html index dc251d7d0c..052bbaf7c2 100644 --- a/src/classes/ActiveSupport/Cache/MemoryStore.html +++ b/src/classes/ActiveSupport/Cache/MemoryStore.html @@ -122,17 +122,9 @@

    Constants

    Class Public methods

    -

    - - new(options = nil) - -

    +

    new(options = nil)

    -
    - -
    - @@ -167,17 +159,11 @@

    -

    - - supports_cache_versioning?() - -

    +

    supports_cache_versioning?()

    - -
    -

    Advertise cache versioning support.

    -
    - +
    +

    Advertise cache versioning support.

    +
    @@ -206,17 +192,11 @@

    Instance Public methods

    -

    - - cleanup(options = nil) - -

    +

    cleanup(options = nil)

    - -
    -

    Preemptively iterates through all stored keys and removes the ones which have expired.

    -
    - +
    +

    Preemptively iterates through all stored keys and removes the ones which have expired.

    +
    @@ -248,17 +228,11 @@

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    - -
    -

    Delete all data stored in a given cache store.

    -
    - +
    +

    Delete all data stored in a given cache store.

    +
    @@ -286,15 +260,10 @@

    -

    - - decrement(name, amount = 1, **options) - -

    +

    decrement(name, amount = 1, **options)

    - -
    -

    Decrement a cached integer value. Returns the updated value.

    +
    +

    Decrement a cached integer value. Returns the updated value.

    If the key is unset or has expired, it will be set to -amount.

    @@ -306,8 +275,7 @@

    cache.write("baz", 5)
     cache.decrement("baz") # => 4
     
    -

    - +
    @@ -334,17 +302,11 @@

    -

    - - delete_matched(matcher, options = nil) - -

    +

    delete_matched(matcher, options = nil)

    - -
    -

    Deletes cache entries if the cache key matches a given pattern.

    -
    - +
    +

    Deletes cache entries if the cache key matches a given pattern.

    +
    @@ -377,15 +339,10 @@

    -

    - - increment(name, amount = 1, **options) - -

    +

    increment(name, amount = 1, **options)

    - -
    -

    Increment a cached integer value. Returns the updated value.

    +
    +

    Increment a cached integer value. Returns the updated value.

    If the key is unset, it will be set to amount:

    @@ -398,8 +355,7 @@

    cache.write("baz", 5)
     cache.increment("baz") # => 6
     
    -

    - +
    @@ -426,17 +382,11 @@

    -

    - - prune(target_size, max_time = nil) - -

    +

    prune(target_size, max_time = nil)

    - -
    -

    To ensure entries fit within the specified memory prune the cache by removing the least recently accessed entries.

    -
    - +
    +

    To ensure entries fit within the specified memory prune the cache by removing the least recently accessed entries.

    +
    @@ -475,17 +425,11 @@

    -

    - - pruning?() - -

    +

    pruning?()

    - -
    -

    Returns true if the cache is currently being pruned.

    -
    - +
    +

    Returns true if the cache is currently being pruned.

    +
    diff --git a/src/classes/ActiveSupport/Cache/NullStore.html b/src/classes/ActiveSupport/Cache/NullStore.html index 49d3378900..27a120f3bc 100644 --- a/src/classes/ActiveSupport/Cache/NullStore.html +++ b/src/classes/ActiveSupport/Cache/NullStore.html @@ -93,17 +93,11 @@

    Methods

    Class Public methods

    -

    - - supports_cache_versioning?() - -

    +

    supports_cache_versioning?()

    - -
    -

    Advertise cache versioning support.

    -
    - +
    +

    Advertise cache versioning support.

    +
    @@ -132,17 +126,9 @@

    Instance Public methods

    -

    - - cleanup(options = nil) - -

    +

    cleanup(options = nil)

    -
    - -
    - @@ -166,17 +152,9 @@

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    -
    - -
    - @@ -200,17 +178,9 @@

    -

    - - decrement(name, amount = 1, **options) - -

    +

    decrement(name, amount = 1, **options)

    -
    - -
    - @@ -234,17 +204,9 @@

    -

    - - delete_matched(matcher, options = nil) - -

    +

    delete_matched(matcher, options = nil)

    -
    - -
    - @@ -268,17 +230,9 @@

    -

    - - increment(name, amount = 1, **options) - -

    +

    increment(name, amount = 1, **options)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/RedisCacheStore.html b/src/classes/ActiveSupport/Cache/RedisCacheStore.html index fd88338302..d264713329 100644 --- a/src/classes/ActiveSupport/Cache/RedisCacheStore.html +++ b/src/classes/ActiveSupport/Cache/RedisCacheStore.html @@ -169,15 +169,10 @@

    Attributes

    Class Public methods

    -

    - - new(error_handler: DEFAULT_ERROR_HANDLER, **redis_options) - -

    +

    new(error_handler: DEFAULT_ERROR_HANDLER, **redis_options)

    - -
    -

    Creates a new Redis cache store.

    +
    +

    Creates a new Redis cache store.

    There are a few ways to provide the Redis client used by the cache:

    1. @@ -222,8 +217,7 @@

      cache.exist?('foo') # => true cache.exist?('bar') # => false -

    - +
    @@ -262,17 +256,11 @@

    -

    - - supports_cache_versioning?() - -

    +

    supports_cache_versioning?()

    - -
    -

    Advertise cache versioning support.

    -
    - +
    +

    Advertise cache versioning support.

    +
    @@ -301,19 +289,13 @@

    Instance Public methods

    -

    - - cleanup(options = nil) - -

    +

    cleanup(options = nil)

    - -
    -

    Cache Store API implementation.

    +
    +

    Cache Store API implementation.

    Removes expired entries. Handled natively by Redis least-recently-/ least-frequently-used expiry, so manual cleanup is not supported.

    -
    - +
    @@ -338,19 +320,13 @@

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    - -
    -

    Clear the entire cache on all Redis servers. Safe to use on shared servers if the cache is namespaced.

    +
    +

    Clear the entire cache on all Redis servers. Safe to use on shared servers if the cache is namespaced.

    Failsafe: Raises errors.

    -
    - +
    @@ -381,15 +357,10 @@

    -

    - - decrement(name, amount = 1, options = nil) - -

    +

    decrement(name, amount = 1, options = nil)

    - -
    -

    Decrement a cached integer value using the Redis decrby atomic operator. Returns the updated value.

    +
    +

    Decrement a cached integer value using the Redis decrby atomic operator. Returns the updated value.

    If the key is unset or has expired, it will be set to -amount:

    @@ -411,8 +382,7 @@

    Failsafe: Raises errors.

    -

    - +
    @@ -444,15 +414,10 @@

    -

    - - delete_matched(matcher, options = nil) - -

    +

    delete_matched(matcher, options = nil)

    - -
    -

    Cache Store API implementation.

    +
    +

    Cache Store API implementation.

    Supports Redis KEYS glob patterns:

    @@ -468,8 +433,7 @@

    See redis.io/commands/KEYS for more.

    Failsafe: Raises errors.

    -

    - +
    @@ -512,15 +476,10 @@

    -

    - - increment(name, amount = 1, options = nil) - -

    +

    increment(name, amount = 1, options = nil)

    - -
    -

    Increment a cached integer value using the Redis incrby atomic operator. Returns the updated value.

    +
    +

    Increment a cached integer value using the Redis incrby atomic operator. Returns the updated value.

    If the key is unset or has expired, it will be set to amount:

    @@ -543,8 +502,7 @@

    Failsafe: Raises errors.

    -

    - +
    @@ -576,17 +534,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -611,19 +561,13 @@

    -

    - - read_multi(*names) - -

    +

    read_multi(*names)

    - -
    -

    Cache Store API implementation.

    +
    +

    Cache Store API implementation.

    Read multiple values at once. Returns a hash of requested keys -> fetched values.

    -
    - +
    @@ -658,17 +602,11 @@

    -

    - - stats() - -

    +

    stats()

    - -
    -

    Get info from redis servers.

    -
    - +
    +

    Get info from redis servers.

    +
    diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html index c33b6f8a45..f528bac803 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal70WithFallback.html @@ -104,17 +104,9 @@

    Constants

    Instance Public methods

    -

    - - _load(marked) - -

    +

    _load(marked)

    -
    - -
    - @@ -141,17 +133,9 @@

    -

    - - dump(entry) - -

    +

    dump(entry)

    -
    - -
    - @@ -176,17 +160,9 @@

    -

    - - dump_compressed(entry, threshold) - -

    +

    dump_compressed(entry, threshold)

    -
    - -
    - @@ -218,17 +194,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html index ae573b1091..6d79d617cd 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/Marshal71WithFallback.html @@ -93,17 +93,9 @@

    Constants

    Instance Public methods

    -

    - - _load(dumped) - -

    +

    _load(dumped)

    -
    - -
    - @@ -128,17 +120,9 @@

    -

    - - dump(value) - -

    +

    dump(value)

    -
    - -
    - @@ -163,17 +147,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html index 0e1d4dd41b..d89b7fe15b 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/MessagePackWithFallback.html @@ -80,17 +80,9 @@

    Included Modules

    Instance Public methods

    -

    - - _load(dumped) - -

    +

    _load(dumped)

    -
    - -
    - @@ -115,17 +107,9 @@

    -

    - - dump(value) - -

    +

    dump(value)

    -
    - -
    - @@ -150,17 +134,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html b/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html index fefdacca8d..9103d1c796 100644 --- a/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html +++ b/src/classes/ActiveSupport/Cache/SerializerWithFallback/PassthroughWithFallback.html @@ -84,17 +84,9 @@

    Included Modules

    Instance Public methods

    -

    - - _load(entry) - -

    +

    _load(entry)

    -
    - -
    - @@ -119,17 +111,9 @@

    -

    - - dump(entry) - -

    +

    dump(entry)

    -
    - -
    - @@ -154,17 +138,9 @@

    -

    - - dump_compressed(entry, threshold) - -

    +

    dump_compressed(entry, threshold)

    -
    - -
    - @@ -189,17 +165,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/Store.html b/src/classes/ActiveSupport/Cache/Store.html index 39c6ea2e4c..c102b04aee 100644 --- a/src/classes/ActiveSupport/Cache/Store.html +++ b/src/classes/ActiveSupport/Cache/Store.html @@ -241,15 +241,10 @@

    Attributes

    Class Public methods

    -

    - - new(options = nil) - -

    +

    new(options = nil)

    - -
    -

    Creates a new cache.

    +
    +

    Creates a new cache.

    Options

    :namespace
    @@ -296,8 +291,7 @@

    Options

    Any other specified options are treated as default options for the relevant cache operations, such as read, write, and fetch.

    -
    - +
    @@ -345,21 +339,15 @@

    Options

    Instance Public methods

    -

    - - cleanup(options = nil) - -

    +

    cleanup(options = nil)

    - -
    -

    Cleans up the cache by removing expired entries.

    +
    +

    Cleans up the cache by removing expired entries.

    Options are passed to the underlying cache implementation.

    Some implementations may not support this method.

    -
    - +
    @@ -384,21 +372,15 @@

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    - -
    -

    Clears the entire cache. Be careful with this method since it could affect other processes if shared cache is being used.

    +
    +

    Clears the entire cache. Be careful with this method since it could affect other processes if shared cache is being used.

    The options hash is passed to the underlying cache implementation.

    Some implementations may not support this method.

    -
    - +
    @@ -423,21 +405,15 @@

    -

    - - decrement(name, amount = 1, options = nil) - -

    +

    decrement(name, amount = 1, options = nil)

    - -
    -

    Decrements an integer value in the cache.

    +
    +

    Decrements an integer value in the cache.

    Options are passed to the underlying cache implementation.

    Some implementations may not support this method.

    -
    - +
    @@ -462,19 +438,13 @@

    -

    - - delete(name, options = nil) - -

    +

    delete(name, options = nil)

    - -
    -

    Deletes an entry in the cache. Returns true if an entry is deleted and false otherwise.

    +
    +

    Deletes an entry in the cache. Returns true if an entry is deleted and false otherwise.

    Options are passed to the underlying cache implementation.

    -
    - +
    @@ -504,21 +474,15 @@

    -

    - - delete_matched(matcher, options = nil) - -

    +

    delete_matched(matcher, options = nil)

    - -
    -

    Deletes all entries with keys matching the pattern.

    +
    +

    Deletes all entries with keys matching the pattern.

    Options are passed to the underlying cache implementation.

    Some implementations may not support this method.

    -
    - +
    @@ -543,19 +507,13 @@

    -

    - - delete_multi(names, options = nil) - -

    +

    delete_multi(names, options = nil)

    - -
    -

    Deletes multiple entries in the cache. Returns the number of deleted entries.

    +
    +

    Deletes multiple entries in the cache. Returns the number of deleted entries.

    Options are passed to the underlying cache implementation.

    -
    - +
    @@ -587,19 +545,13 @@

    -

    - - exist?(name, options = nil) - -

    +

    exist?(name, options = nil)

    - -
    -

    Returns true if the cache contains an entry for the given key.

    +
    +

    Returns true if the cache contains an entry for the given key.

    Options are passed to the underlying cache implementation.

    -
    - +
    @@ -630,15 +582,10 @@

    -

    - - fetch(name, options = nil, &block) - -

    +

    fetch(name, options = nil, &block)

    - -
    -

    Fetches data from the cache, using the given key. If there is data in the cache with the given key, then that data is returned.

    +
    +

    Fetches data from the cache, using the given key. If there is data in the cache with the given key, then that data is returned.

    If there is no such data in the cache (a cache miss), then nil will be returned. However, if a block has been passed, that block will be passed the key and executed in the event of a cache miss. The return value of the block will be written to the cache under the given cache key, and that return value will be returned.

    @@ -734,8 +681,7 @@

    Dynamic Options

    token end -
    - +
    @@ -794,15 +740,10 @@

    Dynamic Options

    -

    - - fetch_multi(*names) - -

    +

    fetch_multi(*names)

    - -
    -

    Fetches data from the cache, using the given keys. If there is data in the cache with the given keys, then that data is returned. Otherwise, the supplied block is called for each key for which there was no data, and the result will be written to the cache and returned. Therefore, you need to pass a block that returns the data to be written to the cache. If you do not want to write the cache when the cache is not found, use read_multi.

    +
    +

    Fetches data from the cache, using the given keys. If there is data in the cache with the given keys, then that data is returned. Otherwise, the supplied block is called for each key for which there was no data, and the result will be written to the cache and returned. Therefore, you need to pass a block that returns the data to be written to the cache. If you do not want to write the cache when the cache is not found, use read_multi.

    Returns a hash with the data for each of the names. For example:

    @@ -826,8 +767,7 @@

    cache.read("fizz") # => nil -

    - +
    @@ -879,21 +819,15 @@

    -

    - - increment(name, amount = 1, options = nil) - -

    +

    increment(name, amount = 1, options = nil)

    - -
    -

    Increments an integer value in the cache.

    +
    +

    Increments an integer value in the cache.

    Options are passed to the underlying cache implementation.

    Some implementations may not support this method.

    -
    - +
    @@ -918,17 +852,11 @@

    -

    - - mute() - -

    +

    mute()

    - -
    -

    Silences the logger within a block.

    -
    - +
    +

    Silences the logger within a block.

    +
    @@ -956,17 +884,11 @@

    -

    - - namespace() - -

    +

    namespace()

    - -
    -

    Get the current namespace

    -
    - +
    +

    Get the current namespace

    +
    @@ -991,17 +913,11 @@

    -

    - - namespace=(namespace) - -

    +

    namespace=(namespace)

    - -
    -

    Set the current namespace. Note, this will be ignored if custom options are passed to cache wills with a namespace key.

    -
    - +
    +

    Set the current namespace. Note, this will be ignored if custom options are passed to cache wills with a namespace key.

    +
    @@ -1026,15 +942,10 @@

    -

    - - read(name, options = nil) - -

    +

    read(name, options = nil)

    - -
    -

    Reads data from the cache, using the given key. If there is data in the cache with the given key, then that data is returned. Otherwise, nil is returned.

    +
    +

    Reads data from the cache, using the given key. If there is data in the cache with the given key, then that data is returned. Otherwise, nil is returned.

    Note, if data was written with the :expires_in or :version options, both of these conditions are applied before the data is returned.

    @@ -1046,8 +957,7 @@

    Options

    Other options will be handled by the specific cache store implementation.

    -
    - +
    @@ -1100,15 +1010,10 @@

    Options

    -

    - - read_counter(name, **options) - -

    +

    read_counter(name, **options)

    - -
    -

    Reads a counter that was set by increment / decrement.

    +
    +

    Reads a counter that was set by increment / decrement.

    cache.write_counter("foo", 1)
     cache.read_counter("foo") # => 1
    @@ -1117,8 +1022,7 @@ 

    Options are passed to the underlying cache implementation.

    -
    - +
    @@ -1144,21 +1048,15 @@

    -

    - - read_multi(*names) - -

    +

    read_multi(*names)

    - -
    -

    Reads multiple values at once from the cache. Options can be passed in the last argument.

    +
    +

    Reads multiple values at once from the cache. Options can be passed in the last argument.

    Some cache implementation may optimize this method.

    Returns a hash mapping the names provided to the values found.

    -
    - +
    @@ -1193,17 +1091,11 @@

    -

    - - silence!() - -

    +

    silence!()

    - -
    -

    Silences the logger.

    -
    - +
    +

    Silences the logger.

    +
    @@ -1229,15 +1121,10 @@

    -

    - - write(name, value, options = nil) - -

    +

    write(name, value, options = nil)

    - -
    -

    Writes the value to the cache with the key. The value must be supported by the coder‘s dump and load methods.

    +
    +

    Writes the value to the cache with the key. The value must be supported by the coder‘s dump and load methods.

    Returns true if the write succeeded, nil if there was an error talking to the cache backend, or false if the write failed for another reason.

    @@ -1267,8 +1154,7 @@

    Options

    Other options will be handled by the specific cache store implementation.

    -
    - +
    @@ -1299,15 +1185,10 @@

    Options

    -

    - - write_counter(name, value, **options) - -

    +

    write_counter(name, value, **options)

    - -
    -

    Writes a counter that can then be modified by increment / decrement.

    +
    +

    Writes a counter that can then be modified by increment / decrement.

    cache.write_counter("foo", 1)
     cache.read_counter("foo") # => 1
    @@ -1316,8 +1197,7 @@ 

    Options are passed to the underlying cache implementation.

    -
    - +
    @@ -1343,17 +1223,11 @@

    -

    - - write_multi(hash, options = nil) - -

    +

    write_multi(hash, options = nil)

    - -
    -

    Cache Storage API to write multiple values at once.

    -
    - +
    +

    Cache Storage API to write multiple values at once.

    +
    @@ -1392,17 +1266,11 @@

    Instance Private methods

    -

    - - key_matcher(pattern, options) - -

    +

    key_matcher(pattern, options)

    - -
    -

    Adds the namespace defined in the options to a pattern designed to match keys. Implementations that support delete_matched should call this method to translate a pattern that matches names into one that matches namespaced keys.

    -
    - +
    +

    Adds the namespace defined in the options to a pattern designed to match keys. Implementations that support delete_matched should call this method to translate a pattern that matches names into one that matches namespaced keys.

    +
    diff --git a/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html b/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html index d8451c6e32..0b38b0d0d3 100644 --- a/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html +++ b/src/classes/ActiveSupport/Cache/Strategy/LocalCache.html @@ -97,17 +97,11 @@

    Methods

    Instance Public methods

    -

    - - local_cache() - -

    +

    local_cache()

    - -
    -

    The current local cache.

    -
    - +
    +

    The current local cache.

    +
    @@ -132,17 +126,11 @@

    -

    - - middleware() - -

    +

    middleware()

    - -
    -

    Middleware class can be inserted as a Rack handler to be local cache for the duration of request.

    -
    - +
    +

    Middleware class can be inserted as a Rack handler to be local cache for the duration of request.

    +
    @@ -167,17 +155,11 @@

    -

    - - new_local_cache() - -

    +

    new_local_cache()

    - -
    -

    Set a new local cache.

    -
    - +
    +

    Set a new local cache.

    +
    @@ -202,17 +184,11 @@

    -

    - - unset_local_cache() - -

    +

    unset_local_cache()

    - -
    -

    Unset the current local cache.

    -
    - +
    +

    Unset the current local cache.

    +
    @@ -237,17 +213,11 @@

    -

    - - with_local_cache(&block) - -

    +

    with_local_cache(&block)

    - -
    -

    Use a local cache for the duration of block.

    -
    - +
    +

    Use a local cache for the duration of block.

    +
    diff --git a/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html b/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html index a1673808d2..5c8f7a0d4f 100644 --- a/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html +++ b/src/classes/ActiveSupport/Cache/Strategy/LocalCache/LocalStore.html @@ -91,17 +91,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -130,17 +122,9 @@

    Instance Public methods

    -

    - - clear(options = nil) - -

    +

    clear(options = nil)

    -
    - -
    - @@ -165,17 +149,9 @@

    -

    - - delete_entry(key) - -

    +

    delete_entry(key)

    -
    - -
    - @@ -200,17 +176,9 @@

    -

    - - read_entry(key) - -

    +

    read_entry(key)

    -
    - -
    - @@ -235,17 +203,9 @@

    -

    - - read_multi_entries(keys) - -

    +

    read_multi_entries(keys)

    -
    - -
    - @@ -270,17 +230,9 @@

    -

    - - write_entry(key, entry) - -

    +

    write_entry(key, entry)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Cache/WriteOptions.html b/src/classes/ActiveSupport/Cache/WriteOptions.html index e47d06a398..85d0796be1 100644 --- a/src/classes/ActiveSupport/Cache/WriteOptions.html +++ b/src/classes/ActiveSupport/Cache/WriteOptions.html @@ -90,17 +90,9 @@

    Methods

    Instance Public methods

    -

    - - expires_at() - -

    +

    expires_at()

    -
    - -
    - @@ -125,17 +117,11 @@

    -

    - - expires_at=(expires_at) - -

    +

    expires_at=(expires_at)

    - -
    -

    Sets the Cache entry’s expires_at value. If an expires_in option was previously set, this will unset it since expires_at and expires_in cannot both be set.

    -
    - +
    +

    Sets the Cache entry’s expires_at value. If an expires_in option was previously set, this will unset it since expires_at and expires_in cannot both be set.

    +
    @@ -161,17 +147,9 @@

    -

    - - expires_in() - -

    +

    expires_in()

    -
    - -
    - @@ -196,17 +174,11 @@

    -

    - - expires_in=(expires_in) - -

    +

    expires_in=(expires_in)

    - -
    -

    Sets the Cache entry’s expires_in value. If an expires_at option was previously set, this will unset it since expires_in and expires_at cannot both be set.

    -
    - +
    +

    Sets the Cache entry’s expires_in value. If an expires_at option was previously set, this will unset it since expires_in and expires_at cannot both be set.

    +
    @@ -232,17 +204,9 @@

    -

    - - version() - -

    +

    version()

    -
    - -
    - @@ -267,17 +231,9 @@

    -

    - - version=(version) - -

    +

    version=(version)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/CachingKeyGenerator.html b/src/classes/ActiveSupport/CachingKeyGenerator.html index 32493a86d9..095102ea20 100644 --- a/src/classes/ActiveSupport/CachingKeyGenerator.html +++ b/src/classes/ActiveSupport/CachingKeyGenerator.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(key_generator) - -

    +

    new(key_generator)

    -
    - -
    - @@ -115,17 +107,11 @@

    Instance Public methods

    -

    - - generate_key(*args) - -

    +

    generate_key(*args)

    - -
    -

    Returns a derived key suitable for use.

    -
    - +
    +

    Returns a derived key suitable for use.

    +
    diff --git a/src/classes/ActiveSupport/Callbacks.html b/src/classes/ActiveSupport/Callbacks.html index b7afa2084d..ddb51f5395 100644 --- a/src/classes/ActiveSupport/Callbacks.html +++ b/src/classes/ActiveSupport/Callbacks.html @@ -137,15 +137,10 @@

    Constants

    Instance Public methods

    -

    - - run_callbacks(kind, type = nil) - -

    +

    run_callbacks(kind, type = nil)

    - -
    -

    Runs the callbacks for the given event.

    +
    +

    Runs the callbacks for the given event.

    Calls the before and around callbacks in the order they were set, yields the block (if given one), and then runs the after callbacks in reverse order.

    @@ -155,8 +150,7 @@

    save end -

    - +
    diff --git a/src/classes/ActiveSupport/Callbacks/ClassMethods.html b/src/classes/ActiveSupport/Callbacks/ClassMethods.html index 91f792e2ac..d849ad7b18 100644 --- a/src/classes/ActiveSupport/Callbacks/ClassMethods.html +++ b/src/classes/ActiveSupport/Callbacks/ClassMethods.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - define_callbacks(*names) - -

    +

    define_callbacks(*names)

    - -
    -

    Define sets of events in the object life cycle that support callbacks.

    +
    +

    Define sets of events in the object life cycle that support callbacks.

    define_callbacks :validate
     define_callbacks :initialize, :save, :destroy
    @@ -143,8 +138,7 @@ 
    Notes

    names passed to define_callbacks must not end with !, ? or =.

    Calling define_callbacks multiple times with the same names will overwrite previous callbacks registered with set_callback.

    -
    - +
    @@ -200,17 +194,11 @@
    Notes
    -

    - - reset_callbacks(name) - -

    +

    reset_callbacks(name)

    - -
    -

    Remove all set callbacks for the given event.

    -
    - +
    +

    Remove all set callbacks for the given event.

    +
    @@ -243,15 +231,10 @@

    -

    - - set_callback(name, *filter_list, &block) - -

    +

    set_callback(name, *filter_list, &block)

    - -
    -

    Install a callback for the given event.

    +
    +

    Install a callback for the given event.

    set_callback :save, :before, :before_method
     set_callback :save, :after,  :after_method, if: :condition
    @@ -283,8 +266,7 @@ 
    Options
  • :prepend - If true, the callback will be prepended to the existing chain rather than appended.

  • -
    - +
    @@ -319,15 +301,10 @@
    Options
    -

    - - skip_callback(name, *filter_list, &block) - -

    +

    skip_callback(name, *filter_list, &block)

    - -
    -

    Skip a previously set callback. Like set_callback, :if or :unless options may be passed in order to control when the callback is skipped.

    +
    +

    Skip a previously set callback. Like set_callback, :if or :unless options may be passed in order to control when the callback is skipped.

    Note: this example uses PersonRecord and saving_message, which you can see defined here

    @@ -365,8 +342,7 @@

    An ArgumentError will be raised if the callback has not already been set (unless the :raise option is set to false).

    -

    - +
    diff --git a/src/classes/ActiveSupport/CodeGenerator/MethodSet.html b/src/classes/ActiveSupport/CodeGenerator/MethodSet.html index b66331d5df..ce9d6e9a6c 100644 --- a/src/classes/ActiveSupport/CodeGenerator/MethodSet.html +++ b/src/classes/ActiveSupport/CodeGenerator/MethodSet.html @@ -84,17 +84,9 @@

    Constants

    Class Public methods

    -

    - - new(namespace) - -

    +

    new(namespace)

    -
    - -
    - @@ -126,17 +118,9 @@

    Instance Public methods

    -

    - - apply(owner, path, line) - -

    +

    apply(owner, path, line)

    -
    - -
    - @@ -168,17 +152,9 @@

    -

    - - define_cached_method(canonical_name, as: nil) - -

    +

    define_cached_method(canonical_name, as: nil)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/CompareWithRange.html b/src/classes/ActiveSupport/CompareWithRange.html index a8d04877ba..dfe466e080 100644 --- a/src/classes/ActiveSupport/CompareWithRange.html +++ b/src/classes/ActiveSupport/CompareWithRange.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - ===(value) - -

    +

    ===(value)

    - -
    -

    Extends the default Range#=== to support range comparisons.

    +
    +

    Extends the default Range#=== to support range comparisons.

    (1..5) === (1..5)  # => true
     (1..5) === (2..3)  # => true
    @@ -85,8 +80,7 @@ 

    The given range must be fully bounded, with both start and end.

    -
    - +
    @@ -121,15 +115,10 @@

    -

    - - include?(value) - -

    +

    include?(value)

    - -
    -

    Extends the default Range#include? to support range comparisons.

    +
    +

    Extends the default Range#include? to support range comparisons.

    (1..5).include?(1..5)  # => true
     (1..5).include?(2..3)  # => true
    @@ -144,8 +133,7 @@ 

    The given range must be fully bounded, with both start and end.

    -
    - +
    diff --git a/src/classes/ActiveSupport/Concern.html b/src/classes/ActiveSupport/Concern.html index db33ef596f..ab49ac0145 100644 --- a/src/classes/ActiveSupport/Concern.html +++ b/src/classes/ActiveSupport/Concern.html @@ -176,15 +176,10 @@

    Methods

    Instance Public methods

    -

    - - class_methods(&class_methods_module_definition) - -

    +

    class_methods(&class_methods_module_definition)

    - -
    -

    Define class methods from given block. You can define private class methods as well.

    +
    +

    Define class methods from given block. You can define private class methods as well.

    module Example
       extend ActiveSupport::Concern
    @@ -204,8 +199,7 @@ 

    Buzz.foo # => "foo" Buzz.bar # => private method 'bar' called for Buzz:Class(NoMethodError)

    -
    - +
    @@ -234,17 +228,11 @@

    -

    - - included(base = nil, &block) - -

    +

    included(base = nil, &block)

    - -
    -

    Evaluate given block in context of base class, so that you can write class macros here. When you define more than one included block, it raises an exception.

    -
    - +
    +

    Evaluate given block in context of base class, so that you can write class macros here. When you define more than one included block, it raises an exception.

    +
    @@ -279,17 +267,11 @@

    -

    - - prepended(base = nil, &block) - -

    +

    prepended(base = nil, &block)

    - -
    -

    Evaluate given block in context of base class, so that you can write class macros here. When you define more than one prepended block, it raises an exception.

    -
    - +
    +

    Evaluate given block in context of base class, so that you can write class macros here. When you define more than one prepended block, it raises an exception.

    +
    diff --git a/src/classes/ActiveSupport/Concurrency/ShareLock.html b/src/classes/ActiveSupport/Concurrency/ShareLock.html index 4dd8d6189c..cf435dc3d4 100644 --- a/src/classes/ActiveSupport/Concurrency/ShareLock.html +++ b/src/classes/ActiveSupport/Concurrency/ShareLock.html @@ -111,17 +111,9 @@

    Included Modules

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -158,19 +150,13 @@

    Instance Public methods

    -

    - - exclusive(purpose: nil, compatible: [], after_compatible: [], no_wait: false) - -

    +

    exclusive(purpose: nil, compatible: [], after_compatible: [], no_wait: false)

    - -
    -

    Execute the supplied block while holding the Exclusive lock. If no_wait is set and the lock is not immediately available, returns nil without yielding. Otherwise, returns the result of the block.

    +
    +

    Execute the supplied block while holding the Exclusive lock. If no_wait is set and the lock is not immediately available, returns nil without yielding. Otherwise, returns the result of the block.

    See start_exclusive for other options.

    -
    - +
    @@ -201,17 +187,11 @@

    -

    - - sharing() - -

    +

    sharing()

    - -
    -

    Execute the supplied block while holding the Share lock.

    -
    - +
    +

    Execute the supplied block while holding the Share lock.

    +
    @@ -241,21 +221,15 @@

    -

    - - start_exclusive(purpose: nil, compatible: [], no_wait: false) - -

    +

    start_exclusive(purpose: nil, compatible: [], no_wait: false)

    - -
    -

    Returns false if no_wait is set and the lock is not immediately available. Otherwise, returns true after the lock has been acquired.

    +
    +

    Returns false if no_wait is set and the lock is not immediately available. Otherwise, returns true after the lock has been acquired.

    purpose and compatible work together; while this thread is waiting for the exclusive lock, it will yield its share (if any) to any other attempt whose purpose appears in this attempt’s compatible list. This allows a “loose” upgrade, which, being less strict, prevents some classes of deadlocks.

    For many resources, loose upgrades are sufficient: if a thread is awaiting a lock, it is not running any other code. With purpose matching, it is possible to yield only to other threads whose activity will not interfere.

    -
    - +
    @@ -294,17 +268,9 @@

    -

    - - start_sharing() - -

    +

    start_sharing()

    -
    - -
    - @@ -342,17 +308,11 @@

    -

    - - stop_exclusive(compatible: []) - -

    +

    stop_exclusive(compatible: [])

    - -
    -

    Relinquish the exclusive lock. Must only be called by the thread that called start_exclusive (and currently holds the lock).

    -
    - +
    +

    Relinquish the exclusive lock. Must only be called by the thread that called start_exclusive (and currently holds the lock).

    +
    @@ -391,17 +351,9 @@

    -

    - - stop_sharing() - -

    +

    stop_sharing()

    -
    - -
    - @@ -433,17 +385,11 @@

    -

    - - yield_shares(purpose: nil, compatible: [], block_share: false) - -

    +

    yield_shares(purpose: nil, compatible: [], block_share: false)

    - -
    -

    Temporarily give up all held Share locks while executing the supplied block, allowing any compatible exclusive lock request to proceed.

    -
    - +
    +

    Temporarily give up all held Share locks while executing the supplied block, allowing any compatible exclusive lock request to proceed.

    +
    diff --git a/src/classes/ActiveSupport/Configurable.html b/src/classes/ActiveSupport/Configurable.html index 6a38ea66e6..c193bae45c 100644 --- a/src/classes/ActiveSupport/Configurable.html +++ b/src/classes/ActiveSupport/Configurable.html @@ -86,15 +86,10 @@

    Methods

    Instance Public methods

    -

    - - config() - -

    +

    config()

    - -
    -

    Reads and writes attributes from a configuration OrderedOptions.

    +
    +

    Reads and writes attributes from a configuration OrderedOptions.

    require "active_support/configurable"
     
    @@ -110,8 +105,7 @@ 

    user.config.allowed_access # => true user.config.level # => 1

    -
    - +
    diff --git a/src/classes/ActiveSupport/Configurable/ClassMethods.html b/src/classes/ActiveSupport/Configurable/ClassMethods.html index a5336b5336..91f8ac2025 100644 --- a/src/classes/ActiveSupport/Configurable/ClassMethods.html +++ b/src/classes/ActiveSupport/Configurable/ClassMethods.html @@ -66,15 +66,10 @@

    Methods

    Instance Public methods

    -

    - - config() - -

    +

    config()

    - -
    -

    Reads and writes attributes from a configuration OrderedOptions.

    +
    +

    Reads and writes attributes from a configuration OrderedOptions.

    require "active_support/configurable"
     
    @@ -88,8 +83,7 @@ 

    User.config.allowed_access # => true User.config.level # => 1

    -
    - +
    @@ -119,15 +113,10 @@

    -

    - - configure() - -

    +

    configure()

    - -
    -

    Configure values from within the passed block.

    +
    +

    Configure values from within the passed block.

    require "active_support/configurable"
     
    @@ -143,8 +132,7 @@ 

    User.allowed_access # => true

    -
    - +
    @@ -172,15 +160,10 @@

    Instance Private methods

    -

    - - config_accessor(*names, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil) - -

    +

    config_accessor(*names, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil)

    - -
    -

    Allows you to add shortcut so that you don’t have to refer to attribute through config. Also look at the example for config to contrast.

    +
    +

    Allows you to add shortcut so that you don’t have to refer to attribute through config. Also look at the example for config to contrast.

    Defines both class and instance config accessors.

    @@ -251,8 +234,7 @@

    User.allowed_access # => false User.hair_colors # => [:brown, :black, :blonde, :red] -

    - +
    diff --git a/src/classes/ActiveSupport/Configurable/Configuration.html b/src/classes/ActiveSupport/Configurable/Configuration.html index db25bd1dd4..b92a115466 100644 --- a/src/classes/ActiveSupport/Configurable/Configuration.html +++ b/src/classes/ActiveSupport/Configurable/Configuration.html @@ -67,17 +67,11 @@

    Methods

    Class Public methods

    -

    - - compile_methods!(keys) - -

    +

    compile_methods!(keys)

    - -
    -

    Compiles reader methods so we don’t have to go through method_missing.

    -
    - +
    +

    Compiles reader methods so we don’t have to go through method_missing.

    +
    @@ -110,17 +104,9 @@

    Instance Public methods

    -

    - - compile_methods!() - -

    +

    compile_methods!()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/ContinuousIntegration.html b/src/classes/ActiveSupport/ContinuousIntegration.html index 349789e32d..bc76ef732e 100644 --- a/src/classes/ActiveSupport/ContinuousIntegration.html +++ b/src/classes/ActiveSupport/ContinuousIntegration.html @@ -144,17 +144,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -179,15 +171,10 @@

    -

    - - run(title = "Continuous Integration", subtitle = "Running tests, style checks, and security audits", &block) - -

    +

    run(title = "Continuous Integration", subtitle = "Running tests, style checks, and security audits", &block)

    - -
    -

    Perform a CI run. Execute each step, show their results and runtime, and exit with a non-zero status if there are any failures.

    +
    +

    Perform a CI run. Execute each step, show their results and runtime, and exit with a non-zero status if there are any failures.

    Pass an optional title, subtitle, and a block that declares the steps to be executed.

    @@ -208,8 +195,7 @@

    end end -

    - +
    @@ -243,15 +229,10 @@

    Instance Public methods

    -

    - - echo(text, type:) - -

    +

    echo(text, type:)

    - -
    -

    Echo text to the terminal in the color corresponding to the type of the text.

    +
    +

    Echo text to the terminal in the color corresponding to the type of the text.

    Examples:

    @@ -260,8 +241,7 @@

    See ActiveSupport::ContinuousIntegration::COLORS for a complete list of options.

    -

    - +
    @@ -286,17 +266,11 @@

    -

    - - failure(title, subtitle = nil) - -

    +

    failure(title, subtitle = nil)

    - -
    -

    Display an error heading with the title and optional subtitle to reflect that the run failed.

    -
    - +
    +

    Display an error heading with the title and optional subtitle to reflect that the run failed.

    +
    @@ -321,15 +295,10 @@

    -

    - - heading(heading, subtitle = nil, type: :banner, padding: true) - -

    +

    heading(heading, subtitle = nil, type: :banner, padding: true)

    - -
    -

    Display a colorized heading followed by an optional subtitle.

    +
    +

    Display a colorized heading followed by an optional subtitle.

    Examples:

    @@ -338,8 +307,7 @@

    See ActiveSupport::ContinuousIntegration::COLORS for a complete list of options.

    -

    - +
    @@ -365,23 +333,17 @@

    -

    - - step(title, *command) - -

    +

    step(title, *command)

    - -
    -

    Declare a step with a title and a command. The command can either be given as a single string or as multiple strings that will be passed to ‘system` as individual arguments (and therefore correctly escaped for paths etc).

    +
    +

    Declare a step with a title and a command. The command can either be given as a single string or as multiple strings that will be passed to ‘system` as individual arguments (and therefore correctly escaped for paths etc).

    Examples:

    step "Setup", "bin/setup"
     step "Single test", "bin/rails", "test", "--name", "test_that_is_one"
     
    -
    - +
    @@ -407,17 +369,11 @@

    -

    - - success?() - -

    +

    success?()

    - -
    -

    Returns true if all steps were successful.

    -
    - +
    +

    Returns true if all steps were successful.

    +
    diff --git a/src/classes/ActiveSupport/CurrentAttributes.html b/src/classes/ActiveSupport/CurrentAttributes.html index c2786aa4d3..776dc6c73e 100644 --- a/src/classes/ActiveSupport/CurrentAttributes.html +++ b/src/classes/ActiveSupport/CurrentAttributes.html @@ -207,24 +207,17 @@

    Attributes

    Class Public methods

    -

    - - after_reset(*methods, &block) - -

    +

    after_reset(*methods, &block)

    -
    - -
    - -
    - Alias for: resets -
    +

    + Alias for: + resets. +

    @@ -232,22 +225,16 @@

    -

    - - attribute(*names, default: NOT_SET) - -

    +

    attribute(*names, default: NOT_SET)

    - -
    -

    Declares one or more attributes that will be given both class and instance accessor methods.

    +
    +

    Declares one or more attributes that will be given both class and instance accessor methods.

    Options

    • :default - The default value for the attributes. If the value is a proc or lambda, it will be called whenever an instance is constructed. Otherwise, the value will be duplicated with dup. Default values are re-assigned when the attributes are reset.

    -
    - +
    @@ -297,17 +284,11 @@

    Options

    -

    - - before_reset(*methods, &block) - -

    +

    before_reset(*methods, &block)

    - -
    -

    Calls this callback before reset is called on the instance. Used for resetting external collaborators that depend on current values.

    -
    - +
    +

    Calls this callback before reset is called on the instance. Used for resetting external collaborators that depend on current values.

    +
    @@ -332,17 +313,11 @@

    -

    - - instance() - -

    +

    instance()

    - -
    -

    Returns singleton instance for this class in this thread. If none exists, one is created.

    -
    - +
    +

    Returns singleton instance for this class in this thread. If none exists, one is created.

    +
    @@ -367,17 +342,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -402,22 +369,18 @@

    -

    - - resets(*methods, &block) - -

    +

    resets(*methods, &block)

    - -
    -

    Calls this callback after reset is called on the instance. Used for resetting external collaborators, like Time.zone.

    -
    - +
    +

    Calls this callback after reset is called on the instance. Used for resetting external collaborators, like Time.zone.

    +
    -
    - Also aliased as: after_reset -
    +

    + Also aliased as: + + after_reset. +

    @@ -445,17 +408,9 @@

    Instance Public methods

    -

    - - attributes() - -

    +

    attributes()

    -
    - -
    - @@ -480,17 +435,11 @@

    -

    - - reset() - -

    +

    reset()

    - -
    -

    Reset all attributes. Should be called before and after actions, when used as a per-request singleton.

    -
    - +
    +

    Reset all attributes. Should be called before and after actions, when used as a per-request singleton.

    +
    @@ -517,15 +466,10 @@

    -

    - - set(attributes, &block) - -

    +

    set(attributes, &block)

    - -
    -

    Expose one or more attributes within a block. Old values are returned after the block concludes. Example demonstrating the common use of needing to set Current attributes outside the request-cycle:

    +
    +

    Expose one or more attributes within a block. Old values are returned after the block concludes. Example demonstrating the common use of needing to set Current attributes outside the request-cycle:

    class Chat::PublicationJob < ApplicationJob
       def perform(attributes, room_number, creator)
    @@ -535,8 +479,7 @@ 

    end end

    -
    - +
    diff --git a/src/classes/ActiveSupport/Dependencies.html b/src/classes/ActiveSupport/Dependencies.html index c1fbdbc460..18e2556318 100644 --- a/src/classes/ActiveSupport/Dependencies.html +++ b/src/classes/ActiveSupport/Dependencies.html @@ -89,17 +89,11 @@

    Methods

    Class Public methods

    -

    - - load_interlock(&block) - -

    +

    load_interlock(&block)

    - -
    -

    Execute the supplied block while holding an exclusive lock, preventing any other thread from being inside a run_interlock block at the same time.

    -
    - +
    +

    Execute the supplied block while holding an exclusive lock, preventing any other thread from being inside a run_interlock block at the same time.

    +
    @@ -129,17 +123,11 @@

    -

    - - run_interlock(&block) - -

    +

    run_interlock(&block)

    - -
    -

    Execute the supplied block without interference from any concurrent loads.

    -
    - +
    +

    Execute the supplied block without interference from any concurrent loads.

    +
    @@ -164,17 +152,11 @@

    -

    - - unload_interlock(&block) - -

    +

    unload_interlock(&block)

    - -
    -

    Execute the supplied block while holding an exclusive lock, preventing any other thread from being inside a run_interlock block at the same time.

    -
    - +
    +

    Execute the supplied block while holding an exclusive lock, preventing any other thread from being inside a run_interlock block at the same time.

    +
    diff --git a/src/classes/ActiveSupport/Dependencies/Interlock.html b/src/classes/ActiveSupport/Dependencies/Interlock.html index 973010e54b..a789d949a0 100644 --- a/src/classes/ActiveSupport/Dependencies/Interlock.html +++ b/src/classes/ActiveSupport/Dependencies/Interlock.html @@ -92,17 +92,9 @@

    Methods

    Instance Public methods

    -

    - - done_running() - -

    +

    done_running()

    -
    - -
    - @@ -127,17 +119,9 @@

    -

    - - done_unloading() - -

    +

    done_unloading()

    -
    - -
    - @@ -162,17 +146,9 @@

    -

    - - loading(&block) - -

    +

    loading(&block)

    -
    - -
    - @@ -202,17 +178,9 @@

    -

    - - permit_concurrent_loads(&block) - -

    +

    permit_concurrent_loads(&block)

    -
    - -
    - @@ -238,17 +206,9 @@

    -

    - - running(&block) - -

    +

    running(&block)

    -
    - -
    - @@ -273,17 +233,9 @@

    -

    - - start_running() - -

    +

    start_running()

    -
    - -
    - @@ -308,17 +260,9 @@

    -

    - - start_unloading() - -

    +

    start_unloading()

    -
    - -
    - @@ -343,17 +287,9 @@

    -

    - - unloading(&block) - -

    +

    unloading(&block)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Dependencies/RequireDependency.html b/src/classes/ActiveSupport/Dependencies/RequireDependency.html index 78d94cde27..af9e018d25 100644 --- a/src/classes/ActiveSupport/Dependencies/RequireDependency.html +++ b/src/classes/ActiveSupport/Dependencies/RequireDependency.html @@ -58,19 +58,13 @@

    Methods

    Instance Public methods

    -

    - - require_dependency(filename) - -

    +

    require_dependency(filename)

    - -
    -

    Warning: This method is obsolete. The semantics of the autoloader match Ruby’s and you do not need to be defensive with load order anymore. Just refer to classes and modules normally.

    +
    +

    Warning: This method is obsolete. The semantics of the autoloader match Ruby’s and you do not need to be defensive with load order anymore. Just refer to classes and modules normally.

    Engines that do not control the mode in which their parent application runs should call require_dependency where needed in case the runtime mode is :classic.

    -
    - +
    diff --git a/src/classes/ActiveSupport/Deprecation.html b/src/classes/ActiveSupport/Deprecation.html index ded2cf08e7..2e3715852d 100644 --- a/src/classes/ActiveSupport/Deprecation.html +++ b/src/classes/ActiveSupport/Deprecation.html @@ -258,20 +258,14 @@

    Attributes

    Class Public methods

    -

    - - new(deprecation_horizon = "8.2", gem_name = "Rails") - -

    +

    new(deprecation_horizon = "8.2", gem_name = "Rails")

    - -
    -

    It accepts two parameters on initialization. The first is a version of library and the second is a library name.

    +
    +

    It accepts two parameters on initialization. The first is a version of library and the second is a library name.

    ActiveSupport::Deprecation.new('2.0', 'MyLibrary')
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/Deprecation/Behavior.html b/src/classes/ActiveSupport/Deprecation/Behavior.html index fcccf622e2..ca746418c8 100644 --- a/src/classes/ActiveSupport/Deprecation/Behavior.html +++ b/src/classes/ActiveSupport/Deprecation/Behavior.html @@ -111,17 +111,11 @@

    Attributes

    Instance Public methods

    -

    - - behavior() - -

    +

    behavior()

    - -
    -

    Returns the current behavior or if one isn’t set, defaults to :stderr.

    -
    - +
    +

    Returns the current behavior or if one isn’t set, defaults to :stderr.

    +
    @@ -146,15 +140,10 @@

    -

    - - behavior=(behavior) - -

    +

    behavior=(behavior)

    - -
    -

    Sets the behavior to the specified value. Can be a single value, array, or an object that responds to call.

    +
    +

    Sets the behavior to the specified value. Can be a single value, array, or an object that responds to call.

    Available behaviors:

    :raise
    @@ -189,8 +178,7 @@

    If you are using Rails, you can set config.active_support.report_deprecations = false to disable all deprecation behaviors. This is similar to the :silence option but more performant.

    -

    - +
    @@ -215,17 +203,11 @@

    -

    - - disallowed_behavior() - -

    +

    disallowed_behavior()

    - -
    -

    Returns the current behavior for disallowed deprecations or if one isn’t set, defaults to :raise.

    -
    - +
    +

    Returns the current behavior for disallowed deprecations or if one isn’t set, defaults to :raise.

    +
    @@ -250,17 +232,11 @@

    -

    - - disallowed_behavior=(behavior) - -

    +

    disallowed_behavior=(behavior)

    - -
    -

    Sets the behavior for disallowed deprecations (those configured by ActiveSupport::Deprecation#disallowed_warnings=) to the specified value. As with behavior=, this can be a single value, array, or an object that responds to call.

    -
    - +
    +

    Sets the behavior for disallowed deprecations (those configured by ActiveSupport::Deprecation#disallowed_warnings=) to the specified value. As with behavior=, this can be a single value, array, or an object that responds to call.

    +
    diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html index 421d28119f..1903867036 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantAccessor.html @@ -65,17 +65,9 @@

    Methods

    Class Public methods

    -

    - - included(base) - -

    +

    included(base)

    -
    - -
    - @@ -167,17 +159,9 @@

    Instance Public methods

    -

    - - const_missing(missing_const_name) - -

    +

    const_missing(missing_const_name)

    -
    - -
    - @@ -208,15 +192,10 @@

    -

    - - deprecate_constant(old_constant_name, new_constant_path, deprecator:, message: nil) - -

    +

    deprecate_constant(old_constant_name, new_constant_path, deprecator:, message: nil)

    - -
    -

    Provides a way to rename constants with a deprecation cycle in which both the old and new names work, but using the old one prints a deprecation message.

    +
    +

    Provides a way to rename constants with a deprecation cycle in which both the old and new names work, but using the old one prints a deprecation message.

    In order to rename A::B to C::D, you need to delete the definition of A::B and declare the deprecation in A:

    @@ -248,8 +227,7 @@

    For this to work, a const_missing hook is installed. When client code references the deprecated constant, the callback prints the message and constantizes the replacement.

    Caveat: If the deprecated constant name is reachable in a different namespace and Ruby constant lookup finds it, the hook won’t be called and the deprecation won’t work as intended. This may happen, for example, if an ancestor of the enclosing namespace has a constant with the same name. This is an unsupported edge case.

    -

    - +
    diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html index 4d5d71fd1d..2ece34cbdc 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedConstantProxy.html @@ -106,17 +106,9 @@

    Methods

    Class Public methods

    -

    - - new(*args, **options, &block) - -

    +

    new(*args, **options, &block)

    -
    - -
    - @@ -144,17 +136,9 @@

    -

    - - new(old_const, new_const, deprecator, message: "#{old_const} is deprecated! Use #{new_const} instead.") - -

    +

    new(old_const, new_const, deprecator, message: "#{old_const} is deprecated! Use #{new_const} instead.")

    -
    - -
    - @@ -188,17 +172,9 @@

    Instance Public methods

    -

    - - append_features(base) - -

    +

    append_features(base)

    -
    - -
    - @@ -224,22 +200,16 @@

    -

    - - class() - -

    +

    class()

    - -
    -

    Returns the class of the new constant.

    +
    +

    Returns the class of the new constant.

    PLANETS_POST_2006 = %w(mercury venus earth mars jupiter saturn uranus neptune)
     PLANETS = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('PLANETS', 'PLANETS_POST_2006')
     PLANETS.class # => Array
     
    -
    - +
    @@ -264,17 +234,9 @@

    -

    - - extended(base) - -

    +

    extended(base)

    -
    - -
    - @@ -300,17 +262,11 @@

    -

    - - inspect() - -

    +

    inspect()

    - -
    -

    Don’t give a deprecation warning on inspect since test/unit and error logs rely on it for diagnostics.

    -
    - +
    +

    Don’t give a deprecation warning on inspect since test/unit and error logs rely on it for diagnostics.

    +
    @@ -335,17 +291,9 @@

    -

    - - prepend_features(base) - -

    +

    prepend_features(base)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html b/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html index e02ffac9b5..6beea0d291 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedInstanceVariableProxy.html @@ -99,17 +99,9 @@

    Methods

    Class Public methods

    -

    - - new(instance, method, var = "@#{method}", deprecator:) - -

    +

    new(instance, method, var = "@#{method}", deprecator:)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html b/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html index 606422fba2..567d3d8383 100644 --- a/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html +++ b/src/classes/ActiveSupport/Deprecation/DeprecatedObjectProxy.html @@ -78,17 +78,9 @@

    Methods

    Class Public methods

    -

    - - new(object, message, deprecator) - -

    +

    new(object, message, deprecator)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Deprecation/Deprecators.html b/src/classes/ActiveSupport/Deprecation/Deprecators.html index 5477e71dc0..72e6c07279 100644 --- a/src/classes/ActiveSupport/Deprecation/Deprecators.html +++ b/src/classes/ActiveSupport/Deprecation/Deprecators.html @@ -105,17 +105,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -145,17 +137,11 @@

    Instance Public methods

    -

    - - [](name) - -

    +

    [](name)

    - -
    -

    Returns a deprecator added to this collection via []=.

    -
    - +
    +

    Returns a deprecator added to this collection via []=.

    +
    @@ -180,15 +166,10 @@

    -

    - - []=(name, deprecator) - -

    +

    []=(name, deprecator)

    - -
    -

    Adds a given deprecator to this collection. The deprecator will be immediately configured with any options previously set on this collection.

    +
    +

    Adds a given deprecator to this collection. The deprecator will be immediately configured with any options previously set on this collection.

    deprecators = ActiveSupport::Deprecation::Deprecators.new
     deprecators.debug = true
    @@ -200,8 +181,7 @@ 

    deprecators[:foo].debug # => true foo_deprecator.debug # => true

    -
    - +
    @@ -227,19 +207,13 @@

    -

    - - behavior=(behavior) - -

    +

    behavior=(behavior)

    - -
    -

    Sets the deprecation warning behavior for all deprecators in this collection.

    +
    +

    Sets the deprecation warning behavior for all deprecators in this collection.

    See ActiveSupport::Deprecation#behavior=.

    -
    - +
    @@ -264,17 +238,11 @@

    -

    - - debug=(debug) - -

    +

    debug=(debug)

    - -
    -

    Sets the debug flag for all deprecators in this collection.

    -
    - +
    +

    Sets the debug flag for all deprecators in this collection.

    +
    @@ -299,19 +267,13 @@

    -

    - - disallowed_behavior=(disallowed_behavior) - -

    +

    disallowed_behavior=(disallowed_behavior)

    - -
    -

    Sets the disallowed deprecation warning behavior for all deprecators in this collection.

    +
    +

    Sets the disallowed deprecation warning behavior for all deprecators in this collection.

    See ActiveSupport::Deprecation#disallowed_behavior=.

    -
    - +
    @@ -336,19 +298,13 @@

    -

    - - disallowed_warnings=(disallowed_warnings) - -

    +

    disallowed_warnings=(disallowed_warnings)

    - -
    -

    Sets the disallowed deprecation warnings for all deprecators in this collection.

    +
    +

    Sets the disallowed deprecation warnings for all deprecators in this collection.

    See ActiveSupport::Deprecation#disallowed_warnings=.

    -
    - +
    @@ -373,17 +329,11 @@

    -

    - - each(&block) - -

    +

    each(&block)

    - -
    -

    Iterates over all deprecators in this collection. If no block is given, returns an Enumerator.

    -
    - +
    +

    Iterates over all deprecators in this collection. If no block is given, returns an Enumerator.

    +
    @@ -409,19 +359,13 @@

    -

    - - silence(&block) - -

    +

    silence(&block)

    - -
    -

    Silences all deprecators in this collection for the duration of the given block.

    +
    +

    Silences all deprecators in this collection for the duration of the given block.

    See ActiveSupport::Deprecation#silence.

    -
    - +
    @@ -449,17 +393,11 @@

    -

    - - silenced=(silenced) - -

    +

    silenced=(silenced)

    - -
    -

    Sets the silenced flag for all deprecators in this collection.

    -
    - +
    +

    Sets the silenced flag for all deprecators in this collection.

    +
    diff --git a/src/classes/ActiveSupport/Deprecation/Disallowed.html b/src/classes/ActiveSupport/Deprecation/Disallowed.html index 5c66ae2164..4fa0bc5e16 100644 --- a/src/classes/ActiveSupport/Deprecation/Disallowed.html +++ b/src/classes/ActiveSupport/Deprecation/Disallowed.html @@ -76,17 +76,11 @@

    Attributes

    Instance Public methods

    -

    - - disallowed_warnings() - -

    +

    disallowed_warnings()

    - -
    -

    Returns the configured criteria used to identify deprecation messages which should be treated as disallowed.

    -
    - +
    +

    Returns the configured criteria used to identify deprecation messages which should be treated as disallowed.

    +
    diff --git a/src/classes/ActiveSupport/Deprecation/MethodWrapper.html b/src/classes/ActiveSupport/Deprecation/MethodWrapper.html index 3b63f131dc..92c0e4a563 100644 --- a/src/classes/ActiveSupport/Deprecation/MethodWrapper.html +++ b/src/classes/ActiveSupport/Deprecation/MethodWrapper.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - deprecate_methods(target_module, *method_names) - -

    +

    deprecate_methods(target_module, *method_names)

    - -
    -

    Declare that a method has been deprecated.

    +
    +

    Declare that a method has been deprecated.

    class Fred
       def aaa; end
    @@ -93,8 +88,7 @@ 

    # DEPRECATION WARNING: ccc is deprecated and will be removed from MyGem next-release (use Bar#ccc instead). (called from irb_binding at (irb):12) # => nil

    -
    - +
    diff --git a/src/classes/ActiveSupport/Deprecation/Reporting.html b/src/classes/ActiveSupport/Deprecation/Reporting.html index d354c0f271..4327b60ddc 100644 --- a/src/classes/ActiveSupport/Deprecation/Reporting.html +++ b/src/classes/ActiveSupport/Deprecation/Reporting.html @@ -96,15 +96,10 @@

    Attributes

    Instance Public methods

    -

    - - allow(allowed_warnings = :all, if: true, &block) - -

    +

    allow(allowed_warnings = :all, if: true, &block)

    - -
    -

    Allow previously disallowed deprecation warnings within the block. allowed_warnings can be an array containing strings, symbols, or regular expressions. (Symbols are treated as strings). These are compared against the text of deprecation warning messages generated within the block. Matching warnings will be exempt from the rules set by ActiveSupport::Deprecation#disallowed_warnings.

    +
    +

    Allow previously disallowed deprecation warnings within the block. allowed_warnings can be an array containing strings, symbols, or regular expressions. (Symbols are treated as strings). These are compared against the text of deprecation warning messages generated within the block. Matching warnings will be exempt from the rules set by ActiveSupport::Deprecation#disallowed_warnings.

    The optional if: argument accepts a truthy/falsy value or an object that responds to .call. If truthy, then matching warnings will be allowed. If falsey then the method yields to the block without allowing the warning.

    @@ -127,8 +122,7 @@

    end # => ActiveSupport::DeprecationException for dev/test, nil for production -

    - +
    @@ -159,17 +153,9 @@

    -

    - - deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil) - -

    +

    deprecation_warning(deprecated_method_name, message = nil, caller_backtrace = nil)

    -
    - -
    - @@ -197,15 +183,10 @@

    -

    - - silence(&block) - -

    +

    silence(&block)

    - -
    -

    Silence deprecation warnings within the block.

    +
    +

    Silence deprecation warnings within the block.

    deprecator = ActiveSupport::Deprecation.new
     deprecator.warn('something broke!')
    @@ -216,8 +197,7 @@ 

    end # => nil

    -
    - +
    @@ -245,17 +225,9 @@

    -

    - - silenced() - -

    +

    silenced()

    -
    - -
    - @@ -280,21 +252,15 @@

    -

    - - warn(message = nil, callstack = nil) - -

    +

    warn(message = nil, callstack = nil)

    - -
    -

    Outputs a deprecation warning to the output configured by ActiveSupport::Deprecation#behavior.

    +
    +

    Outputs a deprecation warning to the output configured by ActiveSupport::Deprecation#behavior.

    ActiveSupport::Deprecation.new.warn('something broke!')
     # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)"
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/DescendantsTracker.html b/src/classes/ActiveSupport/DescendantsTracker.html index 18dbbf913e..71629db35c 100644 --- a/src/classes/ActiveSupport/DescendantsTracker.html +++ b/src/classes/ActiveSupport/DescendantsTracker.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - descendants(klass) - -

    +

    descendants(klass)

    -
    - -
    - @@ -110,17 +102,9 @@

    -

    - - subclasses(klass) - -

    +

    subclasses(klass)

    -
    - -
    - @@ -149,17 +133,9 @@

    Instance Public methods

    -

    - - descendants() - -

    +

    descendants()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Duration.html b/src/classes/ActiveSupport/Duration.html index 7bbc345c68..9d63a55206 100644 --- a/src/classes/ActiveSupport/Duration.html +++ b/src/classes/ActiveSupport/Duration.html @@ -292,21 +292,15 @@

    Attributes

    Class Public methods

    -

    - - build(value) - -

    +

    build(value)

    - -
    -

    Creates a new Duration from a seconds value that is converted to the individual parts:

    +
    +

    Creates a new Duration from a seconds value that is converted to the individual parts:

    ActiveSupport::Duration.build(31556952).parts # => {:years=>1}
     ActiveSupport::Duration.build(2716146).parts  # => {:months=>1, :days=>1}
     
    -
    - +
    @@ -354,19 +348,13 @@

    -

    - - parse(iso8601duration) - -

    +

    parse(iso8601duration)

    - -
    -

    Creates a new Duration from string formatted according to ISO 8601 Duration.

    +
    +

    Creates a new Duration from string formatted according to ISO 8601 Duration.

    See ISO 8601 for more information. This method allows negative parts to be present in pattern. If invalid string is provided, it will raise ActiveSupport::Duration::ISO8601Parser::ParsingError.

    -
    - +
    @@ -396,17 +384,11 @@

    Instance Public methods

    -

    - - %(other) - -

    +

    %(other)

    - -
    -

    Returns the modulo of this Duration by another Duration or Numeric. Numeric values are treated as seconds.

    -
    - +
    +

    Returns the modulo of this Duration by another Duration or Numeric. Numeric values are treated as seconds.

    +
    @@ -437,17 +419,11 @@

    -

    - - *(other) - -

    +

    *(other)

    - -
    -

    Multiplies this Duration by a Numeric and returns a new Duration.

    -
    - +
    +

    Multiplies this Duration by a Numeric and returns a new Duration.

    +
    @@ -478,17 +454,11 @@

    -

    - - +(other) - -

    +

    +(other)

    - -
    -

    Adds another Duration or a Numeric to this Duration. Numeric values are treated as seconds.

    -
    - +
    +

    Adds another Duration or a Numeric to this Duration. Numeric values are treated as seconds.

    +
    @@ -521,17 +491,11 @@

    -

    - - -(other) - -

    +

    -(other)

    - -
    -

    Subtracts another Duration or a Numeric from this Duration. Numeric values are treated as seconds.

    -
    - +
    +

    Subtracts another Duration or a Numeric from this Duration. Numeric values are treated as seconds.

    +
    @@ -556,17 +520,11 @@

    -

    - - /(other) - -

    +

    /(other)

    - -
    -

    Divides this Duration by a Numeric and returns a new Duration.

    -
    - +
    +

    Divides this Duration by a Numeric and returns a new Duration.

    +
    @@ -599,17 +557,11 @@

    -

    - - <=>(other) - -

    +

    <=>(other)

    - -
    -

    Compares one Duration with another or a Numeric to this Duration. Numeric values are treated as seconds.

    -
    - +
    +

    Compares one Duration with another or a Numeric to this Duration. Numeric values are treated as seconds.

    +
    @@ -638,17 +590,11 @@

    -

    - - ==(other) - -

    +

    ==(other)

    - -
    -

    Returns true if other is also a Duration instance with the same value, or if other == value.

    -
    - +
    +

    Returns true if other is also a Duration instance with the same value, or if other == value.

    +
    @@ -677,24 +623,17 @@

    -

    - - after(time = ::Time.current) - -

    +

    after(time = ::Time.current)

    -
    - -
    - -
    - Alias for: since -
    +

    + Alias for: + since. +

    @@ -702,22 +641,18 @@

    -

    - - ago(time = ::Time.current) - -

    +

    ago(time = ::Time.current)

    - -
    -

    Calculates a new Time or Date that is as far in the past as this Duration represents.

    -
    - +
    +

    Calculates a new Time or Date that is as far in the past as this Duration represents.

    +
    -
    - Also aliased as: until, before -
    +

    + Also aliased as: + + until, before. +

    @@ -741,24 +676,17 @@

    -

    - - before(time = ::Time.current) - -

    +

    before(time = ::Time.current)

    -
    - -
    - -
    - Alias for: ago -
    +

    + Alias for: + ago. +

    @@ -766,17 +694,11 @@

    -

    - - eql?(other) - -

    +

    eql?(other)

    - -
    -

    Returns true if other is also a Duration instance, which has the same parts as this one.

    -
    - +
    +

    Returns true if other is also a Duration instance, which has the same parts as this one.

    +
    @@ -801,24 +723,17 @@

    -

    - - from_now(time = ::Time.current) - -

    +

    from_now(time = ::Time.current)

    -
    - -
    - -
    - Alias for: since -
    +

    + Alias for: + since. +

    @@ -826,17 +741,9 @@

    -

    - - hash() - -

    +

    hash()

    -
    - -
    - @@ -861,20 +768,14 @@

    -

    - - in_days() - -

    +

    in_days()

    - -
    -

    Returns the amount of days a duration covers as a float

    +
    +

    Returns the amount of days a duration covers as a float

    12.hours.in_days # => 0.5
     
    -
    - +
    @@ -899,20 +800,14 @@

    -

    - - in_hours() - -

    +

    in_hours()

    - -
    -

    Returns the amount of hours a duration covers as a float

    +
    +

    Returns the amount of hours a duration covers as a float

    1.day.in_hours # => 24.0
     
    -
    - +
    @@ -937,20 +832,14 @@

    -

    - - in_minutes() - -

    +

    in_minutes()

    - -
    -

    Returns the amount of minutes a duration covers as a float

    +
    +

    Returns the amount of minutes a duration covers as a float

    1.day.in_minutes # => 1440.0
     
    -
    - +
    @@ -975,20 +864,14 @@

    -

    - - in_months() - -

    +

    in_months()

    - -
    -

    Returns the amount of months a duration covers as a float

    +
    +

    Returns the amount of months a duration covers as a float

    9.weeks.in_months # => 2.07
     
    -
    - +
    @@ -1013,24 +896,17 @@

    -

    - - in_seconds() - -

    +

    in_seconds()

    -
    - -
    - -
    - Alias for: to_i -
    +

    + Alias for: + to_i. +

    @@ -1038,20 +914,14 @@

    -

    - - in_weeks() - -

    +

    in_weeks()

    - -
    -

    Returns the amount of weeks a duration covers as a float

    +
    +

    Returns the amount of weeks a duration covers as a float

    2.months.in_weeks # => 8.696
     
    -
    - +
    @@ -1076,20 +946,14 @@

    -

    - - in_years() - -

    +

    in_years()

    - -
    -

    Returns the amount of years a duration covers as a float

    +
    +

    Returns the amount of years a duration covers as a float

    30.days.in_years # => 0.082
     
    -
    - +
    @@ -1114,17 +978,11 @@

    -

    - - iso8601(precision: nil) - -

    +

    iso8601(precision: nil)

    - -
    -

    Build ISO 8601 Duration string for this duration. The precision parameter can be used to limit seconds’ precision of duration.

    -
    - +
    +

    Build ISO 8601 Duration string for this duration. The precision parameter can be used to limit seconds’ precision of duration.

    +
    @@ -1149,21 +1007,15 @@

    -

    - - parts() - -

    +

    parts()

    - -
    -

    Returns a copy of the parts hash that defines the duration.

    +
    +

    Returns a copy of the parts hash that defines the duration.

    5.minutes.parts # => {:minutes=>5}
     3.years.parts # => {:years=>3}
     
    -
    - +
    @@ -1188,22 +1040,18 @@

    -

    - - since(time = ::Time.current) - -

    +

    since(time = ::Time.current)

    - -
    -

    Calculates a new Time or Date that is as far in the future as this Duration represents.

    -
    - +
    +

    Calculates a new Time or Date that is as far in the future as this Duration represents.

    +
    -
    - Also aliased as: from_now, after -
    +

    + Also aliased as: + + from_now, after. +

    @@ -1227,15 +1075,10 @@

    -

    - - to_i() - -

    +

    to_i()

    - -
    -

    Returns the number of seconds that this Duration represents.

    +
    +

    Returns the number of seconds that this Duration represents.

    1.minute.to_i   # => 60
     1.hour.to_i     # => 3600
    @@ -1252,13 +1095,14 @@ 

    In such cases, Ruby’s core Date and Time should be used for precision date and time arithmetic.

    -
    - +
    -
    - Also aliased as: in_seconds -
    +

    + Also aliased as: + + in_seconds. +

    @@ -1282,20 +1126,14 @@

    -

    - - to_s() - -

    +

    to_s()

    - -
    -

    Returns the amount of seconds a duration covers as a string. For more information check to_i method.

    +
    +

    Returns the amount of seconds a duration covers as a string. For more information check to_i method.

    1.day.to_s # => "86400"
     
    -
    - +
    @@ -1320,24 +1158,17 @@

    -

    - - until(time = ::Time.current) - -

    +

    until(time = ::Time.current)

    -
    - -
    - -
    - Alias for: ago -
    +

    + Alias for: + ago. +

    diff --git a/src/classes/ActiveSupport/Editor.html b/src/classes/ActiveSupport/Editor.html index f41d6638d0..42187ea54e 100644 --- a/src/classes/ActiveSupport/Editor.html +++ b/src/classes/ActiveSupport/Editor.html @@ -67,17 +67,11 @@

    Methods

    Class Public methods

    -

    - - current() - -

    +

    current()

    - -
    -

    Returns the current editor pattern if it is known. First check for the RAILS_EDITOR environment variable, and if it’s missing, check for the EDITOR environment variable.

    -
    - +
    +

    Returns the current editor pattern if it is known. First check for the RAILS_EDITOR environment variable, and if it’s missing, check for the EDITOR environment variable.

    +
    @@ -107,21 +101,15 @@

    -

    - - register(name, url_pattern, aliases: []) - -

    +

    register(name, url_pattern, aliases: [])

    - -
    -

    Registers a URL pattern for opening file in a given editor. This allows Rails to generate clickable links to control known editors.

    +
    +

    Registers a URL pattern for opening file in a given editor. This allows Rails to generate clickable links to control known editors.

    Example:

    ActiveSupport::Editor.register(“myeditor”, “myeditor://%s:%d”)

    -
    - +
    diff --git a/src/classes/ActiveSupport/EncryptedConfiguration.html b/src/classes/ActiveSupport/EncryptedConfiguration.html index aacead810a..c719c09d67 100644 --- a/src/classes/ActiveSupport/EncryptedConfiguration.html +++ b/src/classes/ActiveSupport/EncryptedConfiguration.html @@ -113,17 +113,9 @@

    Methods

    Class Public methods

    -

    - - new(config_path:, key_path:, env_key:, raise_if_missing_key:) - -

    +

    new(config_path:, key_path:, env_key:, raise_if_missing_key:)

    -
    - -
    - @@ -155,15 +147,10 @@

    Instance Public methods

    -

    - - config() - -

    +

    config()

    - -
    -

    Returns the decrypted content as a Hash with symbolized keys.

    +
    +

    Returns the decrypted content as a Hash with symbolized keys.

    my_config = ActiveSupport::EncryptedConfiguration.new(...)
     my_config.read # => "some_secret: 123\nsome_namespace:\n  another_secret: 456"
    @@ -171,8 +158,7 @@ 

    my_config.config # => { some_secret: 123, some_namespace: { another_secret: 789 } }

    -
    - +
    @@ -197,17 +183,11 @@

    -

    - - read() - -

    +

    read()

    - -
    -

    Reads the file and returns the decrypted content. See EncryptedFile#read.

    -
    - +
    +

    Reads the file and returns the decrypted content. See EncryptedFile#read.

    +
    diff --git a/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html b/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html index e192277e95..2bec45a5fa 100644 --- a/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html +++ b/src/classes/ActiveSupport/EncryptedConfiguration/InvalidContentError.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(content_path) - -

    +

    new(content_path)

    -
    - -
    - @@ -106,17 +98,9 @@

    Instance Public methods

    -

    - - message() - -

    +

    message()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/EncryptedConfiguration/InvalidKeyError.html b/src/classes/ActiveSupport/EncryptedConfiguration/InvalidKeyError.html index 589745f278..5ab7b5fd51 100644 --- a/src/classes/ActiveSupport/EncryptedConfiguration/InvalidKeyError.html +++ b/src/classes/ActiveSupport/EncryptedConfiguration/InvalidKeyError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(content_path, key) - -

    +

    new(content_path, key)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/EncryptedFile.html b/src/classes/ActiveSupport/EncryptedFile.html index d07f98a2a0..c41c28e198 100644 --- a/src/classes/ActiveSupport/EncryptedFile.html +++ b/src/classes/ActiveSupport/EncryptedFile.html @@ -155,17 +155,9 @@

    Attributes

    Class Public methods

    -

    - - generate_key() - -

    +

    generate_key()

    -
    - -
    - @@ -190,17 +182,9 @@

    -

    - - new(content_path:, key_path:, env_key:, raise_if_missing_key:) - -

    +

    new(content_path:, key_path:, env_key:, raise_if_missing_key:)

    -
    - -
    - @@ -231,17 +215,9 @@

    Instance Public methods

    -

    - - change(&block) - -

    +

    change(&block)

    -
    - -
    - @@ -266,17 +242,11 @@

    -

    - - key() - -

    +

    key()

    - -
    -

    Returns the encryption key, first trying the environment variable specified by env_key, then trying the key file specified by key_path. If raise_if_missing_key is true, raises MissingKeyError if the environment variable is not set and the key file does not exist.

    -
    - +
    +

    Returns the encryption key, first trying the environment variable specified by env_key, then trying the key file specified by key_path. If raise_if_missing_key is true, raises MissingKeyError if the environment variable is not set and the key file does not exist.

    +
    @@ -301,17 +271,11 @@

    -

    - - key?() - -

    +

    key?()

    - -
    -

    Returns truthy if key is truthy. Returns falsy otherwise. Unlike key, does not raise MissingKeyError when raise_if_missing_key is true.

    -
    - +
    +

    Returns truthy if key is truthy. Returns falsy otherwise. Unlike key, does not raise MissingKeyError when raise_if_missing_key is true.

    +
    @@ -336,15 +300,10 @@

    -

    - - read() - -

    +

    read()

    - -
    -

    Reads the file and returns the decrypted content.

    +
    +

    Reads the file and returns the decrypted content.

    Raises:

    -
    - +
    @@ -384,17 +342,9 @@

    -

    - - write(contents) - -

    +

    write(contents)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html b/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html index 1e49afbb3b..826d1b6d9e 100644 --- a/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html +++ b/src/classes/ActiveSupport/EncryptedFile/InvalidKeyLengthError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html b/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html index 0e6d71c05c..61d871dba8 100644 --- a/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html +++ b/src/classes/ActiveSupport/EncryptedFile/MissingContentError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(content_path) - -

    +

    new(content_path)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html b/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html index cf8d0bb372..c359d91df2 100644 --- a/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html +++ b/src/classes/ActiveSupport/EncryptedFile/MissingKeyError.html @@ -63,17 +63,9 @@

    Methods

    Class Public methods

    -

    - - new(key_path:, env_key:) - -

    +

    new(key_path:, env_key:)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/ErrorReporter.html b/src/classes/ActiveSupport/ErrorReporter.html index f4eba046e2..9ed76d1efb 100644 --- a/src/classes/ActiveSupport/ErrorReporter.html +++ b/src/classes/ActiveSupport/ErrorReporter.html @@ -199,17 +199,9 @@

    Attributes

    Class Public methods

    -

    - - new(*subscribers, logger: nil) - -

    +

    new(*subscribers, logger: nil)

    -
    - -
    - @@ -241,15 +233,10 @@

    Instance Public methods

    -

    - - add_middleware(middleware) - -

    +

    add_middleware(middleware)

    - -
    -

    Add a middleware to modify the error context before it is sent to subscribers.

    +
    +

    Add a middleware to modify the error context before it is sent to subscribers.

    Middleware is added to a stack of callables run on an error’s execution context before passing to subscribers. Allows creation of entries in error context that are shared by all subscribers.

    @@ -257,8 +244,7 @@

    Rails.error.add_middleware(-> (error, context) { context.merge({ foo: :bar }) })
     
    -

    - +
    @@ -283,19 +269,13 @@

    -

    - - disable(subscriber) - -

    +

    disable(subscriber)

    - -
    -

    Prevent a subscriber from being notified of errors for the duration of the block. You may pass in the subscriber itself, or its class.

    +
    +

    Prevent a subscriber from being notified of errors for the duration of the block. You may pass in the subscriber itself, or its class.

    This can be helpful for error reporting service integrations, when they wish to handle any errors higher in the stack.

    -
    - +
    @@ -326,15 +306,10 @@

    -

    - - handle(*error_classes, severity: :warning, context: {}, fallback: nil, source: DEFAULT_SOURCE) - -

    +

    handle(*error_classes, severity: :warning, context: {}, fallback: nil, source: DEFAULT_SOURCE)

    - -
    -

    Evaluates the given block, reporting and swallowing any unhandled error. If no error is raised, returns the return value of the block. Otherwise, returns the result of fallback.call, or nil if fallback is not specified.

    +
    +

    Evaluates the given block, reporting and swallowing any unhandled error. If no error is raised, returns the return value of the block. Otherwise, returns the result of fallback.call, or nil if fallback is not specified.

    # Will report a TypeError to all subscribers and return nil.
     Rails.error.handle do
    @@ -367,8 +342,7 @@ 

    Options

  • :source - This value is passed along to subscribers to indicate the source of the error. Subscribers can use this value to ignore certain errors. Defaults to "application".

  • -
    - +
    @@ -397,15 +371,10 @@

    Options

    -

    - - record(*error_classes, severity: :error, context: {}, source: DEFAULT_SOURCE) - -

    +

    record(*error_classes, severity: :error, context: {}, source: DEFAULT_SOURCE)

    - -
    -

    Evaluates the given block, reporting and re-raising any unhandled error. If no error is raised, returns the return value of the block.

    +
    +

    Evaluates the given block, reporting and re-raising any unhandled error. If no error is raised, returns the return value of the block.

    # Will report a TypeError to all subscribers and re-raise it.
     Rails.error.record do
    @@ -431,8 +400,7 @@ 

    Options

  • :source - This value is passed along to subscribers to indicate the source of the error. Subscribers can use this value to ignore certain errors. Defaults to "application".

  • -
    - +
    @@ -461,15 +429,10 @@

    Options

    -

    - - report(error, handled: true, severity: handled ? :warning : :error, context: {}, source: DEFAULT_SOURCE) - -

    +

    report(error, handled: true, severity: handled ? :warning : :error, context: {}, source: DEFAULT_SOURCE)

    - -
    -

    Report an error directly to subscribers. You can use this method when the block-based handle and record methods are not suitable.

    +
    +

    Report an error directly to subscribers. You can use this method when the block-based handle and record methods are not suitable.

    Rails.error.report(error)
     
    @@ -480,8 +443,7 @@

    Otherwise you can use unexpected to report an error which does accept a string argument.

    -

    - +
    @@ -546,20 +508,14 @@

    -

    - - set_context(...) - -

    +

    set_context(...)

    - -
    -

    Update the execution context that is accessible to error subscribers. Any context passed to handle, record, or report will be merged with the context set here.

    +
    +

    Update the execution context that is accessible to error subscribers. Any context passed to handle, record, or report will be merged with the context set here.

    Rails.error.set_context(section: "checkout", user_id: @user.id)
     
    -
    - +
    @@ -584,22 +540,16 @@

    -

    - - subscribe(subscriber) - -

    +

    subscribe(subscriber)

    - -
    -

    Register a new error subscriber. The subscriber must respond to

    +
    +

    Register a new error subscriber. The subscriber must respond to

    report(Exception, handled: Boolean, severity: (:error OR :warning OR :info), context: Hash, source: String)
     

    The report method should never raise an error.

    -
    - +
    @@ -627,15 +577,10 @@

    -

    - - unexpected(error, severity: :warning, context: {}, source: DEFAULT_SOURCE) - -

    +

    unexpected(error, severity: :warning, context: {}, source: DEFAULT_SOURCE)

    - -
    -

    Either report the given error when in production, or raise it when in development or test.

    +
    +

    Either report the given error when in production, or raise it when in development or test.

    When called in production, after the error is reported, this method will return nil and execution will continue.

    @@ -655,8 +600,7 @@

    # ... end -

    - +
    @@ -688,15 +632,10 @@

    -

    - - unsubscribe(subscriber) - -

    +

    unsubscribe(subscriber)

    - -
    -

    Unregister an error subscriber. Accepts either a subscriber or a class.

    +
    +

    Unregister an error subscriber. Accepts either a subscriber or a class.

    subscriber = MyErrorSubscriber.new
     Rails.error.subscribe(subscriber)
    @@ -705,8 +644,7 @@ 

    # or Rails.error.unsubscribe(MyErrorSubscriber)

    -
    - +
    diff --git a/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html b/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html index 0775984ab0..97132cb442 100644 --- a/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html +++ b/src/classes/ActiveSupport/ErrorReporter/TestHelper/ErrorSubscriber.html @@ -81,17 +81,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -120,17 +112,9 @@

    Instance Public methods

    -

    - - report(error, handled:, severity:, source:, context:) - -

    +

    report(error, handled:, severity:, source:, context:)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/EventReporter.html b/src/classes/ActiveSupport/EventReporter.html index b290dc1d93..d068eabda3 100644 --- a/src/classes/ActiveSupport/EventReporter.html +++ b/src/classes/ActiveSupport/EventReporter.html @@ -334,17 +334,9 @@

    Attributes

    Class Public methods

    -

    - - new(*subscribers, raise_on_error: false) - -

    +

    new(*subscribers, raise_on_error: false)

    -
    - -
    - @@ -376,17 +368,11 @@

    Instance Public methods

    -

    - - clear_context() - -

    +

    clear_context()

    - -
    -

    Clears all context data.

    -
    - +
    +

    Clears all context data.

    +
    @@ -411,17 +397,11 @@

    -

    - - context() - -

    +

    context()

    - -
    -

    Returns the current context data.

    -
    - +
    +

    Returns the current context data.

    +
    @@ -446,15 +426,10 @@

    -

    - - debug(name_or_object, payload = nil, caller_depth: 1, **kwargs) - -

    +

    debug(name_or_object, payload = nil, caller_depth: 1, **kwargs)

    - -
    -

    Report an event only when in debug mode. For example:

    +
    +

    Report an event only when in debug mode. For example:

    Rails.event.debug("sql.query", { sql: "SELECT * FROM users" })
     
    @@ -467,8 +442,7 @@

    Arguments

  • :kwargs - Additional payload data when using string/symbol event names.

  • -
    - +
    @@ -499,17 +473,11 @@

    Arguments

    -

    - - debug_mode?() - -

    +

    debug_mode?()

    - -
    -

    Check if debug mode is currently enabled. Debug mode is enabled on the reporter via with_debug, and in local environments.

    -
    - +
    +

    Check if debug mode is currently enabled. Debug mode is enabled on the reporter via with_debug, and in local environments.

    +
    @@ -534,15 +502,10 @@

    -

    - - notify(name_or_object, payload = nil, caller_depth: 1, **kwargs) - -

    +

    notify(name_or_object, payload = nil, caller_depth: 1, **kwargs)

    - -
    -

    Reports an event to all registered subscribers. An event name and payload can be provided:

    +
    +

    Reports an event to all registered subscribers. An event name and payload can be provided:

    Rails.event.notify("user.created", { id: 123 })
     # Emits event:
    @@ -578,8 +541,7 @@ 

    Arguments

  • :kwargs - Additional payload data when using string/symbol event names.

  • -
    - +
    @@ -641,15 +603,10 @@

    Arguments

    -

    - - set_context(context) - -

    +

    set_context(context)

    - -
    -

    Sets context data that will be included with all events emitted by the reporter. Context data should be scoped to the job or request, and is reset automatically before and after each request and job.

    +
    +

    Sets context data that will be included with all events emitted by the reporter. Context data should be scoped to the job or request, and is reset automatically before and after each request and job.

    Rails.event.set_context(user_agent: "TestAgent")
     Rails.event.set_context(job_id: "abc123")
    @@ -667,8 +624,7 @@ 

    # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } # }

    -
    - +
    @@ -693,15 +649,10 @@

    -

    - - subscribe(subscriber, &filter) - -

    +

    subscribe(subscriber, &filter)

    - -
    -

    Registers a new event subscriber. The subscriber must respond to

    +
    +

    Registers a new event subscriber. The subscriber must respond to

    emit(event: Hash)
     
    @@ -721,8 +672,7 @@

    Rails.event.subscribe(subscriber) { |event| event[:name].start_with?("user.") }
     Rails.event.subscribe(subscriber) { |event| event[:payload].is_a?(UserEvent) }
     
    -

    - +
    @@ -750,15 +700,10 @@

    -

    - - tagged(*args, **kwargs, &block) - -

    +

    tagged(*args, **kwargs, &block)

    - -
    -

    Add tags to events to supply additional context. Tags operate in a stack-oriented manner, so all events emitted within the block inherit the same set of tags. For example:

    +
    +

    Add tags to events to supply additional context. Tags operate in a stack-oriented manner, so all events emitted within the block inherit the same set of tags. For example:

    Rails.event.tagged("graphql") do
       Rails.event.notify("user.created", { id: 123 })
    @@ -812,8 +757,7 @@ 

    # source_location: { filepath: "path/to/file.rb", lineno: 123, label: "UserService#create" } # }

    -
    - +
    @@ -838,15 +782,10 @@

    -

    - - unsubscribe(subscriber) - -

    +

    unsubscribe(subscriber)

    - -
    -

    Unregister an event subscriber. Accepts either a subscriber or a class.

    +
    +

    Unregister an event subscriber. Accepts either a subscriber or a class.

    subscriber = MyEventSubscriber.new
     Rails.event.subscribe(subscriber)
    @@ -855,8 +794,7 @@ 

    # or Rails.event.unsubscribe(MyEventSubscriber)

    -
    - +
    @@ -881,22 +819,16 @@

    -

    - - with_debug() - -

    +

    with_debug()

    - -
    -

    Temporarily enables debug mode for the duration of the block. Calls to debug will only be reported if debug mode is enabled.

    +
    +

    Temporarily enables debug mode for the duration of the block. Calls to debug will only be reported if debug mode is enabled.

    Rails.event.with_debug do
       Rails.event.debug("sql.query", { sql: "SELECT * FROM users" })
     end
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/ExecutionContext/Record.html b/src/classes/ActiveSupport/ExecutionContext/Record.html index 1aa37b4a5e..8383ad3aae 100644 --- a/src/classes/ActiveSupport/ExecutionContext/Record.html +++ b/src/classes/ActiveSupport/ExecutionContext/Record.html @@ -93,17 +93,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -134,17 +126,9 @@

    Instance Public methods

    -

    - - pop() - -

    +

    pop()

    -
    - -
    - @@ -171,17 +155,9 @@

    -

    - - push() - -

    +

    push()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/ExecutionWrapper.html b/src/classes/ActiveSupport/ExecutionWrapper.html index e0a7eb738c..2e162a246c 100644 --- a/src/classes/ActiveSupport/ExecutionWrapper.html +++ b/src/classes/ActiveSupport/ExecutionWrapper.html @@ -97,19 +97,13 @@

    Included Modules

    Class Public methods

    -

    - - register_hook(hook, outer: false) - -

    +

    register_hook(hook, outer: false)

    - -
    -

    Register an object to be invoked during both the run and complete steps.

    +
    +

    Register an object to be invoked during both the run and complete steps.

    hook.complete will be passed the value returned from hook.run, and will only be invoked if run has previously been called. (Mostly, this means it won’t be invoked if an exception occurs in a preceding to_run block; all ordinary to_complete blocks are invoked in that situation.)

    -
    - +
    @@ -140,21 +134,15 @@

    -

    - - run!(reset: false) - -

    +

    run!(reset: false)

    - -
    -

    Run this execution.

    +
    +

    Run this execution.

    Returns an instance, whose complete! method must be invoked after the work has been performed.

    Where possible, prefer wrap.

    -
    - +
    @@ -194,17 +182,9 @@

    -

    - - to_complete(*args, &block) - -

    +

    to_complete(*args, &block)

    -
    - -
    - @@ -229,17 +209,9 @@

    -

    - - to_run(*args, &block) - -

    +

    to_run(*args, &block)

    -
    - -
    - @@ -264,17 +236,11 @@

    -

    - - wrap(source: "application.active_support") - -

    +

    wrap(source: "application.active_support")

    - -
    -

    Perform the work in the supplied block as an execution.

    -
    - +
    +

    Perform the work in the supplied block as an execution.

    +
    @@ -313,19 +279,13 @@

    Instance Public methods

    -

    - - complete!() - -

    +

    complete!()

    - -
    -

    Complete this in-flight execution. This method must be called exactly once on the result of any call to run!.

    +
    +

    Complete this in-flight execution. This method must be called exactly once on the result of any call to run!.

    Where possible, prefer wrap.

    -
    - +
    diff --git a/src/classes/ActiveSupport/FileUpdateChecker.html b/src/classes/ActiveSupport/FileUpdateChecker.html index cb35e4461b..3a1a343cf4 100644 --- a/src/classes/ActiveSupport/FileUpdateChecker.html +++ b/src/classes/ActiveSupport/FileUpdateChecker.html @@ -105,19 +105,13 @@

    Methods

    Class Public methods

    -

    - - new(files, dirs = {}, &block) - -

    +

    new(files, dirs = {}, &block)

    - -
    -

    It accepts two parameters on initialization. The first is an array of files and the second is an optional hash of directories. The hash must have directories as keys and the value is an array of extensions to be watched under that directory.

    +
    +

    It accepts two parameters on initialization. The first is an array of files and the second is an optional hash of directories. The hash must have directories as keys and the value is an array of extensions to be watched under that directory.

    This method must also receive a block that will be called once a path changes. The array of files and list of directories cannot be changed after FileUpdateChecker has been initialized.

    -
    - +
    @@ -161,17 +155,11 @@

    Instance Public methods

    -

    - - execute() - -

    +

    execute()

    - -
    -

    Executes the given block and updates the latest watched files and timestamp.

    -
    - +
    +

    Executes the given block and updates the latest watched files and timestamp.

    +
    @@ -201,17 +189,11 @@

    -

    - - execute_if_updated() - -

    +

    execute_if_updated()

    - -
    -

    Execute the block given if updated.

    -
    - +
    +

    Execute the block given if updated.

    +
    @@ -242,17 +224,11 @@

    -

    - - updated?() - -

    +

    updated?()

    - -
    -

    Check if any of the entries were updated. If so, the watched and/or updated_at values are cached until the block is executed via execute or execute_if_updated.

    -
    - +
    +

    Check if any of the entries were updated. If so, the watched and/or updated_at values are cached until the block is executed via execute or execute_if_updated.

    +
    diff --git a/src/classes/ActiveSupport/ForkTracker/CoreExt.html b/src/classes/ActiveSupport/ForkTracker/CoreExt.html index 991fcae44f..df29d37cb6 100644 --- a/src/classes/ActiveSupport/ForkTracker/CoreExt.html +++ b/src/classes/ActiveSupport/ForkTracker/CoreExt.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - _fork() - -

    +

    _fork()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Gzip.html b/src/classes/ActiveSupport/Gzip.html index 893a888c15..eff798fbf9 100644 --- a/src/classes/ActiveSupport/Gzip.html +++ b/src/classes/ActiveSupport/Gzip.html @@ -89,17 +89,11 @@

    Methods

    Class Public methods

    -

    - - compress(source, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY) - -

    +

    compress(source, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)

    - -
    -

    Compresses a string using gzip.

    -
    - +
    +

    Compresses a string using gzip.

    +
    @@ -129,17 +123,11 @@

    -

    - - decompress(source) - -

    +

    decompress(source)

    - -
    -

    Decompresses a gzipped string.

    -
    - +
    +

    Decompresses a gzipped string.

    +
    diff --git a/src/classes/ActiveSupport/Gzip/Stream.html b/src/classes/ActiveSupport/Gzip/Stream.html index 60db6fd804..d7a286b5cc 100644 --- a/src/classes/ActiveSupport/Gzip/Stream.html +++ b/src/classes/ActiveSupport/Gzip/Stream.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(*) - -

    +

    new(*)

    -
    - -
    - @@ -107,17 +99,9 @@

    Instance Public methods

    -

    - - close() - -

    +

    close()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/HashWithIndifferentAccess.html b/src/classes/ActiveSupport/HashWithIndifferentAccess.html index ce60980197..e97649052a 100644 --- a/src/classes/ActiveSupport/HashWithIndifferentAccess.html +++ b/src/classes/ActiveSupport/HashWithIndifferentAccess.html @@ -295,17 +295,9 @@

    Methods

    Class Public methods

    -

    - - [](*args) - -

    +

    [](*args)

    -
    - -
    - @@ -330,17 +322,9 @@

    -

    - - new(constructor = nil) - -

    +

    new(constructor = nil)

    -
    - -
    - @@ -380,15 +364,10 @@

    Instance Public methods

    -

    - - [](key) - -

    +

    [](key)

    - -
    -

    Same as Hash#[] where the key passed as argument can be either a string or a symbol:

    +
    +

    Same as Hash#[] where the key passed as argument can be either a string or a symbol:

    counters = ActiveSupport::HashWithIndifferentAccess.new
     counters[:foo] = 1
    @@ -397,8 +376,7 @@ 

    counters[:foo] # => 1 counters[:zoo] # => nil

    -
    - +
    @@ -423,15 +401,10 @@

    -

    - - []=(key, value) - -

    +

    []=(key, value)

    - -
    -

    Assigns a new value to the hash:

    +
    +

    Assigns a new value to the hash:

    hash = ActiveSupport::HashWithIndifferentAccess.new
     hash[:key] = 'value'
    @@ -440,13 +413,14 @@ 

    This value can be later fetched using either :key or 'key'.

    If the value is a Hash or contains one or multiple Hashes, they will be converted to HashWithIndifferentAccess.

    -

    - +
    -
    - Also aliased as: regular_writer -
    +

    + Also aliased as: + + regular_writer. +

    @@ -470,15 +444,10 @@

    -

    - - assoc(key) - -

    +

    assoc(key)

    - -
    -

    Same as Hash#assoc where the key passed as argument can be either a string or a symbol:

    +
    +

    Same as Hash#assoc where the key passed as argument can be either a string or a symbol:

    counters = ActiveSupport::HashWithIndifferentAccess.new
     counters[:foo] = 1
    @@ -487,8 +456,7 @@ 

    counters.assoc(:foo) # => ["foo", 1] counters.assoc(:zoo) # => nil

    -
    - +
    @@ -513,17 +481,9 @@

    -

    - - compact() - -

    +

    compact()

    -
    - -
    - @@ -548,17 +508,9 @@

    -

    - - deep_symbolize_keys() - -

    +

    deep_symbolize_keys()

    -
    - -
    - @@ -581,15 +533,10 @@

    -

    - - default(key = (no_key = true)) - -

    +

    default(key = (no_key = true))

    - -
    -

    Same as Hash#default where the key passed as argument can be either a string or a symbol:

    +
    +

    Same as Hash#default where the key passed as argument can be either a string or a symbol:

    hash = ActiveSupport::HashWithIndifferentAccess.new(1)
     hash.default                   # => 1
    @@ -599,8 +546,7 @@ 

    hash.default('foo') # => 'foo' hash.default(:foo) # => 'foo'

    -
    - +
    @@ -629,17 +575,11 @@

    -

    - - delete(key) - -

    +

    delete(key)

    - -
    -

    Removes the specified key from the hash.

    -
    - +
    +

    Removes the specified key from the hash.

    +
    @@ -664,15 +604,10 @@

    -

    - - dig(*args) - -

    +

    dig(*args)

    - -
    -

    Same as Hash#dig where the key passed as argument can be either a string or a symbol:

    +
    +

    Same as Hash#dig where the key passed as argument can be either a string or a symbol:

    counters = ActiveSupport::HashWithIndifferentAccess.new
     counters[:foo] = { bar: 1 }
    @@ -681,8 +616,7 @@ 

    counters.dig(:foo, :bar) # => 1 counters.dig(:zoo) # => nil

    -
    - +
    @@ -708,15 +642,10 @@

    -

    - - dup() - -

    +

    dup()

    - -
    -

    Returns a shallow copy of the hash.

    +
    +

    Returns a shallow copy of the hash.

    hash = ActiveSupport::HashWithIndifferentAccess.new({ a: { b: 'b' } })
     dup  = hash.dup
    @@ -725,8 +654,7 @@ 

    hash[:a][:c] # => "c" dup[:a][:c] # => "c"

    -
    - +
    @@ -751,27 +679,23 @@

    -

    - - except(*keys) - -

    +

    except(*keys)

    - -
    -

    Returns a hash with indifferent access that includes everything except given keys.

    +
    +

    Returns a hash with indifferent access that includes everything except given keys.

    hash = { a: "x", b: "y", c: 10 }.with_indifferent_access
     hash.except(:a, "b") # => {c: 10}.with_indifferent_access
     hash                 # => { a: "x", b: "y", c: 10 }.with_indifferent_access
     
    -
    - +
    -
    - Also aliased as: without -
    +

    + Also aliased as: + + without. +

    @@ -795,17 +719,11 @@

    -

    - - extractable_options?() - -

    +

    extractable_options?()

    - -
    -

    Returns true so that Array#extract_options! finds members of this class.

    -
    - +
    +

    Returns true so that Array#extract_options! finds members of this class.

    +
    @@ -830,15 +748,10 @@

    -

    - - fetch(key, *extras) - -

    +

    fetch(key, *extras)

    - -
    -

    Same as Hash#fetch where the key passed as argument can be either a string or a symbol:

    +
    +

    Same as Hash#fetch where the key passed as argument can be either a string or a symbol:

    counters = ActiveSupport::HashWithIndifferentAccess.new
     counters[:foo] = 1
    @@ -848,8 +761,7 @@ 

    counters.fetch(:bar) { |key| 0 } # => 0 counters.fetch(:zoo) # => KeyError: key not found: "zoo"

    -
    - +
    @@ -874,15 +786,10 @@

    -

    - - fetch_values(*indices, &block) - -

    +

    fetch_values(*indices, &block)

    - -
    -

    Returns an array of the values at the specified indices, but also raises an exception when one of the keys can’t be found.

    +
    +

    Returns an array of the values at the specified indices, but also raises an exception when one of the keys can’t be found.

    hash = ActiveSupport::HashWithIndifferentAccess.new
     hash[:a] = 'x'
    @@ -891,8 +798,7 @@ 

    hash.fetch_values('a', 'c') { |key| 'z' } # => ["x", "z"] hash.fetch_values('a', 'c') # => KeyError: key not found: "c"

    -
    - +
    @@ -918,24 +824,17 @@

    -

    - - has_key?(key) - -

    +

    has_key?(key)

    -
    - -
    - -
    - Alias for: key? -
    +

    + Alias for: + key?. +

    @@ -943,24 +842,17 @@

    -

    - - include?(key) - -

    +

    include?(key)

    -
    - -
    - -
    - Alias for: key? -
    +

    + Alias for: + key?. +

    @@ -968,28 +860,24 @@

    -

    - - key?(key) - -

    +

    key?(key)

    - -
    -

    Checks the hash for a key matching the argument passed in:

    +
    +

    Checks the hash for a key matching the argument passed in:

    hash = ActiveSupport::HashWithIndifferentAccess.new
     hash['key'] = 'value'
     hash.key?(:key)  # => true
     hash.key?('key') # => true
     
    -
    - +
    -
    - Also aliased as: include?, has_key?, member? -
    +

    + Also aliased as: + + include?, has_key?, member?. +

    @@ -1013,24 +901,17 @@

    -

    - - member?(key) - -

    +

    member?(key)

    -
    - -
    - -
    - Alias for: key? -
    +

    + Alias for: + key?. +

    @@ -1038,17 +919,11 @@

    -

    - - merge(*hashes, &block) - -

    +

    merge(*hashes, &block)

    - -
    -

    This method has the same semantics of update, except it does not modify the receiver but rather returns a new hash with indifferent access with the result of the merge.

    -
    - +
    +

    This method has the same semantics of update, except it does not modify the receiver but rather returns a new hash with indifferent access with the result of the merge.

    +
    @@ -1073,24 +948,17 @@

    -

    - - merge!(*other_hashes, &block) - -

    +

    merge!(*other_hashes, &block)

    -
    - -
    - -
    - Alias for: update -
    +

    + Alias for: + update. +

    @@ -1098,17 +966,9 @@

    -

    - - nested_under_indifferent_access() - -

    +

    nested_under_indifferent_access()

    -
    - -
    - @@ -1133,24 +993,17 @@

    -

    - - regular_update(*other_hashes, &block) - -

    +

    regular_update(*other_hashes, &block)

    -
    - -
    - -
    - Alias for: update -
    +

    + Alias for: + update. +

    @@ -1158,24 +1011,17 @@

    -

    - - regular_writer(key, value) - -

    +

    regular_writer(key, value)

    -
    - -
    - -
    - Alias for: []= -
    +

    + Alias for: + []=. +

    @@ -1183,17 +1029,9 @@

    -

    - - reject(*args, &block) - -

    +

    reject(*args, &block)

    -
    - -
    - @@ -1219,21 +1057,15 @@

    -

    - - replace(other_hash) - -

    +

    replace(other_hash)

    - -
    -

    Replaces the contents of this hash with other_hash.

    +
    +

    Replaces the contents of this hash with other_hash.

    h = { "a" => 100, "b" => 200 }
     h.replace({ "c" => 300, "d" => 400 }) # => {"c"=>300, "d"=>400}
     
    -
    - +
    @@ -1258,27 +1090,23 @@

    -

    - - reverse_merge(other_hash) - -

    +

    reverse_merge(other_hash)

    - -
    -

    Like merge but the other way around: Merges the receiver into the argument and returns a new hash with indifferent access as result:

    +
    +

    Like merge but the other way around: Merges the receiver into the argument and returns a new hash with indifferent access as result:

    hash = ActiveSupport::HashWithIndifferentAccess.new
     hash['a'] = nil
     hash.reverse_merge(a: 0, b: 1) # => {"a"=>nil, "b"=>1}
     
    -
    - +
    -
    - Also aliased as: with_defaults -
    +

    + Also aliased as: + + with_defaults. +

    @@ -1302,22 +1130,18 @@

    -

    - - reverse_merge!(other_hash) - -

    +

    reverse_merge!(other_hash)

    - -
    -

    Same semantics as reverse_merge but modifies the receiver in-place.

    -
    - +
    +

    Same semantics as reverse_merge but modifies the receiver in-place.

    +
    -
    - Also aliased as: with_defaults! -
    +

    + Also aliased as: + + with_defaults!. +

    @@ -1341,17 +1165,9 @@

    -

    - - select(*args, &block) - -

    +

    select(*args, &block)

    -
    - -
    - @@ -1377,17 +1193,9 @@

    -

    - - slice(*keys) - -

    +

    slice(*keys)

    -
    - -
    - @@ -1413,17 +1221,9 @@

    -

    - - slice!(*keys) - -

    +

    slice!(*keys)

    -
    - -
    - @@ -1449,15 +1249,10 @@

    -

    - - store(key, value, convert_value: true) - -

    +

    store(key, value, convert_value: true)

    - -
    -

    Assigns a new value to the hash:

    +
    +

    Assigns a new value to the hash:

    hash = ActiveSupport::HashWithIndifferentAccess.new
     hash[:key] = 'value'
    @@ -1466,8 +1261,7 @@ 

    This value can be later fetched using either :key or 'key'.

    If the value is a Hash or contains one or multiple Hashes, they will be converted to HashWithIndifferentAccess. unless ‘convert_value: false` is set.

    -

    - +
    @@ -1493,22 +1287,16 @@

    -

    - - symbolize_keys() - -

    +

    symbolize_keys()

    -
    - -
    - -
    - Also aliased as: to_options -
    +

    + Also aliased as: + + to_options. +

    @@ -1530,17 +1318,11 @@

    -

    - - to_hash() - -

    +

    to_hash()

    - -
    -

    Convert to a regular hash with string keys.

    -
    - +
    +

    Convert to a regular hash with string keys.

    +
    @@ -1567,24 +1349,17 @@

    -

    - - to_options() - -

    +

    to_options()

    -
    - -
    - -
    - Alias for: symbolize_keys -
    +

    + Alias for: + symbolize_keys. +

    @@ -1592,17 +1367,9 @@

    -

    - - to_options!() - -

    +

    to_options!()

    -
    - -
    - @@ -1625,17 +1392,9 @@

    -

    - - to_proc() - -

    +

    to_proc()

    -
    - -
    - @@ -1660,17 +1419,9 @@

    -

    - - transform_keys(hash = NOT_GIVEN, &block) - -

    +

    transform_keys(hash = NOT_GIVEN, &block)

    -
    - -
    - @@ -1703,17 +1454,9 @@

    -

    - - transform_keys!(hash = NOT_GIVEN, &block) - -

    +

    transform_keys!(hash = NOT_GIVEN, &block)

    -
    - -
    - @@ -1748,17 +1491,9 @@

    -

    - - transform_values(&block) - -

    +

    transform_values(&block)

    -
    - -
    - @@ -1784,15 +1519,10 @@

    -

    - - update(*other_hashes, &block) - -

    +

    update(*other_hashes, &block)

    - -
    -

    Updates the receiver in-place, merging in the hashes passed as arguments:

    +
    +

    Updates the receiver in-place, merging in the hashes passed as arguments:

    hash_1 = ActiveSupport::HashWithIndifferentAccess.new
     hash_1[:key] = 'value'
    @@ -1816,13 +1546,14 @@ 

    hash_2['key'] = 12 hash_1.update(hash_2) { |key, old, new| old + new } # => {"key"=>22}

    -
    - +
    -
    - Also aliased as: regular_update, merge! -
    +

    + Also aliased as: + + regular_update, merge!. +

    @@ -1853,23 +1584,17 @@

    -

    - - values_at(*keys) - -

    +

    values_at(*keys)

    - -
    -

    Returns an array of the values at the specified indices:

    +
    +

    Returns an array of the values at the specified indices:

    hash = ActiveSupport::HashWithIndifferentAccess.new
     hash[:a] = 'x'
     hash[:b] = 'y'
     hash.values_at('a', 'b') # => ["x", "y"]
     
    -
    - +
    @@ -1895,24 +1620,17 @@

    -

    - - with_defaults(other_hash) - -

    +

    with_defaults(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge -
    +

    + Alias for: + reverse_merge. +

    @@ -1920,24 +1638,17 @@

    -

    - - with_defaults!(other_hash) - -

    +

    with_defaults!(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge! -
    +

    + Alias for: + reverse_merge!. +

    @@ -1945,17 +1656,9 @@

    -

    - - with_indifferent_access() - -

    +

    with_indifferent_access()

    -
    - -
    - @@ -1980,24 +1683,17 @@

    -

    - - without(*keys) - -

    +

    without(*keys)

    -
    - -
    - -
    - Alias for: except -
    +

    + Alias for: + except. +

    diff --git a/src/classes/ActiveSupport/Inflector.html b/src/classes/ActiveSupport/Inflector.html index 50e3e484e7..cfdf39b6c5 100644 --- a/src/classes/ActiveSupport/Inflector.html +++ b/src/classes/ActiveSupport/Inflector.html @@ -178,15 +178,10 @@

    Constants

    Instance Public methods

    -

    - - camelize(term, uppercase_first_letter = true) - -

    +

    camelize(term, uppercase_first_letter = true)

    - -
    -

    Converts strings to UpperCamelCase. If the uppercase_first_letter parameter is set to false, then produces lowerCamelCase.

    +
    +

    Converts strings to UpperCamelCase. If the uppercase_first_letter parameter is set to false, then produces lowerCamelCase.

    Also converts ‘/’ to ‘::’ which is useful for converting paths to namespaces.

    @@ -200,8 +195,7 @@

    camelize(underscore('SSLError'))        # => "SslError"
     
    -

    - +
    @@ -240,15 +234,10 @@

    -

    - - classify(table_name) - -

    +

    classify(table_name)

    - -
    -

    Creates a class name from a plural table name like Rails does for table names to models. Note that this returns a string and not a Class. (To convert to an actual class follow classify with constantize.)

    +
    +

    Creates a class name from a plural table name like Rails does for table names to models. Note that this returns a string and not a Class. (To convert to an actual class follow classify with constantize.)

    classify('ham_and_eggs') # => "HamAndEgg"
     classify('posts')        # => "Post"
    @@ -258,8 +247,7 @@ 

    classify('calculus')     # => "Calculu"
     
    -

    - +
    @@ -285,15 +273,10 @@

    -

    - - constantize(camel_cased_word) - -

    +

    constantize(camel_cased_word)

    - -
    -

    Tries to find a constant with the name specified in the argument string.

    +
    +

    Tries to find a constant with the name specified in the argument string.

    constantize('Module')   # => Module
     constantize('Foo::Bar') # => Foo::Bar
    @@ -310,8 +293,7 @@ 

    NameError is raised when the name is not in CamelCase or the constant is unknown.

    -
    - +
    @@ -336,20 +318,14 @@

    -

    - - dasherize(underscored_word) - -

    +

    dasherize(underscored_word)

    - -
    -

    Replaces underscores with dashes in the string.

    +
    +

    Replaces underscores with dashes in the string.

    dasherize('puni_puni') # => "puni-puni"
     
    -
    - +
    @@ -374,15 +350,10 @@

    -

    - - deconstantize(path) - -

    +

    deconstantize(path)

    - -
    -

    Removes the rightmost segment from the constant expression in the string.

    +
    +

    Removes the rightmost segment from the constant expression in the string.

    deconstantize('Net::HTTP')   # => "Net"
     deconstantize('::Net::HTTP') # => "::Net"
    @@ -392,8 +363,7 @@ 

    See also demodulize.

    -
    - +
    @@ -418,15 +388,10 @@

    -

    - - demodulize(path) - -

    +

    demodulize(path)

    - -
    -

    Removes the module part from the expression in the string.

    +
    +

    Removes the module part from the expression in the string.

    demodulize('ActiveSupport::Inflector::Inflections') # => "Inflections"
     demodulize('Inflections')                           # => "Inflections"
    @@ -435,8 +400,7 @@ 

    See also deconstantize.

    -
    - +
    @@ -466,22 +430,16 @@

    -

    - - downcase_first(string) - -

    +

    downcase_first(string)

    - -
    -

    Converts the first character in the string to lowercase.

    +
    +

    Converts the first character in the string to lowercase.

    downcase_first('If they enjoyed The Matrix') # => "if they enjoyed The Matrix"
     downcase_first('I')                          # => "i"
     downcase_first('')                           # => ""
     
    -
    - +
    @@ -506,22 +464,16 @@

    -

    - - foreign_key(class_name, separate_class_name_and_id_with_underscore = true) - -

    +

    foreign_key(class_name, separate_class_name_and_id_with_underscore = true)

    - -
    -

    Creates a foreign key name from a class name. separate_class_name_and_id_with_underscore sets whether the method should put ‘_’ between the name and ‘id’.

    +
    +

    Creates a foreign key name from a class name. separate_class_name_and_id_with_underscore sets whether the method should put ‘_’ between the name and ‘id’.

    foreign_key('Message')        # => "message_id"
     foreign_key('Message', false) # => "messageid"
     foreign_key('Admin::Post')    # => "post_id"
     
    -
    - +
    @@ -546,15 +498,10 @@

    -

    - - humanize(lower_case_and_underscored_word, capitalize: true, keep_id_suffix: false) - -

    +

    humanize(lower_case_and_underscored_word, capitalize: true, keep_id_suffix: false)

    - -
    -

    Tweaks an attribute name for display to end users.

    +
    +

    Tweaks an attribute name for display to end users.

    Specifically, performs these transformations:

    • @@ -586,8 +533,7 @@

      humanize('ssl_error') # => "SSL error"
       
      -

    - +
    @@ -634,22 +580,16 @@

    -

    - - inflections(locale = :en) - -

    +

    inflections(locale = :en)

    - -
    -

    Yields a singleton instance of Inflector::Inflections so you can specify additional inflector rules. If passed an optional locale, rules for other languages can be specified. If not specified, defaults to :en. Only rules for English are provided.

    +
    +

    Yields a singleton instance of Inflector::Inflections so you can specify additional inflector rules. If passed an optional locale, rules for other languages can be specified. If not specified, defaults to :en. Only rules for English are provided.

    ActiveSupport::Inflector.inflections(:en) do |inflect|
       inflect.uncountable 'rails'
     end
     
    -
    - +
    @@ -678,15 +618,10 @@

    -

    - - ordinal(number) - -

    +

    ordinal(number)

    - -
    -

    Returns the suffix that should be added to a number to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    +
    +

    Returns the suffix that should be added to a number to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    ordinal(1)     # => "st"
     ordinal(2)     # => "nd"
    @@ -695,8 +630,7 @@ 

    ordinal(-11) # => "th" ordinal(-1021) # => "st"

    -
    - +
    @@ -721,15 +655,10 @@

    -

    - - ordinalize(number) - -

    +

    ordinalize(number)

    - -
    -

    Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    +
    +

    Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    ordinalize(1)     # => "1st"
     ordinalize(2)     # => "2nd"
    @@ -738,8 +667,7 @@ 

    ordinalize(-11) # => "-11th" ordinalize(-1021) # => "-1021st"

    -
    - +
    @@ -764,15 +692,10 @@

    -

    - - parameterize(string, separator: "-", preserve_case: false, locale: nil) - -

    +

    parameterize(string, separator: "-", preserve_case: false, locale: nil)

    - -
    -

    Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.

    +
    +

    Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.

    parameterize("Donald E. Knuth") # => "donald-e-knuth"
     parameterize("^très|Jolie-- ")  # => "tres-jolie"
    @@ -798,8 +721,7 @@ 

    If the optional parameter locale is specified, the word will be parameterized as a word of that language. By default, this parameter is set to nil and it will use the configured I18n.locale.

    -
    - +
    @@ -844,15 +766,10 @@

    -

    - - pluralize(word, locale = :en) - -

    +

    pluralize(word, locale = :en)

    - -
    -

    Returns the plural form of the word in the string.

    +
    +

    Returns the plural form of the word in the string.

    If passed an optional locale parameter, the word will be pluralized using rules defined for that language. By default, this parameter is set to :en.

    @@ -863,8 +780,7 @@

    pluralize('CamelOctopus') # => "CamelOctopi" pluralize('ley', :es) # => "leyes" -

    - +
    @@ -889,15 +805,10 @@

    -

    - - safe_constantize(camel_cased_word) - -

    +

    safe_constantize(camel_cased_word)

    - -
    -

    Tries to find a constant with the name specified in the argument string.

    +
    +

    Tries to find a constant with the name specified in the argument string.

    safe_constantize('Module')   # => Module
     safe_constantize('Foo::Bar') # => Foo::Bar
    @@ -919,8 +830,7 @@ 

    safe_constantize('UnknownModule') # => nil safe_constantize('UnknownModule::Foo::Bar') # => nil

    -
    - +
    @@ -951,15 +861,10 @@

    -

    - - singularize(word, locale = :en) - -

    +

    singularize(word, locale = :en)

    - -
    -

    The reverse of pluralize, returns the singular form of a word in a string.

    +
    +

    The reverse of pluralize, returns the singular form of a word in a string.

    If passed an optional locale parameter, the word will be singularized using rules defined for that language. By default, this parameter is set to :en.

    @@ -970,8 +875,7 @@

    singularize('CamelOctopi') # => "CamelOctopus" singularize('leyes', :es) # => "ley" -

    - +
    @@ -996,22 +900,16 @@

    -

    - - tableize(class_name) - -

    +

    tableize(class_name)

    - -
    -

    Creates the name of a table like Rails does for models to table names. This method uses the pluralize method on the last word in the string.

    +
    +

    Creates the name of a table like Rails does for models to table names. This method uses the pluralize method on the last word in the string.

    tableize('RawScaledScorer') # => "raw_scaled_scorers"
     tableize('ham_and_egg')     # => "ham_and_eggs"
     tableize('fancyCategory')   # => "fancy_categories"
     
    -
    - +
    @@ -1036,15 +934,10 @@

    -

    - - titleize(word, keep_id_suffix: false) - -

    +

    titleize(word, keep_id_suffix: false)

    - -
    -

    Capitalizes all the words and replaces some characters in the string to create a nicer looking title. titleize is meant for creating pretty output. It is not used in the Rails internals.

    +
    +

    Capitalizes all the words and replaces some characters in the string to create a nicer looking title. titleize is meant for creating pretty output. It is not used in the Rails internals.

    The trailing ‘_id’,‘Id’.. can be kept and capitalized by setting the optional parameter keep_id_suffix to true. By default, this parameter is false.

    @@ -1054,8 +947,7 @@

    titleize('raiders_of_the_lost_ark') # => "Raiders Of The Lost Ark" titleize('string_ending_with_id', keep_id_suffix: true) # => "String Ending With Id" -

    - +
    @@ -1082,15 +974,10 @@

    -

    - - transliterate(string, replacement = "?", locale: nil) - -

    +

    transliterate(string, replacement = "?", locale: nil)

    - -
    -

    Replaces non-ASCII characters with an ASCII approximation, or if none exists, a replacement character which defaults to “?”.

    +
    +

    Replaces non-ASCII characters with an ASCII approximation, or if none exists, a replacement character which defaults to “?”.

    transliterate('Ærøskøbing')
     # => "AEroskobing"
    @@ -1139,8 +1026,7 @@ 

    Transliteration is restricted to UTF-8, US-ASCII, and GB18030 strings. Other encodings will raise an ArgumentError.

    -
    - +
    @@ -1194,15 +1080,10 @@

    -

    - - underscore(camel_cased_word) - -

    +

    underscore(camel_cased_word)

    - -
    -

    Makes an underscored, lowercase form from the expression in the string.

    +
    +

    Makes an underscored, lowercase form from the expression in the string.

    Changes ‘::’ to ‘/’ to convert namespaces to paths.

    @@ -1214,8 +1095,7 @@

    camelize(underscore('SSLError'))  # => "SslError"
     
    -

    - +
    @@ -1246,22 +1126,16 @@

    -

    - - upcase_first(string) - -

    +

    upcase_first(string)

    - -
    -

    Converts the first character in the string to uppercase.

    +
    +

    Converts the first character in the string to uppercase.

    upcase_first('what a Lovely Day') # => "What a Lovely Day"
     upcase_first('w')                 # => "W"
     upcase_first('')                  # => ""
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/Inflector/Inflections.html b/src/classes/ActiveSupport/Inflector/Inflections.html index 701370cf00..e243c5f7a5 100644 --- a/src/classes/ActiveSupport/Inflector/Inflections.html +++ b/src/classes/ActiveSupport/Inflector/Inflections.html @@ -165,17 +165,9 @@

    Attributes

    Class Public methods

    -

    - - instance(locale = :en) - -

    +

    instance(locale = :en)

    -
    - -
    - @@ -202,17 +194,9 @@

    -

    - - instance_or_fallback(locale) - -

    +

    instance_or_fallback(locale)

    -
    - -
    - @@ -242,17 +226,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -282,15 +258,10 @@

    Instance Public methods

    -

    - - acronym(word) - -

    +

    acronym(word)

    - -
    -

    Specifies a new acronym. An acronym must be specified as it will appear in a camelized string. An underscore string that contains the acronym will retain the acronym when passed to camelize, humanize, or titleize. A camelized string that contains the acronym will maintain the acronym when titleized or humanized, and will convert the acronym into a non-delimited single lowercase word when passed to underscore.

    +
    +

    Specifies a new acronym. An acronym must be specified as it will appear in a camelized string. An underscore string that contains the acronym will retain the acronym when passed to camelize, humanize, or titleize. A camelized string that contains the acronym will maintain the acronym when titleized or humanized, and will convert the acronym into a non-delimited single lowercase word when passed to underscore.

    acronym 'HTML'
     titleize 'html'     # => 'HTML'
    @@ -332,8 +303,7 @@ 

    underscore 'McDonald' # => 'mcdonald' camelize 'mcdonald' # => 'McDonald'

    -
    - +
    @@ -359,21 +329,15 @@

    -

    - - clear(scope = :all) - -

    +

    clear(scope = :all)

    - -
    -

    Clears the loaded inflections within a given scope (default is :all). Give the scope as a symbol of the inflection type, the options are: :plurals, :singulars, :uncountables, :humans, :acronyms.

    +
    +

    Clears the loaded inflections within a given scope (default is :all). Give the scope as a symbol of the inflection type, the options are: :plurals, :singulars, :uncountables, :humans, :acronyms.

    clear :all
     clear :plurals
     
    -
    - +
    @@ -412,21 +376,15 @@

    -

    - - human(rule, replacement) - -

    +

    human(rule, replacement)

    - -
    -

    Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: ‘The name’, not ‘the_name’).

    +
    +

    Specifies a humanized form of a string by a regular expression rule or by a string mapping. When using a regular expression based replacement, the normal humanize formatting is called after the replacement. When a string is used, the human form should be specified as desired (example: ‘The name’, not ‘the_name’).

    human /_cnt$/i, '\1_count'
     human 'legacy_col_person_name', 'Name'
     
    -
    - +
    @@ -451,21 +409,15 @@

    -

    - - irregular(singular, plural) - -

    +

    irregular(singular, plural)

    - -
    -

    Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form.

    +
    +

    Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used for strings, not regular expressions. You simply pass the irregular in singular and plural form.

    irregular 'cactus', 'cacti'
     irregular 'person', 'people'
     
    -
    - +
    @@ -515,17 +467,11 @@

    -

    - - plural(rule, replacement) - -

    +

    plural(rule, replacement)

    - -
    -

    Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.

    -
    - +
    +

    Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.

    +
    @@ -552,17 +498,11 @@

    -

    - - singular(rule, replacement) - -

    +

    singular(rule, replacement)

    - -
    -

    Specifies a new singularization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.

    -
    - +
    +

    Specifies a new singularization rule and its replacement. The rule can either be a string or a regular expression. The replacement should always be a string that may include references to the matched data from the rule.

    +
    @@ -589,22 +529,16 @@

    -

    - - uncountable(*words) - -

    +

    uncountable(*words)

    - -
    -

    Specifies words that are uncountable and should not be inflected.

    +
    +

    Specifies words that are uncountable and should not be inflected.

    uncountable 'money'
     uncountable 'money', 'information'
     uncountable %w( money information rice )
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/InheritableOptions.html b/src/classes/ActiveSupport/InheritableOptions.html index 36924b6910..7c0259e636 100644 --- a/src/classes/ActiveSupport/InheritableOptions.html +++ b/src/classes/ActiveSupport/InheritableOptions.html @@ -129,17 +129,9 @@

    Methods

    Class Public methods

    -

    - - new(parent = nil) - -

    +

    new(parent = nil)

    -
    - -
    - @@ -177,17 +169,9 @@

    Instance Public methods

    -

    - - ==(other) - -

    +

    ==(other)

    -
    - -
    - @@ -212,17 +196,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -248,17 +224,9 @@

    -

    - - inheritable_copy() - -

    +

    inheritable_copy()

    -
    - -
    - @@ -283,17 +251,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -318,22 +278,16 @@

    -

    - - key?(key) - -

    +

    key?(key)

    -
    - -
    - -
    - Also aliased as: own_key? -
    +

    + Also aliased as: + + own_key?. +

    @@ -357,17 +311,9 @@

    -

    - - overridden?(key) - -

    +

    overridden?(key)

    -
    - -
    - @@ -392,24 +338,17 @@

    -

    - - own_key?(key) - -

    +

    own_key?(key)

    -
    - -
    - -
    - Alias for: key? -
    +

    + Alias for: + key?. +

    @@ -417,17 +356,9 @@

    -

    - - pretty_print(pp) - -

    +

    pretty_print(pp)

    -
    - -
    - @@ -452,17 +383,9 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - @@ -487,17 +410,9 @@

    -

    - - to_h() - -

    +

    to_h()

    -
    - -
    - @@ -522,17 +437,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/JSON.html b/src/classes/ActiveSupport/JSON.html index 24900c4970..bab92a7a94 100644 --- a/src/classes/ActiveSupport/JSON.html +++ b/src/classes/ActiveSupport/JSON.html @@ -152,28 +152,24 @@

    Attributes

    Class Public methods

    -

    - - decode(json, options = {}) - -

    +

    decode(json, options = {})

    - -
    -

    Parses a JSON string (JavaScript Object Notation) into a Ruby object. See www.json.org for more info.

    +
    +

    Parses a JSON string (JavaScript Object Notation) into a Ruby object. See www.json.org for more info.

    ActiveSupport::JSON.decode("{\"team\":\"rails\",\"players\":\"36\"}")
     # => {"team" => "rails", "players" => "36"}
     ActiveSupport::JSON.decode("2.39")
     # => 2.39
     
    -
    - +
    -
    - Also aliased as: load -
    +

    + Also aliased as: + + load. +

    @@ -203,24 +199,17 @@

    -

    - - dump(value, options = nil) - -

    +

    dump(value, options = nil)

    -
    - -
    - -
    - Alias for: encode -
    +

    + Alias for: + encode. +

    @@ -228,15 +217,10 @@

    -

    - - encode(value, options = nil) - -

    +

    encode(value, options = nil)

    - -
    -

    Dumps objects in JSON (JavaScript Object Notation). See www.json.org for more info.

    +
    +

    Dumps objects in JSON (JavaScript Object Notation). See www.json.org for more info.

    ActiveSupport::JSON.encode({ team: 'rails', players: '36' })
     # => "{\"team\":\"rails\",\"players\":\"36\"}"
    @@ -265,13 +249,14 @@ 

    ActiveSupport::JSON.encode({ key: "\u2028<>&" }, escape: false)
     # => "{\"key\":\"\u2028<>&\"}"
     
    -

    - +
    -
    - Also aliased as: dump -
    +

    + Also aliased as: + + dump. +

    @@ -301,17 +286,9 @@

    -

    - - json_encoder=(encoder) - -

    +

    json_encoder=(encoder)

    -
    - -
    - @@ -338,24 +315,17 @@

    -

    - - load(json, options = {}) - -

    +

    load(json, options = {})

    -
    - -
    - -
    - Alias for: decode -
    +

    + Alias for: + decode. +

    @@ -363,15 +333,10 @@

    -

    - - parse_error() - -

    +

    parse_error()

    - -
    -

    Returns the class of the error that will be raised when there is an error in decoding JSON. Using this method means you won’t directly depend on the ActiveSupport’s JSON implementation, in case it changes in the future.

    +
    +

    Returns the class of the error that will be raised when there is an error in decoding JSON. Using this method means you won’t directly depend on the ActiveSupport’s JSON implementation, in case it changes in the future.

    begin
       obj = ActiveSupport::JSON.decode(some_string)
    @@ -379,8 +344,7 @@ 

    Rails.logger.warn("Attempted to decode invalid JSON: #{some_string}") end

    -
    - +
    diff --git a/src/classes/ActiveSupport/KeyGenerator.html b/src/classes/ActiveSupport/KeyGenerator.html index bc2e7b1c3d..4254af2ad6 100644 --- a/src/classes/ActiveSupport/KeyGenerator.html +++ b/src/classes/ActiveSupport/KeyGenerator.html @@ -83,17 +83,9 @@

    Methods

    Class Public methods

    -

    - - hash_digest_class() - -

    +

    hash_digest_class()

    -
    - -
    - @@ -118,17 +110,9 @@

    -

    - - hash_digest_class=(klass) - -

    +

    hash_digest_class=(klass)

    -
    - -
    - @@ -157,17 +141,9 @@

    -

    - - new(secret, options = {}) - -

    +

    new(secret, options = {})

    -
    - -
    - @@ -202,17 +178,11 @@

    Instance Public methods

    -

    - - generate_key(salt, key_size = 64) - -

    +

    generate_key(salt, key_size = 64)

    - -
    -

    Returns a derived key suitable for use. The default key_size is chosen to be compatible with the default settings of ActiveSupport::MessageVerifier. i.e. OpenSSL::Digest::SHA1#block_length

    -
    - +
    +

    Returns a derived key suitable for use. The default key_size is chosen to be compatible with the default settings of ActiveSupport::MessageVerifier. i.e. OpenSSL::Digest::SHA1#block_length

    +
    diff --git a/src/classes/ActiveSupport/LazyLoadHooks.html b/src/classes/ActiveSupport/LazyLoadHooks.html index 469546fdd2..f5c311df1e 100644 --- a/src/classes/ActiveSupport/LazyLoadHooks.html +++ b/src/classes/ActiveSupport/LazyLoadHooks.html @@ -98,15 +98,10 @@

    Methods

    Instance Public methods

    -

    - - on_load(name, options = {}, &block) - -

    +

    on_load(name, options = {}, &block)

    - -
    -

    Declares a block that will be executed when a Rails component is fully loaded. If the component has already loaded, the block is executed immediately.

    +
    +

    Declares a block that will be executed when a Rails component is fully loaded. If the component has already loaded, the block is executed immediately.

    Options

    • @@ -114,8 +109,7 @@

      Options

    • :run_once - Given block will run only once.

    -
    - +
    @@ -144,22 +138,16 @@

    Options

    -

    - - run_load_hooks(name, base = Object) - -

    +

    run_load_hooks(name, base = Object)

    - -
    -

    Executes all blocks registered to name via on_load, using base as the evaluation context.

    +
    +

    Executes all blocks registered to name via on_load, using base as the evaluation context.

    ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base)
     

    In the case of the above example, it will execute all hooks registered for :active_record within the class ActiveRecord::Base.

    -
    - +
    diff --git a/src/classes/ActiveSupport/LogSubscriber.html b/src/classes/ActiveSupport/LogSubscriber.html index 70ad52233f..041a5d2ddc 100644 --- a/src/classes/ActiveSupport/LogSubscriber.html +++ b/src/classes/ActiveSupport/LogSubscriber.html @@ -262,17 +262,11 @@

    Attributes

    Class Public methods

    -

    - - flush_all!() - -

    +

    flush_all!()

    - -
    -

    Flush all log_subscribers‘ logger.

    -
    - +
    +

    Flush all log_subscribers‘ logger.

    +
    @@ -297,17 +291,9 @@

    -

    - - log_subscribers() - -

    +

    log_subscribers()

    -
    - -
    - @@ -332,17 +318,9 @@

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -369,17 +347,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -409,17 +379,9 @@

    Instance Public methods

    -

    - - call(event) - -

    +

    call(event)

    -
    - -
    - @@ -446,17 +408,9 @@

    -

    - - logger() - -

    +

    logger()

    -
    - -
    - @@ -481,17 +435,9 @@

    -

    - - silenced?(event) - -

    +

    silenced?(event)

    -
    - -
    - @@ -519,17 +465,11 @@

    Instance Private methods

    -

    - - color(text, color, mode_options = {}) - -

    +

    color(text, color, mode_options = {})

    - -
    -

    Set color by using a symbol or one of the defined constants. Set modes by specifying bold, italic, or underline options. Inspired by Highline, this method will automatically clear formatting at the end of the returned String.

    -
    - +
    +

    Set color by using a symbol or one of the defined constants. Set modes by specifying bold, italic, or underline options. Inspired by Highline, this method will automatically clear formatting at the end of the returned String.

    +
    diff --git a/src/classes/ActiveSupport/LogSubscriber/TestHelper.html b/src/classes/ActiveSupport/LogSubscriber/TestHelper.html index 93e2591773..39f0674be0 100644 --- a/src/classes/ActiveSupport/LogSubscriber/TestHelper.html +++ b/src/classes/ActiveSupport/LogSubscriber/TestHelper.html @@ -102,22 +102,16 @@

    Methods

    Instance Public methods

    -

    - - set_logger(logger) - -

    +

    set_logger(logger)

    - -
    -

    Overwrite if you use another logger in your log subscriber.

    +
    +

    Overwrite if you use another logger in your log subscriber.

    def logger
       ActiveRecord::Base.logger = @logger
     end
     
    -
    - +
    @@ -142,17 +136,11 @@

    -

    - - wait() - -

    +

    wait()

    - -
    -

    Wait notifications to be published.

    -
    - +
    +

    Wait notifications to be published.

    +
    diff --git a/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html b/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html index a1017da120..813961094d 100644 --- a/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html +++ b/src/classes/ActiveSupport/LogSubscriber/TestHelper/MockLogger.html @@ -109,17 +109,9 @@

    Attributes

    Class Public methods

    -

    - - new(level = DEBUG) - -

    +

    new(level = DEBUG)

    -
    - -
    - @@ -150,17 +142,9 @@

    Instance Public methods

    -

    - - flush() - -

    +

    flush()

    -
    - -
    - @@ -185,17 +169,9 @@

    -

    - - logged(level) - -

    +

    logged(level)

    -
    - -
    - @@ -220,17 +196,9 @@

    -

    - - method_missing(level, message = nil) - -

    +

    method_missing(level, message = nil)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Logger.html b/src/classes/ActiveSupport/Logger.html index 311ce50dc3..b1420fa573 100644 --- a/src/classes/ActiveSupport/Logger.html +++ b/src/classes/ActiveSupport/Logger.html @@ -106,15 +106,10 @@

    Included Modules

    Class Public methods

    -

    - - logger_outputs_to?(logger, *sources) - -

    +

    logger_outputs_to?(logger, *sources)

    - -
    -

    Returns true if the logger destination matches one of the sources

    +
    +

    Returns true if the logger destination matches one of the sources

    logger = Logger.new(STDOUT)
     ActiveSupport::Logger.logger_outputs_to?(logger, STDOUT)
    @@ -124,8 +119,7 @@ 

    ActiveSupport::Logger.logger_outputs_to?(logger, '/var/log/rails.log') # => true

    -
    - +
    @@ -159,17 +153,9 @@

    -

    - - new(*args, **kwargs) - -

    +

    new(*args, **kwargs)

    -
    - -
    - @@ -195,17 +181,9 @@

    -

    - - normalize_sources(sources) - -

    +

    normalize_sources(sources)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Logger/SimpleFormatter.html b/src/classes/ActiveSupport/Logger/SimpleFormatter.html index bc8e1d83c4..2da7e9d33b 100644 --- a/src/classes/ActiveSupport/Logger/SimpleFormatter.html +++ b/src/classes/ActiveSupport/Logger/SimpleFormatter.html @@ -70,17 +70,11 @@

    Methods

    Instance Public methods

    -

    - - call(severity, timestamp, progname, msg) - -

    +

    call(severity, timestamp, progname, msg)

    - -
    -

    This method is invoked when a log event occurs

    -
    - +
    +

    This method is invoked when a log event occurs

    +
    diff --git a/src/classes/ActiveSupport/LoggerSilence.html b/src/classes/ActiveSupport/LoggerSilence.html index 6fe3e89996..b7c94a0d61 100644 --- a/src/classes/ActiveSupport/LoggerSilence.html +++ b/src/classes/ActiveSupport/LoggerSilence.html @@ -58,17 +58,11 @@

    Methods

    Instance Public methods

    -

    - - silence(severity = Logger::ERROR) - -

    +

    silence(severity = Logger::ERROR)

    - -
    -

    Silences the logger for the duration of the block.

    -
    - +
    +

    Silences the logger for the duration of the block.

    +
    diff --git a/src/classes/ActiveSupport/MessageEncryptor.html b/src/classes/ActiveSupport/MessageEncryptor.html index 6488194ce8..238e85707b 100644 --- a/src/classes/ActiveSupport/MessageEncryptor.html +++ b/src/classes/ActiveSupport/MessageEncryptor.html @@ -179,17 +179,11 @@

    Constants

    Class Public methods

    -

    - - key_len(cipher = default_cipher) - -

    +

    key_len(cipher = default_cipher)

    - -
    -

    Given a cipher, returns the key length of the cipher to help generate the key of desired size

    -
    - +
    +

    Given a cipher, returns the key length of the cipher to help generate the key of desired size

    +
    @@ -214,15 +208,10 @@

    -

    - - new(secret, sign_secret = nil, **options) - -

    +

    new(secret, sign_secret = nil, **options)

    - -
    -

    Initialize a new MessageEncryptor. secret must be at least as long as the cipher key size. For the default ‘aes-256-gcm’ cipher, this is 256 bits. If you are using a user-entered secret, you can generate a suitable key by using ActiveSupport::KeyGenerator or a similar key derivation function.

    +
    +

    Initialize a new MessageEncryptor. secret must be at least as long as the cipher key size. For the default ‘aes-256-gcm’ cipher, this is 256 bits. If you are using a user-entered secret, you can generate a suitable key by using ActiveSupport::KeyGenerator or a similar key derivation function.

    The first additional parameter is used as the signature key for MessageVerifier. This allows you to specify keys to encrypt and sign data. Ignored when using an AEAD cipher like ‘aes-256-gcm’.

    @@ -256,8 +245,7 @@

    Options

    If you don’t pass a truthy value, the default is set using config.active_support.use_message_serializer_for_metadata.

    -
    - +
    @@ -292,15 +280,10 @@

    Options

    Instance Public methods

    -

    - - decrypt_and_verify(message, **options) - -

    +

    decrypt_and_verify(message, **options)

    - -
    -

    Decrypt and verify a message. We need to verify the message in order to avoid padding attacks. Reference: www.limited-entropy.com/padding-oracle-attacks/.

    +
    +

    Decrypt and verify a message. We need to verify the message in order to avoid padding attacks. Reference: www.limited-entropy.com/padding-oracle-attacks/.

    Options

    :purpose
    @@ -316,8 +299,7 @@

    Options

    encryptor.decrypt_and_verify(message, purpose: "greeting") # => nil
    -
    - +
    @@ -348,15 +330,10 @@

    Options

    -

    - - encrypt_and_sign(value, **options) - -

    +

    encrypt_and_sign(value, **options)

    - -
    -

    Encrypt and sign a message. We need to sign the message in order to avoid padding attacks. Reference: www.limited-entropy.com/padding-oracle-attacks/.

    +
    +

    Encrypt and sign a message. We need to sign the message in order to avoid padding attacks. Reference: www.limited-entropy.com/padding-oracle-attacks/.

    Options

    :expires_at
    @@ -381,8 +358,7 @@

    Options

    The purpose of the message. If specified, the same purpose must be specified when verifying the message; otherwise, verification will fail. (See decrypt_and_verify.)

    -
    - +
    diff --git a/src/classes/ActiveSupport/MessageEncryptors.html b/src/classes/ActiveSupport/MessageEncryptors.html index 5e12508f49..5dd5473ed3 100644 --- a/src/classes/ActiveSupport/MessageEncryptors.html +++ b/src/classes/ActiveSupport/MessageEncryptors.html @@ -114,16 +114,11 @@

    Attributes

    Class Public methods

    -

    - - new(&secret_generator) - - -

    +

    new(&secret_generator) +

    - -
    -

    Initializes a new instance. secret_generator must accept a salt and a secret_length kwarg, and return a suitable secret (string) or secrets (array of strings). secret_generator may also accept other arbitrary kwargs. If rotate is called with any options matching those kwargs, those options will be passed to secret_generator instead of to the message encryptor.

    +
    +

    Initializes a new instance. secret_generator must accept a salt and a secret_length kwarg, and return a suitable secret (string) or secrets (array of strings). secret_generator may also accept other arbitrary kwargs. If rotate is called with any options matching those kwargs, those options will be passed to secret_generator instead of to the message encryptor.

    encryptors = ActiveSupport::MessageEncryptors.new do |salt, secret_length:, base:|
       MySecretGenerator.new(base).generate(salt, secret_length)
    @@ -131,8 +126,7 @@ 

    encryptors.rotate(base: "...")

    -
    - +
    @@ -149,18 +143,12 @@

    Instance Public methods

    -

    - - [](salt) - - -

    +

    [](salt) +

    - -
    -

    Returns a MessageEncryptor configured with a secret derived from the given salt, and options from rotate. MessageEncryptor instances will be memoized, so the same salt will return the same instance.

    -
    - +
    +

    Returns a MessageEncryptor configured with a secret derived from the given salt, and options from rotate. MessageEncryptor instances will be memoized, so the same salt will return the same instance.

    +
    @@ -173,18 +161,12 @@

    -

    - - []=(salt, encryptor) - - -

    +

    []=(salt, encryptor) +

    - -
    -

    Overrides a MessageEncryptor instance associated with a given salt.

    -
    - +
    +

    Overrides a MessageEncryptor instance associated with a given salt.

    +
    @@ -197,18 +179,12 @@

    -

    - - clear_rotations - - -

    +

    clear_rotations +

    - -
    -

    Clears the list of option sets.

    -
    - +
    +

    Clears the list of option sets.

    +
    @@ -221,20 +197,14 @@

    -

    - - on_rotation(&callback) - - -

    +

    on_rotation(&callback) +

    - -
    -

    Sets a callback to invoke when a message is decrypted using an option set other than the first.

    +
    +

    Sets a callback to invoke when a message is decrypted using an option set other than the first.

    For example, this callback could log each time it is called, and thus indicate whether old option sets are still in use or can be removed from rotation.

    -
    - +
    @@ -247,16 +217,12 @@

    -

    - - prepend(**options)
    prepend(&block) - - -

    +

    prepend(**options) +prepend(&block) +

    - -
    -

    Just like rotate, but prepends the given options or block to the list of option sets.

    +
    +

    Just like rotate, but prepends the given options or block to the list of option sets.

    This can be useful when you have an already-configured MessageEncryptors instance, but you want to override the way messages are encrypted.

    @@ -273,8 +239,7 @@

    # `serializer: Marshal, url_safe: false`. ThirdParty.ENCRYPTORS[:foo] -

    - +
    @@ -287,16 +252,12 @@

    -

    - - rotate(**options)
    rotate(&block) - - -

    +

    rotate(**options) +rotate(&block) +

    - -
    -

    Adds options to the list of option sets. Messages will be encrypted using the first set in the list. When decrypting, however, each set will be tried, in order, until one succeeds.

    +
    +

    Adds options to the list of option sets. Messages will be encrypted using the first set in the list. When decrypting, however, each set will be tried, in order, until one succeeds.

    Notably, the :secret_generator option can specify a different secret generator than the one initially specified. The secret generator must respond to call, accept a salt and a secret_length kwarg, and return a suitable secret (string) or secrets (array of strings). The secret generator may also accept other arbitrary kwargs.

    @@ -328,8 +289,7 @@

    # Uses `serializer: Marshal, url_safe: false`. encryptors[:baz] -

    - +
    @@ -342,18 +302,12 @@

    -

    - - rotate_defaults - - -

    +

    rotate_defaults +

    - -
    -

    Invokes rotate with the default options.

    -
    - +
    +

    Invokes rotate with the default options.

    +
    diff --git a/src/classes/ActiveSupport/MessagePack.html b/src/classes/ActiveSupport/MessagePack.html index 5f643c4dba..ef33f23d08 100644 --- a/src/classes/ActiveSupport/MessagePack.html +++ b/src/classes/ActiveSupport/MessagePack.html @@ -91,18 +91,12 @@

    Methods

    Class Public methods

    -

    - - dump(object) - - -

    +

    dump(object) +

    - -
    -

    Dumps an object. Raises ActiveSupport::MessagePack::UnserializableObjectError if the object type is not supported.

    -
    - +
    +

    Dumps an object. Raises ActiveSupport::MessagePack::UnserializableObjectError if the object type is not supported.

    +
    @@ -115,18 +109,12 @@

    -

    - - load(dumped) - - -

    +

    load(dumped) +

    - -
    -

    Loads an object dump created by ::dump.

    -
    - +
    +

    Loads an object dump created by ::dump.

    +
    @@ -139,18 +127,12 @@

    -

    - - signature?(dumped) +

    signature?(dumped) +

    - - - - -
    -

    Returns true if the given dump begins with an ActiveSupport::MessagePack signature.

    -
    - +
    +

    Returns true if the given dump begins with an ActiveSupport::MessagePack signature.

    +
    diff --git a/src/classes/ActiveSupport/MessagePack/CacheSerializer.html b/src/classes/ActiveSupport/MessagePack/CacheSerializer.html index f44e496151..054ea4f400 100644 --- a/src/classes/ActiveSupport/MessagePack/CacheSerializer.html +++ b/src/classes/ActiveSupport/MessagePack/CacheSerializer.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - load(dumped) - -

    +

    load(dumped)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/MessageVerifier.html b/src/classes/ActiveSupport/MessageVerifier.html index b2ea3cc2db..7ded7e1d4a 100644 --- a/src/classes/ActiveSupport/MessageVerifier.html +++ b/src/classes/ActiveSupport/MessageVerifier.html @@ -190,15 +190,10 @@

    Methods

    Class Public methods

    -

    - - new(secret, **options) - -

    +

    new(secret, **options)

    - -
    -

    Initialize a new MessageVerifier with a secret for the signature.

    +
    +

    Initialize a new MessageVerifier with a secret for the signature.

    Options

    :digest
    @@ -224,8 +219,7 @@

    Options

    If you don’t pass a truthy value, the default is set using config.active_support.use_message_serializer_for_metadata.

    -
    - +
    @@ -257,15 +251,10 @@

    Options

    Instance Public methods

    -

    - - generate(value, **options) - -

    +

    generate(value, **options)

    - -
    -

    Generates a signed message for the provided value.

    +
    +

    Generates a signed message for the provided value.

    The message is signed with the MessageVerifier‘s secret. Returns Base64-encoded message joined with the generated signature.

    @@ -298,8 +287,7 @@

    Options

    The purpose of the message. If specified, the same purpose must be specified when verifying the message; otherwise, verification will fail. (See verified and verify.)

    -
    - +
    @@ -324,15 +312,10 @@

    Options

    -

    - - valid_message?(message) - -

    +

    valid_message?(message)

    - -
    -

    Checks if a signed message could have been generated by signing an object with the MessageVerifier‘s secret.

    +
    +

    Checks if a signed message could have been generated by signing an object with the MessageVerifier‘s secret.

    verifier = ActiveSupport::MessageVerifier.new("secret")
     signed_message = verifier.generate("signed message")
    @@ -341,8 +324,7 @@ 

    tampered_message = signed_message.chop # editing the message invalidates the signature verifier.valid_message?(tampered_message) # => false

    -
    - +
    @@ -367,15 +349,10 @@

    -

    - - verified(message, **options) - -

    +

    verified(message, **options)

    - -
    -

    Decodes the signed message using the MessageVerifier‘s secret.

    +
    +

    Decodes the signed message using the MessageVerifier‘s secret.

    verifier = ActiveSupport::MessageVerifier.new("secret")
     
    @@ -416,8 +393,7 @@ 

    Options

    verifier.verified(message, purpose: "greeting") # => nil
    -
    - +
    @@ -448,15 +424,10 @@

    Options

    -

    - - verify(message, **options) - -

    +

    verify(message, **options)

    - -
    -

    Decodes the signed message using the MessageVerifier‘s secret.

    +
    +

    Decodes the signed message using the MessageVerifier‘s secret.

    verifier = ActiveSupport::MessageVerifier.new("secret")
     signed_message = verifier.generate("signed message")
    @@ -485,8 +456,7 @@ 

    Options

    verifier.verify(message, purpose: "greeting") # => raises InvalidSignature
    -
    - +
    diff --git a/src/classes/ActiveSupport/MessageVerifiers.html b/src/classes/ActiveSupport/MessageVerifiers.html index 10f8909c63..29c58a5a59 100644 --- a/src/classes/ActiveSupport/MessageVerifiers.html +++ b/src/classes/ActiveSupport/MessageVerifiers.html @@ -114,16 +114,11 @@

    Attributes

    Class Public methods

    -

    - - new(&secret_generator) - - -

    +

    new(&secret_generator) +

    - -
    -

    Initializes a new instance. secret_generator must accept a salt, and return a suitable secret (string). secret_generator may also accept arbitrary kwargs. If rotate is called with any options matching those kwargs, those options will be passed to secret_generator instead of to the message verifier.

    +
    +

    Initializes a new instance. secret_generator must accept a salt, and return a suitable secret (string). secret_generator may also accept arbitrary kwargs. If rotate is called with any options matching those kwargs, those options will be passed to secret_generator instead of to the message verifier.

    verifiers = ActiveSupport::MessageVerifiers.new do |salt, base:|
       MySecretGenerator.new(base).generate(salt)
    @@ -131,8 +126,7 @@ 

    verifiers.rotate(base: "...")

    -
    - +
    @@ -149,18 +143,12 @@

    Instance Public methods

    -

    - - [](salt) - - -

    +

    [](salt) +

    - -
    -

    Returns a MessageVerifier configured with a secret derived from the given salt, and options from rotate. MessageVerifier instances will be memoized, so the same salt will return the same instance.

    -
    - +
    +

    Returns a MessageVerifier configured with a secret derived from the given salt, and options from rotate. MessageVerifier instances will be memoized, so the same salt will return the same instance.

    +
    @@ -173,18 +161,12 @@

    -

    - - []=(salt, verifier) - - -

    +

    []=(salt, verifier) +

    - -
    -

    Overrides a MessageVerifier instance associated with a given salt.

    -
    - +
    +

    Overrides a MessageVerifier instance associated with a given salt.

    +
    @@ -197,18 +179,12 @@

    -

    - - clear_rotations - - -

    +

    clear_rotations +

    - -
    -

    Clears the list of option sets.

    -
    - +
    +

    Clears the list of option sets.

    +
    @@ -221,20 +197,14 @@

    -

    - - on_rotation(&callback) - - -

    +

    on_rotation(&callback) +

    - -
    -

    Sets a callback to invoke when a message is verified using an option set other than the first.

    +
    +

    Sets a callback to invoke when a message is verified using an option set other than the first.

    For example, this callback could log each time it is called, and thus indicate whether old option sets are still in use or can be removed from rotation.

    -
    - +
    @@ -247,16 +217,12 @@

    -

    - - prepend(**options)
    prepend(&block) - - -

    +

    prepend(**options) +prepend(&block) +

    - -
    -

    Just like rotate, but prepends the given options or block to the list of option sets.

    +
    +

    Just like rotate, but prepends the given options or block to the list of option sets.

    This can be useful when you have an already-configured MessageVerifiers instance, but you want to override the way messages are signed.

    @@ -273,8 +239,7 @@

    # `serializer: Marshal, url_safe: false`. ThirdParty.VERIFIERS[:foo] -

    - +
    @@ -287,16 +252,12 @@

    -

    - - rotate(**options)
    rotate(&block) - - -

    +

    rotate(**options) +rotate(&block) +

    - -
    -

    Adds options to the list of option sets. Messages will be signed using the first set in the list. When verifying, however, each set will be tried, in order, until one succeeds.

    +
    +

    Adds options to the list of option sets. Messages will be signed using the first set in the list. When verifying, however, each set will be tried, in order, until one succeeds.

    Notably, the :secret_generator option can specify a different secret generator than the one initially specified. The secret generator must respond to call, accept a salt, and return a suitable secret (string). The secret generator may also accept arbitrary kwargs.

    @@ -328,8 +289,7 @@

    # Uses `serializer: Marshal, url_safe: false`. verifiers[:baz] -

    - +
    @@ -342,18 +302,12 @@

    -

    - - rotate_defaults - - -

    +

    rotate_defaults +

    - -
    -

    Invokes rotate with the default options.

    -
    - +
    +

    Invokes rotate with the default options.

    +
    diff --git a/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html b/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html index 572f4fb37f..0e65bb3cef 100644 --- a/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html +++ b/src/classes/ActiveSupport/Messages/SerializerWithFallback/JsonWithFallback.html @@ -97,17 +97,9 @@

    Constants

    Instance Public methods

    -

    - - _load(dumped) - -

    +

    _load(dumped)

    -
    - -
    - @@ -132,17 +124,9 @@

    -

    - - dump(object) - -

    +

    dump(object)

    -
    - -
    - @@ -167,17 +151,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - @@ -202,17 +178,9 @@

    -

    - - format() - -

    +

    format()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html index c5b37ddf2a..a9bb1480b4 100644 --- a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html +++ b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MarshalWithFallback.html @@ -97,17 +97,9 @@

    Constants

    Instance Public methods

    -

    - - _load(dumped) - -

    +

    _load(dumped)

    -
    - -
    - @@ -132,17 +124,9 @@

    -

    - - dump(object) - -

    +

    dump(object)

    -
    - -
    - @@ -167,17 +151,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - @@ -202,17 +178,9 @@

    -

    - - format() - -

    +

    format()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html index 1ba74e76b8..1b6678b7be 100644 --- a/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html +++ b/src/classes/ActiveSupport/Messages/SerializerWithFallback/MessagePackWithFallback.html @@ -84,17 +84,9 @@

    Included Modules

    Instance Public methods

    -

    - - _load(dumped) - -

    +

    _load(dumped)

    -
    - -
    - @@ -119,17 +111,9 @@

    -

    - - dump(object) - -

    +

    dump(object)

    -
    - -
    - @@ -154,17 +138,9 @@

    -

    - - dumped?(dumped) - -

    +

    dumped?(dumped)

    -
    - -
    - @@ -189,17 +165,9 @@

    -

    - - format() - -

    +

    format()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Multibyte.html b/src/classes/ActiveSupport/Multibyte.html index 28ceb9b0d5..137bfa6333 100644 --- a/src/classes/ActiveSupport/Multibyte.html +++ b/src/classes/ActiveSupport/Multibyte.html @@ -85,17 +85,11 @@

    Methods

    Class Public methods

    -

    - - proxy_class() - -

    +

    proxy_class()

    - -
    -

    Returns the current proxy class.

    -
    - +
    +

    Returns the current proxy class.

    +
    @@ -120,20 +114,14 @@

    -

    - - proxy_class=(klass) - -

    +

    proxy_class=(klass)

    - -
    -

    The proxy class returned when calling mb_chars. You can use this accessor to configure your own proxy class so you can support other encodings. See the ActiveSupport::Multibyte::Chars implementation for an example how to do this.

    +
    +

    The proxy class returned when calling mb_chars. You can use this accessor to configure your own proxy class so you can support other encodings. See the ActiveSupport::Multibyte::Chars implementation for an example how to do this.

    ActiveSupport::Multibyte.proxy_class = CharsForUTF32
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/Multibyte/Chars.html b/src/classes/ActiveSupport/Multibyte/Chars.html index 3b50805578..7e69917ba4 100644 --- a/src/classes/ActiveSupport/Multibyte/Chars.html +++ b/src/classes/ActiveSupport/Multibyte/Chars.html @@ -187,17 +187,11 @@

    Attributes

    Class Public methods

    -

    - - new(string, deprecation: true) - -

    +

    new(string, deprecation: true)

    - -
    -

    Creates a new Chars instance by wrapping string.

    -
    - +
    +

    Creates a new Chars instance by wrapping string.

    +
    @@ -237,21 +231,15 @@

    Instance Public methods

    -

    - - compose() - -

    +

    compose()

    - -
    -

    Performs composition on all the characters.

    +
    +

    Performs composition on all the characters.

    'é'.length                       # => 1
     'é'.mb_chars.compose.to_s.length # => 1
     
    -
    - +
    @@ -276,21 +264,15 @@

    -

    - - decompose() - -

    +

    decompose()

    - -
    -

    Performs canonical decomposition on all the characters.

    +
    +

    Performs canonical decomposition on all the characters.

    'é'.length                         # => 1
     'é'.mb_chars.decompose.to_s.length # => 2
     
    -
    - +
    @@ -315,21 +297,15 @@

    -

    - - grapheme_length() - -

    +

    grapheme_length()

    - -
    -

    Returns the number of grapheme clusters in the string.

    +
    +

    Returns the number of grapheme clusters in the string.

    'क्षि'.mb_chars.length   # => 4
     'क्षि'.mb_chars.grapheme_length # => 2
     
    -
    - +
    @@ -354,20 +330,14 @@

    -

    - - limit(limit) - -

    +

    limit(limit)

    - -
    -

    Limits the byte size of the string to a number of bytes without breaking characters. Usable when the storage for a string is limited for some reason.

    +
    +

    Limits the byte size of the string to a number of bytes without breaking characters. Usable when the storage for a string is limited for some reason.

    'こんにちは'.mb_chars.limit(7).to_s # => "こん"
     
    -
    - +
    @@ -392,17 +362,11 @@

    -

    - - method_missing(method, ...) - -

    +

    method_missing(method, ...)

    - -
    -

    Forward all undefined methods to the wrapped string.

    -
    - +
    +

    Forward all undefined methods to the wrapped string.

    +
    @@ -432,17 +396,11 @@

    -

    - - respond_to_missing?(method, include_private) - -

    +

    respond_to_missing?(method, include_private)

    - -
    -

    Returns true if obj responds to the given method. Private methods are included in the search only if the optional second parameter evaluates to true.

    -
    - +
    +

    Returns true if obj responds to the given method. Private methods are included in the search only if the optional second parameter evaluates to true.

    +
    @@ -467,20 +425,14 @@

    -

    - - reverse() - -

    +

    reverse()

    - -
    -

    Reverses all characters in the string.

    +
    +

    Reverses all characters in the string.

    'Café'.mb_chars.reverse.to_s # => 'éfaC'
     
    -
    - +
    @@ -505,15 +457,10 @@

    -

    - - slice!(*args) - -

    +

    slice!(*args)

    - -
    -

    Works like String#slice!, but returns an instance of Chars, or nil if the string was not modified. The string will not be modified if the range given is out of bounds

    +
    +

    Works like String#slice!, but returns an instance of Chars, or nil if the string was not modified. The string will not be modified if the range given is out of bounds

    string = 'Welcome'
     string.mb_chars.slice!(3)    # => #<ActiveSupport::Multibyte::Chars:0x000000038109b8 @wrapped_string="c">
    @@ -521,8 +468,7 @@ 

    string.mb_chars.slice!(0..3) # => #<ActiveSupport::Multibyte::Chars:0x00000002eb80a0 @wrapped_string="Welo"> string # => 'me'

    -
    - +
    @@ -550,20 +496,14 @@

    -

    - - split(*args) - -

    +

    split(*args)

    - -
    -

    Works just like String#split, with the exception that the items in the resulting list are Chars instances instead of String. This makes chaining methods easier.

    +
    +

    Works just like String#split, with the exception that the items in the resulting list are Chars instances instead of String. This makes chaining methods easier.

    'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } # => ["CAF", " P", "RIFERÔL"]
     
    -
    - +
    @@ -588,19 +528,13 @@

    -

    - - tidy_bytes(force = false) - -

    +

    tidy_bytes(force = false)

    - -
    -

    Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.

    +
    +

    Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.

    Passing true will forcibly tidy all bytes, assuming that the string’s encoding is entirely CP1252 or ISO-8859-1.

    -
    - +
    @@ -625,24 +559,17 @@

    -

    - - titlecase() - -

    +

    titlecase()

    -
    - -
    - -
    - Alias for: titleize -
    +

    + Alias for: + titleize. +

    @@ -650,26 +577,22 @@

    -

    - - titleize() - -

    +

    titleize()

    - -
    -

    Capitalizes the first letter of every word, when possible.

    +
    +

    Capitalizes the first letter of every word, when possible.

    "ÉL QUE SE ENTERÓ".mb_chars.titleize.to_s    # => "Él Que Se Enteró"
     "日本語".mb_chars.titleize.to_s               # => "日本語"
     
    -
    - +
    -
    - Also aliased as: titlecase -
    +

    + Also aliased as: + + titlecase. +

    diff --git a/src/classes/ActiveSupport/Multibyte/Unicode.html b/src/classes/ActiveSupport/Multibyte/Unicode.html index e88a02b2a8..7a4a5d0b8c 100644 --- a/src/classes/ActiveSupport/Multibyte/Unicode.html +++ b/src/classes/ActiveSupport/Multibyte/Unicode.html @@ -84,17 +84,11 @@

    Constants

    Instance Public methods

    -

    - - compose(codepoints) - -

    +

    compose(codepoints)

    - -
    -

    Compose decomposed characters to the composed form.

    -
    - +
    +

    Compose decomposed characters to the composed form.

    +
    @@ -119,17 +113,11 @@

    -

    - - decompose(type, codepoints) - -

    +

    decompose(type, codepoints)

    - -
    -

    Decompose composed characters to the decomposed form.

    -
    - +
    +

    Decompose composed characters to the decomposed form.

    +
    @@ -158,19 +146,13 @@

    -

    - - tidy_bytes(string, force = false) - -

    +

    tidy_bytes(string, force = false)

    - -
    -

    Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.

    +
    +

    Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string.

    Passing true will forcibly tidy all bytes, assuming that the string’s encoding is entirely CP1252 or ISO-8859-1.

    -
    - +
    diff --git a/src/classes/ActiveSupport/Notifications.html b/src/classes/ActiveSupport/Notifications.html index 10fe352623..6bcfb85b95 100644 --- a/src/classes/ActiveSupport/Notifications.html +++ b/src/classes/ActiveSupport/Notifications.html @@ -297,17 +297,9 @@

    Attributes

    Class Public methods

    -

    - - instrument(name, payload = {}) - -

    +

    instrument(name, payload = {})

    -
    - -
    - @@ -336,17 +328,9 @@

    -

    - - instrumenter() - -

    +

    instrumenter()

    -
    - -
    - @@ -371,17 +355,11 @@

    -

    - - monotonic_subscribe(pattern = nil, callback = nil, &block) - -

    +

    monotonic_subscribe(pattern = nil, callback = nil, &block)

    - -
    -

    Performs the same functionality as subscribe, but the start and finish block arguments are in monotonic time instead of wall-clock time. Monotonic time will not jump forward or backward (due to NTP or Daylights Savings). Use monotonic_subscribe when accuracy of time duration is important. For example, computing elapsed time between two events.

    -
    - +
    +

    Performs the same functionality as subscribe, but the start and finish block arguments are in monotonic time instead of wall-clock time. Monotonic time will not jump forward or backward (due to NTP or Daylights Savings). Use monotonic_subscribe when accuracy of time duration is important. For example, computing elapsed time between two events.

    +
    @@ -406,17 +384,9 @@

    -

    - - publish(name, *args) - -

    +

    publish(name, *args)

    -
    - -
    - @@ -441,15 +411,10 @@

    -

    - - subscribe(pattern = nil, callback = nil, &block) - -

    +

    subscribe(pattern = nil, callback = nil, &block)

    - -
    -

    Subscribe to a given event name with the passed block.

    +
    +

    Subscribe to a given event name with the passed block.

    You can subscribe to events by passing a String to match exact event names, or by passing a Regexp to match all events that match a pattern.

    @@ -476,8 +441,7 @@

    ActiveSupport::Notifications.subscribe(:render) {|event| ...}
     #=> ArgumentError (pattern must be specified as a String, Regexp or empty)
     
    -

    - +
    @@ -502,17 +466,9 @@

    -

    - - subscribed(callback, pattern = nil, monotonic: false, &block) - -

    +

    subscribed(callback, pattern = nil, monotonic: false, &block)

    -
    - -
    - @@ -540,17 +496,9 @@

    -

    - - unsubscribe(subscriber_or_name) - -

    +

    unsubscribe(subscriber_or_name)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Notifications/Event.html b/src/classes/ActiveSupport/Notifications/Event.html index a9c43f1585..e0a26d69ab 100644 --- a/src/classes/ActiveSupport/Notifications/Event.html +++ b/src/classes/ActiveSupport/Notifications/Event.html @@ -129,17 +129,9 @@

    Attributes

    Class Public methods

    -

    - - new(name, start, ending, transaction_id, payload) - -

    +

    new(name, start, ending, transaction_id, payload)

    -
    - -
    - @@ -178,17 +170,11 @@

    Instance Public methods

    -

    - - allocations() - -

    +

    allocations()

    - -
    -

    Returns the number of allocations made between the call to start! and the call to finish!.

    -
    - +
    +

    Returns the number of allocations made between the call to start! and the call to finish!.

    +
    @@ -213,17 +199,11 @@

    -

    - - cpu_time() - -

    +

    cpu_time()

    - -
    -

    Returns the CPU time (in milliseconds) passed between the call to start! and the call to finish!.

    -
    - +
    +

    Returns the CPU time (in milliseconds) passed between the call to start! and the call to finish!.

    +
    @@ -248,15 +228,10 @@

    -

    - - duration() - -

    +

    duration()

    - -
    -

    Returns the difference in milliseconds between when the execution of the event started and when it ended.

    +
    +

    Returns the difference in milliseconds between when the execution of the event started and when it ended.

    ActiveSupport::Notifications.subscribe('wait') do |event|
       @event = event
    @@ -268,8 +243,7 @@ 

    @event.duration # => 1000.138

    -
    - +
    @@ -294,17 +268,9 @@

    -

    - - end() - -

    +

    end()

    -
    - -
    - @@ -329,17 +295,11 @@

    -

    - - finish!() - -

    +

    finish!()

    - -
    -

    Record information at the time this event finishes

    -
    - +
    +

    Record information at the time this event finishes

    +
    @@ -367,17 +327,11 @@

    -

    - - gc_time() - -

    +

    gc_time()

    - -
    -

    Returns the time spent in GC (in milliseconds) between the call to start! and the call to finish!

    -
    - +
    +

    Returns the time spent in GC (in milliseconds) between the call to start! and the call to finish!

    +
    @@ -402,17 +356,11 @@

    -

    - - idle_time() - -

    +

    idle_time()

    - -
    -

    Returns the idle time (in milliseconds) passed between the call to start! and the call to finish!.

    -
    - +
    +

    Returns the idle time (in milliseconds) passed between the call to start! and the call to finish!.

    +
    @@ -438,17 +386,11 @@

    -

    - - start!() - -

    +

    start!()

    - -
    -

    Record information at the time this event starts

    -
    - +
    +

    Record information at the time this event starts

    +
    @@ -476,17 +418,9 @@

    -

    - - time() - -

    +

    time()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Notifications/Fanout.html b/src/classes/ActiveSupport/Notifications/Fanout.html index 937f0176dd..a21d68ba56 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout.html +++ b/src/classes/ActiveSupport/Notifications/Fanout.html @@ -135,17 +135,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -178,17 +170,9 @@

    Instance Public methods

    -

    - - all_listeners_for(name) - -

    +

    all_listeners_for(name)

    -
    - -
    - @@ -218,17 +202,9 @@

    -

    - - build_handle(name, id, payload) - -

    +

    build_handle(name, id, payload)

    -
    - -
    - @@ -261,17 +237,9 @@

    -

    - - finish(name, id, payload, listeners = nil) - -

    +

    finish(name, id, payload, listeners = nil)

    -
    - -
    - @@ -298,17 +266,9 @@

    -

    - - listeners_for(name) - -

    +

    listeners_for(name)

    -
    - -
    - @@ -333,17 +293,9 @@

    -

    - - listening?(name) - -

    +

    listening?(name)

    -
    - -
    - @@ -368,17 +320,9 @@

    -

    - - publish(name, ...) - -

    +

    publish(name, ...)

    -
    - -
    - @@ -403,17 +347,9 @@

    -

    - - publish_event(event) - -

    +

    publish_event(event)

    -
    - -
    - @@ -438,17 +374,9 @@

    -

    - - start(name, id, payload) - -

    +

    start(name, id, payload)

    -
    - -
    - @@ -476,17 +404,9 @@

    -

    - - subscribe(pattern = nil, callable = nil, monotonic: false, &block) - -

    +

    subscribe(pattern = nil, callable = nil, monotonic: false, &block)

    -
    - -
    - @@ -524,17 +444,9 @@

    -

    - - unsubscribe(subscriber_or_name) - -

    +

    unsubscribe(subscriber_or_name)

    -
    - -
    - @@ -575,17 +487,11 @@

    -

    - - wait() - -

    +

    wait()

    - -
    -

    This is a sync queue, so there is no waiting.

    -
    - +
    +

    This is a sync queue, so there is no waiting.

    +
    diff --git a/src/classes/ActiveSupport/Notifications/Fanout/Handle.html b/src/classes/ActiveSupport/Notifications/Fanout/Handle.html index 85d7a4d7c5..c99c2c002a 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout/Handle.html +++ b/src/classes/ActiveSupport/Notifications/Fanout/Handle.html @@ -87,17 +87,9 @@

    Methods

    Instance Public methods

    -

    - - finish() - -

    +

    finish()

    -
    - -
    - @@ -122,17 +114,9 @@

    -

    - - start() - -

    +

    start()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html index 0ea482594c..e78803ff71 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html +++ b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/EventObject.html @@ -68,17 +68,9 @@

    Methods

    Instance Public methods

    -

    - - group_class() - -

    +

    group_class()

    -
    - -
    - @@ -103,17 +95,9 @@

    -

    - - publish_event(event) - -

    +

    publish_event(event)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html index 2965e3d3b3..c02c5d7da8 100644 --- a/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html +++ b/src/classes/ActiveSupport/Notifications/Fanout/Subscribers/Matcher/AllMessages.html @@ -68,17 +68,9 @@

    Methods

    Instance Public methods

    -

    - - ===(name) - -

    +

    ===(name)

    -
    - -
    - @@ -103,17 +95,9 @@

    -

    - - unsubscribe!(*) - -

    +

    unsubscribe!(*)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html b/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html index c41dd50fe7..17b8d361bd 100644 --- a/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html +++ b/src/classes/ActiveSupport/Notifications/InstrumentationSubscriberError.html @@ -77,17 +77,9 @@

    Attributes

    Class Public methods

    -

    - - new(exceptions) - -

    +

    new(exceptions)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Notifications/Instrumenter.html b/src/classes/ActiveSupport/Notifications/Instrumenter.html index ee4e6e992b..0b39df7c0b 100644 --- a/src/classes/ActiveSupport/Notifications/Instrumenter.html +++ b/src/classes/ActiveSupport/Notifications/Instrumenter.html @@ -103,17 +103,9 @@

    Attributes

    Class Public methods

    -

    - - new(notifier) - -

    +

    new(notifier)

    -
    - -
    - @@ -147,23 +139,17 @@

    Instance Public methods

    -

    - - build_handle(name, payload) - -

    +

    build_handle(name, payload)

    - -
    -

    Returns a “handle” for an event with the given name and payload.

    +
    +

    Returns a “handle” for an event with the given name and payload.

    start and finish must each be called exactly once on the returned object.

    Where possible, it’s best to use instrument, which will record the start and finish of the event and correctly handle any exceptions. build_handle is a low-level API intended for cases where using instrument isn’t possible.

    See ActiveSupport::Notifications::Fanout::Handle.

    -
    - +
    @@ -188,17 +174,11 @@

    -

    - - finish(name, payload) - -

    +

    finish(name, payload)

    - -
    -

    Send a finish notification with name and payload.

    -
    - +
    +

    Send a finish notification with name and payload.

    +
    @@ -223,17 +203,9 @@

    -

    - - finish_with_state(listeners_state, name, payload) - -

    +

    finish_with_state(listeners_state, name, payload)

    -
    - -
    - @@ -258,17 +230,11 @@

    -

    - - instrument(name, payload = {}) - -

    +

    instrument(name, payload = {})

    - -
    -

    Given a block, instrument it by measuring the time taken to execute and publish it. Without a block, simply send a message via the notifier. Notice that events get sent even if an error occurs in the passed-in block.

    -
    - +
    +

    Given a block, instrument it by measuring the time taken to execute and publish it. Without a block, simply send a message via the notifier. Notice that events get sent even if an error occurs in the passed-in block.

    +
    @@ -303,17 +269,11 @@

    -

    - - start(name, payload) - -

    +

    start(name, payload)

    - -
    -

    Send a start notification with name and payload.

    -
    - +
    +

    Send a start notification with name and payload.

    +
    diff --git a/src/classes/ActiveSupport/NumberHelper.html b/src/classes/ActiveSupport/NumberHelper.html index 917220444f..14603e2903 100644 --- a/src/classes/ActiveSupport/NumberHelper.html +++ b/src/classes/ActiveSupport/NumberHelper.html @@ -130,15 +130,10 @@

    Methods

    Instance Public methods

    -

    - - number_to_currency(number, options = {}) - -

    +

    number_to_currency(number, options = {})

    - -
    -

    Formats a number into a currency string.

    +
    +

    Formats a number into a currency string.

    number_to_currency(1234567890.50)  # => "$1,234,567,890.50"
     number_to_currency(1234567890.506) # => "$1,234,567,890.51"
    @@ -203,8 +198,7 @@ 

    Options

    # => "$1,234,567,890.5"
    -
    - +
    @@ -229,15 +223,10 @@

    Options

    -

    - - number_to_delimited(number, options = {}) - -

    +

    number_to_delimited(number, options = {})

    - -
    -

    Formats number by grouping thousands with a delimiter.

    +
    +

    Formats number by grouping thousands with a delimiter.

    number_to_delimited(12345678)      # => "12,345,678"
     number_to_delimited("123456")      # => "123,456"
    @@ -278,8 +267,7 @@ 

    Options

    # => "1,23,456.78"
    -
    - +
    @@ -304,15 +292,10 @@

    Options

    -

    - - number_to_human(number, options = {}) - -

    +

    number_to_human(number, options = {})

    - -
    -

    Formats number into a more human-friendly representation. Useful for numbers that can become very large and too hard to read.

    +
    +

    Formats number into a more human-friendly representation. Useful for numbers that can become very large and too hard to read.

    number_to_human(123)                 # => "123"
     number_to_human(1234)                # => "1.23 Thousand"
    @@ -408,8 +391,7 @@ 

    Options

    number_to_human(0.01, units: :distance) # => "1 centimeter"
    -
    - +
    @@ -434,15 +416,10 @@

    Options

    -

    - - number_to_human_size(number, options = {}) - -

    +

    number_to_human_size(number, options = {})

    - -
    -

    Formats number as bytes into a more human-friendly representation. Useful for reporting file sizes to users.

    +
    +

    Formats number as bytes into a more human-friendly representation. Useful for reporting file sizes to users.

    number_to_human_size(123)                 # => "123 Bytes"
     number_to_human_size(1234)                # => "1.21 KB"
    @@ -491,8 +468,7 @@ 

    Options

    Whether to remove insignificant zeros after the decimal separator. Defaults to true.

    -
    - +
    @@ -517,15 +493,10 @@

    Options

    -

    - - number_to_percentage(number, options = {}) - -

    +

    number_to_percentage(number, options = {})

    - -
    -

    Formats number as a percentage string.

    +
    +

    Formats number as a percentage string.

    number_to_percentage(100)   # => "100.000%"
     number_to_percentage("99")  # => "99.000%"
    @@ -584,8 +555,7 @@ 

    Options

    # => "100.000 %"
    -
    - +
    @@ -610,15 +580,10 @@

    Options

    -

    - - number_to_phone(number, options = {}) - -

    +

    number_to_phone(number, options = {})

    - -
    -

    Formats number into a phone number.

    +
    +

    Formats number into a phone number.

    number_to_phone(5551234)    # => "555-1234"
     number_to_phone("5551234")  # => "555-1234"
    @@ -668,8 +633,7 @@ 

    Options

    # => "(755) 6123-4567"
    -
    - +
    @@ -694,15 +658,10 @@

    Options

    -

    - - number_to_rounded(number, options = {}) - -

    +

    number_to_rounded(number, options = {})

    - -
    -

    Formats number to a specific level of precision.

    +
    +

    Formats number to a specific level of precision.

    number_to_rounded(12345.6789)                # => "12345.679"
     number_to_rounded(12345.6789, precision: 2)  # => "12345.68"
    @@ -756,8 +715,7 @@ 

    Options

    number_to_rounded(12.3456, strip_insignificant_zeros: true) # => "12.346"
    -
    - +
    diff --git a/src/classes/ActiveSupport/NumericWithFormat.html b/src/classes/ActiveSupport/NumericWithFormat.html index 31a61e60b2..7531f2fa3c 100644 --- a/src/classes/ActiveSupport/NumericWithFormat.html +++ b/src/classes/ActiveSupport/NumericWithFormat.html @@ -62,24 +62,17 @@

    Methods

    Instance Public methods

    -

    - - to_formatted_s(format = nil, options = nil) - -

    +

    to_formatted_s(format = nil, options = nil)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -87,15 +80,10 @@

    -

    - - to_fs(format = nil, options = nil) - -

    +

    to_fs(format = nil, options = nil)

    - -
    -

    Numeric With Format

    +
    +

    Numeric With Format

    Provides options for converting numbers into formatted strings. Options are provided for phone numbers, currency, percentage, precision, positional notation, file size, and pretty printing.

    @@ -199,13 +187,14 @@

    Examples

    separator: ',', significant: false) # => "1,2 Million"
    -
    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    diff --git a/src/classes/ActiveSupport/OrderedOptions.html b/src/classes/ActiveSupport/OrderedOptions.html index 293039846d..41e346be90 100644 --- a/src/classes/ActiveSupport/OrderedOptions.html +++ b/src/classes/ActiveSupport/OrderedOptions.html @@ -125,22 +125,16 @@

    Methods

    Instance Public methods

    -

    - - [](key) - -

    +

    [](key)

    -
    - -
    - -
    - Also aliased as: _get -
    +

    + Also aliased as: + + _get. +

    @@ -164,17 +158,9 @@

    -

    - - []=(key, value) - -

    +

    []=(key, value)

    -
    - -
    - @@ -199,24 +185,17 @@

    -

    - - _get(key) - -

    +

    _get(key)

    -
    - -
    - -
    - Alias for: [] -
    +

    + Alias for: + []. +

    @@ -224,17 +203,9 @@

    -

    - - dig(key, *identifiers) - -

    +

    dig(key, *identifiers)

    -
    - -
    - @@ -259,17 +230,9 @@

    -

    - - extractable_options?() - -

    +

    extractable_options?()

    -
    - -
    - @@ -294,17 +257,9 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - @@ -329,17 +284,9 @@

    -

    - - method_missing(method, *args) - -

    +

    method_missing(method, *args)

    -
    - -
    - @@ -371,17 +318,9 @@

    -

    - - respond_to_missing?(name, include_private) - -

    +

    respond_to_missing?(name, include_private)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/ParameterFilter.html b/src/classes/ActiveSupport/ParameterFilter.html index 5292b7d914..c6afce1d7e 100644 --- a/src/classes/ActiveSupport/ParameterFilter.html +++ b/src/classes/ActiveSupport/ParameterFilter.html @@ -108,22 +108,16 @@

    Methods

    Class Public methods

    -

    - - new(filters = [], mask: FILTERED) - -

    +

    new(filters = [], mask: FILTERED)

    - -
    -

    Create instance with given filters. Supported type of filters are String, Regexp, and Proc. Other types of filters are treated as String using to_s. For Proc filters, key, value, and optional original hash is passed to block arguments.

    +
    +

    Create instance with given filters. Supported type of filters are String, Regexp, and Proc. Other types of filters are treated as String using to_s. For Proc filters, key, value, and optional original hash is passed to block arguments.

    Options

    • :mask - A replaced object when filtered. Defaults to "[FILTERED]".

    -
    - +
    @@ -149,15 +143,10 @@

    Options

    -

    - - precompile_filters(filters) - -

    +

    precompile_filters(filters)

    - -
    -

    Precompiles an array of filters that otherwise would be passed directly to initialize. Depending on the quantity and types of filters, precompilation can improve filtering performance, especially in the case where the ParameterFilter instance itself cannot be retained (but the precompiled filters can be retained).

    +
    +

    Precompiles an array of filters that otherwise would be passed directly to initialize. Depending on the quantity and types of filters, precompilation can improve filtering performance, especially in the case where the ParameterFilter instance itself cannot be retained (but the precompiled filters can be retained).

    filters = [/foo/, :bar, "nested.baz", /nested\.qux/]
     
    @@ -166,8 +155,7 @@ 

    ActiveSupport::ParameterFilter.new(precompiled)

    -
    - +
    @@ -207,17 +195,11 @@

    Instance Public methods

    -

    - - filter(params) - -

    +

    filter(params)

    - -
    -

    Mask value of params if key matches one of filters.

    -
    - +
    +

    Mask value of params if key matches one of filters.

    +
    @@ -242,17 +224,11 @@

    -

    - - filter_param(key, value) - -

    +

    filter_param(key, value)

    - -
    -

    Returns filtered value for given key. For Proc filters, third block argument is not populated.

    -
    - +
    +

    Returns filtered value for given key. For Proc filters, third block argument is not populated.

    +
    diff --git a/src/classes/ActiveSupport/RangeWithFormat.html b/src/classes/ActiveSupport/RangeWithFormat.html index 9032a93c85..5165ccc6de 100644 --- a/src/classes/ActiveSupport/RangeWithFormat.html +++ b/src/classes/ActiveSupport/RangeWithFormat.html @@ -103,24 +103,17 @@

    Constants

    Instance Public methods

    -

    - - to_formatted_s(format = :default) - -

    +

    to_formatted_s(format = :default)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -128,15 +121,10 @@

    -

    - - to_fs(format = :default) - -

    +

    to_fs(format = :default)

    - -
    -

    Convert range to a formatted string. See RANGE_FORMATS for predefined formats.

    +
    +

    Convert range to a formatted string. See RANGE_FORMATS for predefined formats.

    This method is aliased to to_formatted_s.

    @@ -159,13 +147,14 @@

    Adding your
    # config/initializers/range_formats.rb
     Range::RANGE_FORMATS[:short] = ->(start, stop) { "Between #{start.to_fs(:db)} and #{stop.to_fs(:db)}" }
     
    -

    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    diff --git a/src/classes/ActiveSupport/Reloader.html b/src/classes/ActiveSupport/Reloader.html index 61184671b8..437bf61e38 100644 --- a/src/classes/ActiveSupport/Reloader.html +++ b/src/classes/ActiveSupport/Reloader.html @@ -117,17 +117,11 @@

    Methods

    Class Public methods

    -

    - - after_class_unload(*args, &block) - -

    +

    after_class_unload(*args, &block)

    - -
    -

    Registers a callback that will run immediately after the classes are unloaded.

    -
    - +
    +

    Registers a callback that will run immediately after the classes are unloaded.

    +
    @@ -152,17 +146,11 @@

    -

    - - before_class_unload(*args, &block) - -

    +

    before_class_unload(*args, &block)

    - -
    -

    Registers a callback that will run immediately before the classes are unloaded.

    -
    - +
    +

    Registers a callback that will run immediately before the classes are unloaded.

    +
    @@ -187,17 +175,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -223,17 +203,11 @@

    -

    - - reload!() - -

    +

    reload!()

    - -
    -

    Initiate a manual reload

    -
    - +
    +

    Initiate a manual reload

    +
    @@ -265,17 +239,11 @@

    -

    - - to_prepare(*args, &block) - -

    +

    to_prepare(*args, &block)

    - -
    -

    Registers a callback that will run once at application startup and every time the code is reloaded.

    -
    - +
    +

    Registers a callback that will run once at application startup and every time the code is reloaded.

    +
    @@ -300,17 +268,11 @@

    -

    - - wrap(**kwargs) - -

    +

    wrap(**kwargs)

    - -
    -

    Run the supplied block as a work unit, reloading code as needed

    -
    - +
    +

    Run the supplied block as a work unit, reloading code as needed

    +
    @@ -348,17 +310,11 @@

    Instance Public methods

    -

    - - release_unload_lock!() - -

    +

    release_unload_lock!()

    - -
    -

    Release the unload lock if it has been previously obtained

    -
    - +
    +

    Release the unload lock if it has been previously obtained

    +
    @@ -386,17 +342,11 @@

    -

    - - require_unload_lock!() - -

    +

    require_unload_lock!()

    - -
    -

    Acquire the ActiveSupport::Dependencies::Interlock unload lock, ensuring it will be released automatically

    -
    - +
    +

    Acquire the ActiveSupport::Dependencies::Interlock unload lock, ensuring it will be released automatically

    +
    diff --git a/src/classes/ActiveSupport/Rescuable.html b/src/classes/ActiveSupport/Rescuable.html index 0fd6b4f801..fe9fdce7bd 100644 --- a/src/classes/ActiveSupport/Rescuable.html +++ b/src/classes/ActiveSupport/Rescuable.html @@ -79,17 +79,11 @@

    Methods

    Instance Public methods

    -

    - - rescue_with_handler(exception) - -

    +

    rescue_with_handler(exception)

    - -
    -

    Delegates to the class method, but uses the instance as the subject for rescue_from handlers (method calls, instance_exec blocks).

    -
    - +
    +

    Delegates to the class method, but uses the instance as the subject for rescue_from handlers (method calls, instance_exec blocks).

    +
    diff --git a/src/classes/ActiveSupport/Rescuable/ClassMethods.html b/src/classes/ActiveSupport/Rescuable/ClassMethods.html index eebe06b773..06f64e59ee 100644 --- a/src/classes/ActiveSupport/Rescuable/ClassMethods.html +++ b/src/classes/ActiveSupport/Rescuable/ClassMethods.html @@ -62,15 +62,10 @@

    Methods

    Instance Public methods

    -

    - - rescue_from(*klasses, with: nil, &block) - -

    +

    rescue_from(*klasses, with: nil, &block)

    - -
    -

    Registers exception classes with a handler to be called by rescue_with_handler.

    +
    +

    Registers exception classes with a handler to be called by rescue_with_handler.

    rescue_from receives a series of exception classes or class names, and an exception handler specified by a trailing :with option containing the name of a method or a Proc object. Alternatively, a block can be given as the handler.

    @@ -98,8 +93,7 @@

    Exceptions raised inside exception handlers are not propagated up.

    -

    - +
    @@ -143,15 +137,10 @@

    -

    - - rescue_with_handler(exception, object: self, visited_exceptions: []) - -

    +

    rescue_with_handler(exception, object: self, visited_exceptions: [])

    - -
    -

    Matches an exception to a handler based on the exception class.

    +
    +

    Matches an exception to a handler based on the exception class.

    If no handler matches the exception, check for a handler matching the (optional) exception.cause. If no handler matches the exception or its cause, this returns nil, so you can deal with unhandled exceptions. Be sure to re-raise unhandled exceptions if this is what you expect.

    @@ -163,8 +152,7 @@

    Returns the exception if it was handled and nil if it was not.

    -

    - +
    diff --git a/src/classes/ActiveSupport/SafeBuffer.html b/src/classes/ActiveSupport/SafeBuffer.html index cdef9fd459..5b32da1c85 100644 --- a/src/classes/ActiveSupport/SafeBuffer.html +++ b/src/classes/ActiveSupport/SafeBuffer.html @@ -188,17 +188,9 @@

    Constants

    Class Public methods

    -

    - - new(_str = "") - -

    +

    new(_str = "")

    -
    - -
    - @@ -227,17 +219,9 @@

    Instance Public methods

    -

    - - %(args) - -

    +

    %(args)

    -
    - -
    - @@ -269,17 +253,9 @@

    -

    - - *(_) - -

    +

    *(_)

    -
    - -
    - @@ -309,17 +285,9 @@

    -

    - - +(other) - -

    +

    +(other)

    -
    - -
    - @@ -344,24 +312,17 @@

    -

    - - <<(value) - -

    +

    <<(value)

    -
    - -
    - -
    - Alias for: concat -
    +

    + Alias for: + concat. +

    @@ -369,22 +330,16 @@

    -

    - - [](*args) - -

    +

    [](*args)

    -
    - -
    - -
    - Also aliased as: slice -
    +

    + Also aliased as: + + slice. +

    @@ -416,17 +371,9 @@

    -

    - - []=(arg1, arg2, arg3 = nil) - -

    +

    []=(arg1, arg2, arg3 = nil)

    -
    - -
    - @@ -455,17 +402,9 @@

    -

    - - as_json(*) - -

    +

    as_json(*)

    -
    - -
    - @@ -490,17 +429,9 @@

    -

    - - bytesplice(*args, value) - -

    +

    bytesplice(*args, value)

    -
    - -
    - @@ -525,17 +456,9 @@

    -

    - - chr() - -

    +

    chr()

    -
    - -
    - @@ -562,22 +485,16 @@

    -

    - - concat(value) - -

    +

    concat(value)

    -
    - -
    - -
    - Also aliased as: original_concat, << -
    +

    + Also aliased as: + + original_concat, <<. +

    @@ -604,17 +521,9 @@

    -

    - - encode_with(coder) - -

    +

    encode_with(coder)

    -
    - -
    - @@ -639,17 +548,9 @@

    -

    - - html_safe?() - -

    +

    html_safe?()

    -
    - -
    - @@ -674,17 +575,9 @@

    -

    - - initialize_copy(other) - -

    +

    initialize_copy(other)

    -
    - -
    - @@ -710,17 +603,9 @@

    -

    - - insert(index, value) - -

    +

    insert(index, value)

    -
    - -
    - @@ -745,24 +630,17 @@

    -

    - - original_concat(value) - -

    +

    original_concat(value)

    -
    - -
    - -
    - Alias for: concat -
    +

    + Alias for: + concat. +

    @@ -770,17 +648,9 @@

    -

    - - prepend(value) - -

    +

    prepend(value)

    -
    - -
    - @@ -805,17 +675,9 @@

    -

    - - replace(value) - -

    +

    replace(value)

    -
    - -
    - @@ -840,17 +702,9 @@

    -

    - - safe_concat(value) - -

    +

    safe_concat(value)

    -
    - -
    - @@ -876,24 +730,17 @@

    -

    - - slice(*args) - -

    +

    slice(*args)

    -
    - -
    - -
    - Alias for: [] -
    +

    + Alias for: + []. +

    @@ -901,17 +748,9 @@

    -

    - - slice!(*args) - -

    +

    slice!(*args)

    -
    - -
    - @@ -940,17 +779,9 @@

    -

    - - to_param() - -

    +

    to_param()

    -
    - -
    - @@ -975,17 +806,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html b/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html index 682df2c59c..14534e8127 100644 --- a/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html +++ b/src/classes/ActiveSupport/SafeBuffer/SafeConcatError.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/SecureCompareRotator.html b/src/classes/ActiveSupport/SecureCompareRotator.html index 151fde1e6b..28d0f1162a 100644 --- a/src/classes/ActiveSupport/SecureCompareRotator.html +++ b/src/classes/ActiveSupport/SecureCompareRotator.html @@ -129,17 +129,9 @@

    Constants

    Class Public methods

    -

    - - new(value, on_rotation: nil) - -

    +

    new(value, on_rotation: nil)

    -
    - -
    - @@ -170,17 +162,9 @@

    Instance Public methods

    -

    - - rotate(previous_value) - -

    +

    rotate(previous_value)

    -
    - -
    - @@ -205,17 +189,9 @@

    -

    - - secure_compare!(other_value, on_rotation: @on_rotation) - -

    +

    secure_compare!(other_value, on_rotation: @on_rotation)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/SecurityUtils.html b/src/classes/ActiveSupport/SecurityUtils.html index b21ea3adb8..4446c00ab1 100644 --- a/src/classes/ActiveSupport/SecurityUtils.html +++ b/src/classes/ActiveSupport/SecurityUtils.html @@ -61,17 +61,9 @@

    Methods

    Class Public methods

    -

    - - fixed_length_secure_compare(a, b) - -

    +

    fixed_length_secure_compare(a, b)

    -
    - -
    - @@ -96,19 +88,13 @@

    -

    - - secure_compare(a, b) - -

    +

    secure_compare(a, b)

    - -
    -

    Secure string comparison for strings of variable length.

    +
    +

    Secure string comparison for strings of variable length.

    While a timing attack would not be able to discern the content of a secret compared via secure_compare, it is possible to determine the secret length. This should be considered when using secure_compare to compare weak, short secrets to user input.

    -
    - +
    diff --git a/src/classes/ActiveSupport/StructuredEventSubscriber.html b/src/classes/ActiveSupport/StructuredEventSubscriber.html index eaa46ca914..357a89a049 100644 --- a/src/classes/ActiveSupport/StructuredEventSubscriber.html +++ b/src/classes/ActiveSupport/StructuredEventSubscriber.html @@ -119,17 +119,9 @@

    Constants

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -159,17 +151,9 @@

    Instance Public methods

    -

    - - call(event) - -

    +

    call(event)

    -
    - -
    - @@ -196,17 +180,11 @@

    -

    - - emit_debug_event(name, payload = nil, caller_depth: 1, **kwargs) - -

    +

    emit_debug_event(name, payload = nil, caller_depth: 1, **kwargs)

    - -
    -

    Like emit_event, but only emits when the event reporter is in debug mode

    -
    - +
    +

    Like emit_event, but only emits when the event reporter is in debug mode

    +
    @@ -233,15 +211,10 @@

    -

    - - emit_event(name, payload = nil, caller_depth: 1, **kwargs) - -

    +

    emit_event(name, payload = nil, caller_depth: 1, **kwargs)

    - -
    -

    Emit a structured event via Rails.event.notify.

    +
    +

    Emit a structured event via Rails.event.notify.

    Arguments

    • @@ -253,8 +226,7 @@

      Arguments

    • kwargs - Additional payload data merged with the payload hash

    -
    - +
    @@ -281,17 +253,9 @@

    Arguments

    -

    - - silenced?(event) - -

    +

    silenced?(event)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Subscriber.html b/src/classes/ActiveSupport/Subscriber.html index ea9b15118a..70757dedcb 100644 --- a/src/classes/ActiveSupport/Subscriber.html +++ b/src/classes/ActiveSupport/Subscriber.html @@ -119,17 +119,11 @@

    Methods

    Class Public methods

    -

    - - attach_to(namespace, subscriber = new, notifier = ActiveSupport::Notifications, inherit_all: false) - -

    +

    attach_to(namespace, subscriber = new, notifier = ActiveSupport::Notifications, inherit_all: false)

    - -
    -

    Attach the subscriber to a namespace.

    -
    - +
    +

    Attach the subscriber to a namespace.

    +
    @@ -164,17 +158,11 @@

    -

    - - detach_from(namespace, notifier = ActiveSupport::Notifications) - -

    +

    detach_from(namespace, notifier = ActiveSupport::Notifications)

    - -
    -

    Detach the subscriber from a namespace.

    -
    - +
    +

    Detach the subscriber from a namespace.

    +
    @@ -213,17 +201,11 @@

    -

    - - method_added(event) - -

    +

    method_added(event)

    - -
    -

    Adds event subscribers for all new methods added to the class.

    -
    - +
    +

    Adds event subscribers for all new methods added to the class.

    +
    @@ -254,17 +236,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -290,17 +264,9 @@

    -

    - - subscribers() - -

    +

    subscribers()

    -
    - -
    - @@ -328,17 +294,9 @@

    Class Private methods

    -

    - - add_event_subscriber(event) - -

    +

    add_event_subscriber(event)

    -
    - -
    - @@ -370,17 +328,9 @@

    -

    - - remove_event_subscriber(event) - -

    +

    remove_event_subscriber(event)

    -
    - -
    - @@ -416,17 +366,9 @@

    Instance Public methods

    -

    - - call(event) - -

    +

    call(event)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/TaggedLogging.html b/src/classes/ActiveSupport/TaggedLogging.html index 37bd53d04a..1947572afd 100644 --- a/src/classes/ActiveSupport/TaggedLogging.html +++ b/src/classes/ActiveSupport/TaggedLogging.html @@ -95,17 +95,11 @@

    Methods

    Class Public methods

    -

    - - logger(*args, **kwargs) - -

    +

    logger(*args, **kwargs)

    - -
    -

    Returns an ‘ActiveSupport::Logger` that has already been wrapped with tagged logging concern.

    -
    - +
    +

    Returns an ‘ActiveSupport::Logger` that has already been wrapped with tagged logging concern.

    +
    @@ -130,17 +124,9 @@

    -

    - - new(logger) - -

    +

    new(logger)

    -
    - -
    - @@ -183,17 +169,9 @@

    Instance Public methods

    -

    - - flush() - -

    +

    flush()

    -
    - -
    - @@ -219,17 +197,9 @@

    -

    - - tagged(*tags) - -

    +

    tagged(*tags)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/TestCase.html b/src/classes/ActiveSupport/TestCase.html index 9914a5fff1..74bcf39342 100644 --- a/src/classes/ActiveSupport/TestCase.html +++ b/src/classes/ActiveSupport/TestCase.html @@ -234,19 +234,13 @@

    Constants

    Class Public methods

    -

    - - fixture_paths - -

    +

    fixture_paths

    - -
    -

    Returns the ActiveRecord::FixtureSet collection.

    +
    +

    Returns the ActiveRecord::FixtureSet collection.

    In your test_helper.rb you must have require "rails/test_help".

    -
    - +
    @@ -259,16 +253,11 @@

    -

    - - fixture_paths=(fixture_paths) - - -

    +

    fixture_paths=(fixture_paths) +

    - -
    -

    Sets the given path to the fixture set.

    +
    +

    Sets the given path to the fixture set.

    Can also append multiple paths.

    @@ -276,8 +265,7 @@

    In your test_helper.rb you must have require "rails/test_help".

    -

    - +
    @@ -290,20 +278,14 @@

    -

    - - parallel_worker_id() - -

    +

    parallel_worker_id()

    - -
    -

    Returns the current parallel worker ID if tests are running in parallel, nil otherwise.

    +
    +

    Returns the current parallel worker ID if tests are running in parallel, nil otherwise.

    ActiveSupport::TestCase.parallel_worker_id # => 2
     
    -
    - +
    @@ -328,15 +310,10 @@

    -

    - - parallelize(workers: :number_of_processors, with: :processes, threshold: ActiveSupport.test_parallelization_threshold, parallelize_databases: ActiveSupport.parallelize_test_databases) - -

    +

    parallelize(workers: :number_of_processors, with: :processes, threshold: ActiveSupport.test_parallelization_threshold, parallelize_databases: ActiveSupport.parallelize_test_databases)

    - -
    -

    Parallelizes the test suite.

    +
    +

    Parallelizes the test suite.

    Takes a workers argument that controls how many times the process is forked. For each process a new database will be created suffixed with the worker number.

    @@ -365,8 +342,7 @@

    Note that your test suite may deadlock if you attempt to use only one database with multiple processes.

    -

    - +
    @@ -402,15 +378,10 @@

    -

    - - parallelize_before_fork(&block) - -

    +

    parallelize_before_fork(&block)

    - -
    -

    Before fork hook for parallel testing. This can be used to run anything before the processes are forked.

    +
    +

    Before fork hook for parallel testing. This can be used to run anything before the processes are forked.

    In your test_helper.rb add the following:

    @@ -420,8 +391,7 @@

    end end -

    - +
    @@ -446,15 +416,10 @@

    -

    - - parallelize_setup(&block) - -

    +

    parallelize_setup(&block)

    - -
    -

    Setup hook for parallel testing. This can be used if you have multiple databases or any behavior that needs to be run after the process is forked but before the tests run.

    +
    +

    Setup hook for parallel testing. This can be used if you have multiple databases or any behavior that needs to be run after the process is forked but before the tests run.

    Note: this feature is not available with the threaded parallelization.

    @@ -466,8 +431,7 @@

    end end -

    - +
    @@ -492,15 +456,10 @@

    -

    - - parallelize_teardown(&block) - -

    +

    parallelize_teardown(&block)

    - -
    -

    Clean up hook for parallel testing. This can be used to drop databases if your app uses multiple write/read databases or other clean up before the tests finish. This runs before the forked process is closed.

    +
    +

    Clean up hook for parallel testing. This can be used to drop databases if your app uses multiple write/read databases or other clean up before the tests finish. This runs before the forked process is closed.

    Note: this feature is not available with the threaded parallelization.

    @@ -512,8 +471,7 @@

    end end -

    - +
    @@ -538,22 +496,16 @@

    -

    - - test_order() - -

    +

    test_order()

    - -
    -

    Returns the order in which test cases are run.

    +
    +

    Returns the order in which test cases are run.

    ActiveSupport::TestCase.test_order # => :random
     

    Possible values are :random, :parallel, :alpha, :sorted. Defaults to :random.

    -
    - +
    @@ -578,15 +530,10 @@

    -

    - - test_order=(new_order) - -

    +

    test_order=(new_order)

    - -
    -

    Sets the order in which test cases are run.

    +
    +

    Sets the order in which test cases are run.

    ActiveSupport::TestCase.test_order = :random # => :random
     
    @@ -601,8 +548,7 @@

  • :alpha (equivalent to :sorted)

  • -

    - +
    @@ -631,18 +577,12 @@

    Instance Public methods

    -

    - - assert_no_match(matcher, obj, msg = nil) - - -

    +

    assert_no_match(matcher, obj, msg = nil) +

    - -
    -

    Alias for: refute_match

    -
    - +
    +

    Alias for: refute_match

    +
    @@ -655,18 +595,12 @@

    -

    - - assert_not_empty(obj, msg = nil) +

    assert_not_empty(obj, msg = nil) +

    - - - - -
    -

    Alias for: refute_empty

    -
    - +
    +

    Alias for: refute_empty

    +
    @@ -679,18 +613,12 @@

    -

    - - assert_not_equal(exp, act, msg = nil) - - -

    +

    assert_not_equal(exp, act, msg = nil) +

    - -
    -

    Alias for: refute_equal

    -
    - +
    +

    Alias for: refute_equal

    +
    @@ -703,18 +631,12 @@

    -

    - - assert_not_in_delta(exp, act, delta = 0.001, msg = nil) +

    assert_not_in_delta(exp, act, delta = 0.001, msg = nil) +

    - - - - -
    -

    Alias for: refute_in_delta

    -
    - +
    +

    Alias for: refute_in_delta

    +
    @@ -727,18 +649,12 @@

    -

    - - assert_not_in_epsilon(a, b, epsilon = 0.001, msg = nil) - - -

    +

    assert_not_in_epsilon(a, b, epsilon = 0.001, msg = nil) +

    - -
    -

    Alias for: refute_in_epsilon

    -
    - +
    +

    Alias for: refute_in_epsilon

    +
    @@ -751,18 +667,12 @@

    -

    - - assert_not_includes(collection, obj, msg = nil) +

    assert_not_includes(collection, obj, msg = nil) +

    - - - - -
    -

    Alias for: refute_includes

    -
    - +
    +

    Alias for: refute_includes

    +
    @@ -775,18 +685,12 @@

    -

    - - assert_not_instance_of(cls, obj, msg = nil) - - -

    +

    assert_not_instance_of(cls, obj, msg = nil) +

    - -
    -

    Alias for: refute_instance_of

    -
    - +
    +

    Alias for: refute_instance_of

    +
    @@ -799,18 +703,12 @@

    -

    - - assert_not_kind_of(cls, obj, msg = nil) +

    assert_not_kind_of(cls, obj, msg = nil) +

    - - - - -
    -

    Alias for: refute_kind_of

    -
    - +
    +

    Alias for: refute_kind_of

    +
    @@ -823,18 +721,12 @@

    -

    - - assert_not_nil(obj, msg = nil) - - -

    +

    assert_not_nil(obj, msg = nil) +

    - -
    -

    Alias for: refute_nil

    -
    - +
    +

    Alias for: refute_nil

    +
    @@ -847,18 +739,12 @@

    -

    - - assert_not_operator(o1, op, o2 = UNDEFINED, msg = nil) +

    assert_not_operator(o1, op, o2 = UNDEFINED, msg = nil) +

    - - - - -
    -

    Alias for: refute_operator

    -
    - +
    +

    Alias for: refute_operator

    +
    @@ -871,18 +757,12 @@

    -

    - - assert_not_predicate(o1, op, msg = nil) - - -

    +

    assert_not_predicate(o1, op, msg = nil) +

    - -
    -

    Alias for: refute_predicate

    -
    - +
    +

    Alias for: refute_predicate

    +
    @@ -895,18 +775,12 @@

    -

    - - assert_not_respond_to(obj, meth, msg = nil) +

    assert_not_respond_to(obj, meth, msg = nil) +

    - - - - -
    -

    Alias for: refute_respond_to

    -
    - +
    +

    Alias for: refute_respond_to

    +
    @@ -919,18 +793,12 @@

    -

    - - assert_not_same(exp, act, msg = nil) - - -

    +

    assert_not_same(exp, act, msg = nil) +

    - -
    -

    Alias for: refute_same

    -
    - +
    +

    Alias for: refute_same

    +
    @@ -943,17 +811,11 @@

    -

    - - parallel_worker_id() - -

    +

    parallel_worker_id()

    - -
    -

    Returns the current parallel worker ID if tests are running in parallel

    -
    - +
    +

    Returns the current parallel worker ID if tests are running in parallel

    +
    diff --git a/src/classes/ActiveSupport/Testing/Assertions.html b/src/classes/ActiveSupport/Testing/Assertions.html index 85546b1a99..3f9527bb34 100644 --- a/src/classes/ActiveSupport/Testing/Assertions.html +++ b/src/classes/ActiveSupport/Testing/Assertions.html @@ -86,15 +86,10 @@

    Methods

    Instance Public methods

    -

    - - assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block) - -

    +

    assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block)

    - -
    -

    Assertion that the result of evaluating an expression is changed before and after invoking the passed in block.

    +
    +

    Assertion that the result of evaluating an expression is changed before and after invoking the passed in block.

    assert_changes 'Status.all_good?' do
       post :create, params: { status: { ok: false } }
    @@ -139,8 +134,7 @@ 

    post :create, params: { status: { incident: true } } end

    -
    - +
    @@ -199,15 +193,10 @@

    -

    - - assert_difference(expression, *args, &block) - -

    +

    assert_difference(expression, *args, &block)

    - -
    -

    Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block.

    +
    +

    Test numeric difference between the return value of an expression as a result of what is evaluated in the yielded block.

    assert_difference 'Article.count' do
       post :create, params: { article: {...} }
    @@ -263,8 +252,7 @@ 

    post :delete, params: { id: ... } end

    -
    - +
    @@ -317,15 +305,10 @@

    -

    - - assert_no_changes(expression, message = nil, from: UNTRACKED, &block) - -

    +

    assert_no_changes(expression, message = nil, from: UNTRACKED, &block)

    - -
    -

    Assertion that the result of evaluating an expression is not changed before and after invoking the passed in block.

    +
    +

    Assertion that the result of evaluating an expression is not changed before and after invoking the passed in block.

    assert_no_changes 'Status.all_good?' do
       post :create, params: { status: { ok: true } }
    @@ -356,8 +339,7 @@ 

    post :create, params: { status: { ok: false } } end

    -
    - +
    @@ -411,15 +393,10 @@

    -

    - - assert_no_difference(expression, message = nil, &block) - -

    +

    assert_no_difference(expression, message = nil, &block)

    - -
    -

    Assertion that the numeric result of evaluating an expression is not changed before and after invoking the passed in block.

    +
    +

    Assertion that the numeric result of evaluating an expression is not changed before and after invoking the passed in block.

    assert_no_difference 'Article.count' do
       post :create, params: { article: invalid_attributes }
    @@ -446,8 +423,7 @@ 

    post :create, params: { article: invalid_attributes } end

    -
    - +
    @@ -472,15 +448,10 @@

    -

    - - assert_not(object, message = nil) - -

    +

    assert_not(object, message = nil)

    - -
    -

    Asserts that an expression is not truthy. Passes if object is nil or false. “Truthy” means “considered true in a conditional” like if foo.

    +
    +

    Asserts that an expression is not truthy. Passes if object is nil or false. “Truthy” means “considered true in a conditional” like if foo.

    assert_not nil    # => true
     assert_not false  # => true
    @@ -491,8 +462,7 @@ 

    assert_not foo, 'foo should be false'
     
    -

    - +
    @@ -518,15 +488,10 @@

    -

    - - assert_nothing_raised() - -

    +

    assert_nothing_raised()

    - -
    -

    Assertion that the block should not raise an exception.

    +
    +

    Assertion that the block should not raise an exception.

    Passes if evaluated code in the yielded block raises no exception.

    @@ -534,8 +499,7 @@

    perform_service(param: 'no_exception') end -

    - +
    @@ -562,24 +526,17 @@

    -

    - - assert_raise(*exp, match: nil, &block) - -

    +

    assert_raise(*exp, match: nil, &block)

    -
    - -
    - -
    - Alias for: assert_raises -
    +

    + Alias for: + assert_raises. +

    @@ -587,27 +544,23 @@

    -

    - - assert_raises(*exp, match: nil, &block) - -

    +

    assert_raises(*exp, match: nil, &block)

    - -
    -

    Asserts that a block raises one of exp. This is an enhancement of the standard Minitest assertion method with the ability to test error messages.

    +
    +

    Asserts that a block raises one of exp. This is an enhancement of the standard Minitest assertion method with the ability to test error messages.

    assert_raises(ArgumentError, match: /incorrect param/i) do
       perform_service(param: 'exception')
     end
     
    -
    - +
    -
    - Also aliased as: assert_raise -
    +

    + Also aliased as: + + assert_raise. +

    diff --git a/src/classes/ActiveSupport/Testing/ConstantStubbing.html b/src/classes/ActiveSupport/Testing/ConstantStubbing.html index b2fd6b1e48..95efd5a4a8 100644 --- a/src/classes/ActiveSupport/Testing/ConstantStubbing.html +++ b/src/classes/ActiveSupport/Testing/ConstantStubbing.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - stub_const(mod, constant, new_value, exists: true) - -

    +

    stub_const(mod, constant, new_value, exists: true)

    - -
    -

    Changes the value of a constant for the duration of a block. Example:

    +
    +

    Changes the value of a constant for the duration of a block. Example:

    # World::List::Import::LARGE_IMPORT_THRESHOLD = 5000
     stub_const(World::List::Import, :LARGE_IMPORT_THRESHOLD, 1) do
    @@ -86,8 +81,7 @@ 

    Note: Stubbing a const will stub it across all threads. So if you have concurrent threads (like separate test suites running in parallel) that all depend on the same constant, it’s possible divergent stubbing will trample on each other.

    -
    - +
    diff --git a/src/classes/ActiveSupport/Testing/Declarative.html b/src/classes/ActiveSupport/Testing/Declarative.html index 2185d3e40d..f36b33a1ee 100644 --- a/src/classes/ActiveSupport/Testing/Declarative.html +++ b/src/classes/ActiveSupport/Testing/Declarative.html @@ -58,22 +58,16 @@

    Methods

    Instance Public methods

    -

    - - test(name, &block) - -

    +

    test(name, &block)

    - -
    -

    Helper to define a test method using a String. Under the hood, it replaces spaces with underscores and defines the test method.

    +
    +

    Helper to define a test method using a String. Under the hood, it replaces spaces with underscores and defines the test method.

    test "verify something" do
       ...
     end
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/Testing/Deprecation.html b/src/classes/ActiveSupport/Testing/Deprecation.html index f3e78e94f3..5ce62c7ddb 100644 --- a/src/classes/ActiveSupport/Testing/Deprecation.html +++ b/src/classes/ActiveSupport/Testing/Deprecation.html @@ -66,16 +66,12 @@

    Methods

    Instance Public methods

    -

    - - assert_deprecated(deprecator, &block)
    assert_deprecated(match, deprecator, &block) - - -

    +

    assert_deprecated(deprecator, &block) +assert_deprecated(match, deprecator, &block) +

    - -
    -

    Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block.

    +
    +

    Asserts that a matching deprecation warning was emitted by the given deprecator during the execution of the yielded block.

    assert_deprecated(/foo/, CustomDeprecator) do
       CustomDeprecator.warn "foo should no longer be used"
    @@ -95,8 +91,7 @@ 

    CustomDeprecator.warn "foo should no longer be used" end

    -
    - +
    @@ -133,15 +128,10 @@

    -

    - - assert_not_deprecated(deprecator, &block) - -

    +

    assert_not_deprecated(deprecator, &block)

    - -
    -

    Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block.

    +
    +

    Asserts that no deprecation warnings are emitted by the given deprecator during the execution of the yielded block.

    assert_not_deprecated(CustomDeprecator) do
       CustomDeprecator.warn "message" # fails assertion
    @@ -151,8 +141,7 @@ 

    CustomDeprecator.warn "message" # passes assertion, different deprecator end

    -
    - +
    @@ -179,15 +168,10 @@

    -

    - - collect_deprecations(deprecator) - -

    +

    collect_deprecations(deprecator)

    - -
    -

    Returns the return value of the block and an array of all the deprecation warnings emitted by the given deprecator during the execution of the yielded block.

    +
    +

    Returns the return value of the block and an array of all the deprecation warnings emitted by the given deprecator during the execution of the yielded block.

    collect_deprecations(CustomDeprecator) do
       CustomDeprecator.warn "message"
    @@ -195,8 +179,7 @@ 

    :result end # => [:result, ["message"]]

    -
    - +
    diff --git a/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html b/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html index a5d389510d..ff706776aa 100644 --- a/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html +++ b/src/classes/ActiveSupport/Testing/ErrorReporterAssertions.html @@ -79,15 +79,10 @@

    Methods

    Instance Public methods

    -

    - - assert_error_reported(error_class = StandardError, &block) - -

    +

    assert_error_reported(error_class = StandardError, &block)

    - -
    -

    Assertion that the block should cause at least one exception to be reported to Rails.error.

    +
    +

    Assertion that the block should cause at least one exception to be reported to Rails.error.

    Passes if the evaluated code in the yielded block reports a matching exception.

    @@ -106,8 +101,7 @@

    assert_equal :warning, report.severity assert_predicate report, :handled? -

    - +
    @@ -146,15 +140,10 @@

    -

    - - assert_no_error_reported(&block) - -

    +

    assert_no_error_reported(&block)

    - -
    -

    Assertion that the block should not cause an exception to be reported to Rails.error.

    +
    +

    Assertion that the block should not cause an exception to be reported to Rails.error.

    Passes if evaluated code in the yielded block reports no exception.

    @@ -162,8 +151,7 @@

    perform_service(param: 'no_exception') end -

    - +
    @@ -191,15 +179,10 @@

    -

    - - capture_error_reports(error_class = StandardError, &block) - -

    +

    capture_error_reports(error_class = StandardError, &block)

    - -
    -

    Captures reported errors from within the block that match the given error class.

    +
    +

    Captures reported errors from within the block that match the given error class.

    reports = capture_error_reports(IOError) do
       Rails.error.report(IOError.new("Oops"))
    @@ -211,8 +194,7 @@ 

    assert_equal "Oops", reports.first.error.message assert_equal "Oh no", reports.last.error.message

    -
    - +
    diff --git a/src/classes/ActiveSupport/Testing/EventReporterAssertions.html b/src/classes/ActiveSupport/Testing/EventReporterAssertions.html index 5dda078ab5..c3ce94f138 100644 --- a/src/classes/ActiveSupport/Testing/EventReporterAssertions.html +++ b/src/classes/ActiveSupport/Testing/EventReporterAssertions.html @@ -76,15 +76,10 @@

    Methods

    Instance Public methods

    -

    - - assert_event_reported(name, payload: nil, tags: {}, &block) - -

    +

    assert_event_reported(name, payload: nil, tags: {}, &block)

    - -
    -

    Asserts that the block causes an event with the given name to be reported to Rails.event.

    +
    +

    Asserts that the block causes an event with the given name to be reported to Rails.event.

    Passes if the evaluated code in the yielded block reports a matching event.

    @@ -111,8 +106,7 @@

    Rails.event.notify("user.created", { id: 123, name: "John Doe" }) end -

    - +
    @@ -152,15 +146,10 @@

    -

    - - assert_events_reported(expected_events, &block) - -

    +

    assert_events_reported(expected_events, &block)

    - -
    -

    Asserts that the provided events were reported, regardless of order.

    +
    +

    Asserts that the provided events were reported, regardless of order.

    assert_events_reported([
       { name: "user.created", payload: { id: 123 } },
    @@ -185,8 +174,7 @@ 

    end end

    -
    - +
    @@ -239,15 +227,10 @@

    -

    - - assert_no_event_reported(name = nil, payload: {}, tags: {}, &block) - -

    +

    assert_no_event_reported(name = nil, payload: {}, tags: {}, &block)

    - -
    -

    Asserts that the block does not cause an event to be reported to Rails.event.

    +
    +

    Asserts that the block does not cause an event to be reported to Rails.event.

    If no name is provided, passes if evaluated code in the yielded block reports no events.

    @@ -262,8 +245,7 @@

    service_that_does_not_report_events.perform end -

    - +
    @@ -300,22 +282,16 @@

    -

    - - with_debug_event_reporting(&block) - -

    +

    with_debug_event_reporting(&block)

    - -
    -

    Allows debug events to be reported to Rails.event for the duration of a given block.

    +
    +

    Allows debug events to be reported to Rails.event for the duration of a given block.

    with_debug_event_reporting do
       service_that_reports_debug_events.perform
     end
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/Testing/FileFixtures.html b/src/classes/ActiveSupport/Testing/FileFixtures.html index 09c8963481..098c7885c5 100644 --- a/src/classes/ActiveSupport/Testing/FileFixtures.html +++ b/src/classes/ActiveSupport/Testing/FileFixtures.html @@ -70,19 +70,13 @@

    Methods

    Instance Public methods

    -

    - - file_fixture(fixture_name) - -

    +

    file_fixture(fixture_name)

    - -
    -

    Returns a Pathname to the fixture file named fixture_name.

    +
    +

    Returns a Pathname to the fixture file named fixture_name.

    Raises ArgumentError if fixture_name can’t be found.

    -
    - +
    diff --git a/src/classes/ActiveSupport/Testing/Isolation.html b/src/classes/ActiveSupport/Testing/Isolation.html index 8631679c2e..a42c0e1315 100644 --- a/src/classes/ActiveSupport/Testing/Isolation.html +++ b/src/classes/ActiveSupport/Testing/Isolation.html @@ -89,17 +89,9 @@

    Constants

    Class Public methods

    -

    - - forking_env?() - -

    +

    forking_env?()

    -
    - -
    - @@ -128,17 +120,9 @@

    Instance Public methods

    -

    - - run() - -

    +

    run()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Testing/Isolation/Forking.html b/src/classes/ActiveSupport/Testing/Isolation/Forking.html index a1d4d6cf9e..38febcd03d 100644 --- a/src/classes/ActiveSupport/Testing/Isolation/Forking.html +++ b/src/classes/ActiveSupport/Testing/Isolation/Forking.html @@ -58,17 +58,9 @@

    Methods

    Instance Public methods

    -

    - - run_in_isolation(&blk) - -

    +

    run_in_isolation(&blk)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html b/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html index 0630d6b0d4..86b49c0846 100644 --- a/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html +++ b/src/classes/ActiveSupport/Testing/Isolation/Subprocess.html @@ -71,17 +71,11 @@

    Constants

    Instance Public methods

    -

    - - run_in_isolation(&blk) - -

    +

    run_in_isolation(&blk)

    - -
    -

    Complicated H4X to get this working in Windows / JRuby with no forking.

    -
    - +
    +

    Complicated H4X to get this working in Windows / JRuby with no forking.

    +
    diff --git a/src/classes/ActiveSupport/Testing/NotificationAssertions.html b/src/classes/ActiveSupport/Testing/NotificationAssertions.html index f3f0fb5d0a..9ba429e001 100644 --- a/src/classes/ActiveSupport/Testing/NotificationAssertions.html +++ b/src/classes/ActiveSupport/Testing/NotificationAssertions.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - assert_no_notifications(pattern = nil, &block) - -

    +

    assert_no_notifications(pattern = nil, &block)

    - -
    -

    Assert no notifications were emitted for a given pattern.

    +
    +

    Assert no notifications were emitted for a given pattern.

    You can assert no notifications were emitted by passing a pattern, which accepts either a string or regexp, and a block. While the block is executed, if no matching notifications are emitted, the assertion will pass.

    @@ -86,8 +81,7 @@

    post.destroy # => emits non-matching notification end -

    - +
    @@ -118,15 +112,10 @@

    -

    - - assert_notification(pattern, payload = nil, &block) - -

    +

    assert_notification(pattern, payload = nil, &block)

    - -
    -

    Assert a notification was emitted with a given pattern and optional payload.

    +
    +

    Assert a notification was emitted with a given pattern and optional payload.

    You can assert that a notification was emitted by passing a pattern, which accepts either a string or regexp, an optional payload, and a block. While the block is executed, if a matching notification is emitted, the assertion will pass and the notification will be returned.

    @@ -145,8 +134,7 @@

    assert_instance_of(Body, notification.payload[:body]) -

    - +
    @@ -179,15 +167,10 @@

    -

    - - assert_notifications_count(pattern, count, &block) - -

    +

    assert_notifications_count(pattern, count, &block)

    - -
    -

    Assert the number of notifications emitted with a given pattern.

    +
    +

    Assert the number of notifications emitted with a given pattern.

    You can assert the number of notifications emitted by passing a pattern, which accepts either a string or regexp, a count, and a block. While the block is executed, the number of matching notifications emitted will be counted. After the block’s execution completes, the assertion will pass if the count matches.

    @@ -195,8 +178,7 @@

    post.submit(title: "Cool Post") # => emits matching notification end -

    - +
    @@ -222,15 +204,10 @@

    -

    - - capture_notifications(pattern = nil, &block) - -

    +

    capture_notifications(pattern = nil, &block)

    - -
    -

    Capture emitted notifications, optionally filtered by a pattern.

    +
    +

    Capture emitted notifications, optionally filtered by a pattern.

    You can capture emitted notifications, optionally filtered by a pattern, which accepts either a string or regexp, and a block.

    @@ -238,8 +215,7 @@

    post.submit(title: "Cool Post") # => emits matching notification end -

    - +
    diff --git a/src/classes/ActiveSupport/Testing/Parallelization/Server.html b/src/classes/ActiveSupport/Testing/Parallelization/Server.html index 47103f2898..b4161a3129 100644 --- a/src/classes/ActiveSupport/Testing/Parallelization/Server.html +++ b/src/classes/ActiveSupport/Testing/Parallelization/Server.html @@ -111,17 +111,9 @@

    Included Modules

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -153,17 +145,9 @@

    Instance Public methods

    -

    - - <<(o) - -

    +

    <<(o)

    -
    - -
    - @@ -189,17 +173,9 @@

    -

    - - active_workers?() - -

    +

    active_workers?()

    -
    - -
    - @@ -224,17 +200,9 @@

    -

    - - interrupt() - -

    +

    interrupt()

    -
    - -
    - @@ -259,17 +227,9 @@

    -

    - - pop() - -

    +

    pop()

    -
    - -
    - @@ -297,17 +257,9 @@

    -

    - - record(reporter, result) - -

    +

    record(reporter, result)

    -
    - -
    - @@ -339,17 +291,9 @@

    -

    - - remove_dead_workers(dead_pids) - -

    +

    remove_dead_workers(dead_pids)

    -
    - -
    - @@ -380,17 +324,9 @@

    -

    - - shutdown() - -

    +

    shutdown()

    -
    - -
    - @@ -435,17 +371,9 @@

    -

    - - start_worker(worker_id, worker_pid) - -

    +

    start_worker(worker_id, worker_pid)

    -
    - -
    - @@ -471,17 +399,9 @@

    -

    - - stop_worker(worker_id, worker_pid) - -

    +

    stop_worker(worker_id, worker_pid)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Testing/Parallelization/Worker.html b/src/classes/ActiveSupport/Testing/Parallelization/Worker.html index 7a6489314d..5041fac671 100644 --- a/src/classes/ActiveSupport/Testing/Parallelization/Worker.html +++ b/src/classes/ActiveSupport/Testing/Parallelization/Worker.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new(number, url) - -

    +

    new(number, url)

    -
    - -
    - @@ -129,17 +121,9 @@

    Instance Public methods

    -

    - - after_fork() - -

    +

    after_fork()

    -
    - -
    - @@ -168,17 +152,9 @@

    -

    - - perform_job(job) - -

    +

    perform_job(job)

    -
    - -
    - @@ -213,17 +189,9 @@

    -

    - - run_cleanup() - -

    +

    run_cleanup()

    -
    - -
    - @@ -250,17 +218,9 @@

    -

    - - safe_record(reporter, result) - -

    +

    safe_record(reporter, result)

    -
    - -
    - @@ -305,17 +265,9 @@

    -

    - - start() - -

    +

    start()

    -
    - -
    - @@ -358,17 +310,9 @@

    -

    - - work_from_queue() - -

    +

    work_from_queue()

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Testing/SetupAndTeardown.html b/src/classes/ActiveSupport/Testing/SetupAndTeardown.html index 9819dca5d0..ea0b9cc8af 100644 --- a/src/classes/ActiveSupport/Testing/SetupAndTeardown.html +++ b/src/classes/ActiveSupport/Testing/SetupAndTeardown.html @@ -101,17 +101,9 @@

    Included Modules

    Class Public methods

    -

    - - prepended(klass) - -

    +

    prepended(klass)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html b/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html index 50be2f97e7..60bbb168f1 100644 --- a/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html +++ b/src/classes/ActiveSupport/Testing/SetupAndTeardown/ClassMethods.html @@ -62,17 +62,11 @@

    Methods

    Instance Public methods

    -

    - - setup(*args, &block) - -

    +

    setup(*args, &block)

    - -
    -

    Add a callback, which runs before TestCase#setup.

    -
    - +
    +

    Add a callback, which runs before TestCase#setup.

    +
    @@ -97,17 +91,11 @@

    -

    - - teardown(*args, &block) - -

    +

    teardown(*args, &block)

    - -
    -

    Add a callback, which runs after TestCase#teardown.

    -
    - +
    +

    Add a callback, which runs after TestCase#teardown.

    +
    diff --git a/src/classes/ActiveSupport/Testing/TimeHelpers.html b/src/classes/ActiveSupport/Testing/TimeHelpers.html index 7031692119..5934b9e87d 100644 --- a/src/classes/ActiveSupport/Testing/TimeHelpers.html +++ b/src/classes/ActiveSupport/Testing/TimeHelpers.html @@ -84,17 +84,9 @@

    Methods

    Instance Public methods

    -

    - - after_teardown() - -

    +

    after_teardown()

    -
    - -
    - @@ -120,15 +112,10 @@

    -

    - - freeze_time(date_or_time = Time.now, with_usec: false, &block) - -

    +

    freeze_time(date_or_time = Time.now, with_usec: false, &block)

    - -
    -

    Calls travel_to with date_or_time, which defaults to Time.now. Forwards optional with_usec argument.

    +
    +

    Calls travel_to with date_or_time, which defaults to Time.now. Forwards optional with_usec argument.

    Time.current # => Sun, 09 Jul 2017 15:34:49 EST -05:00
     freeze_time
    @@ -148,8 +135,7 @@ 

    end Time.current # => Sun, 09 Jul 2017 15:34:50 EST -05:00

    -
    - +
    @@ -174,15 +160,10 @@

    -

    - - travel(duration, with_usec: false, &block) - -

    +

    travel(duration, with_usec: false, &block)

    - -
    -

    Changes current time to the time in the future or in the past by a given time difference by stubbing Time.now, Date.today, and DateTime.now. The stubs are automatically removed at the end of the test.

    +
    +

    Changes current time to the time in the future or in the past by a given time difference by stubbing Time.now, Date.today, and DateTime.now. The stubs are automatically removed at the end of the test.

    Note that the usec for the resulting time will be set to 0 to prevent rounding errors with external services, like MySQL (which will round instead of floor, leading to off-by-one-second errors), unless the with_usec argument is set to true.

    @@ -201,8 +182,7 @@

    end Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00 -

    - +
    @@ -227,15 +207,10 @@

    -

    - - travel_back() - -

    +

    travel_back()

    - -
    -

    Returns the current time back to its original state, by removing the stubs added by travel, travel_to, and freeze_time.

    +
    +

    Returns the current time back to its original state, by removing the stubs added by travel, travel_to, and freeze_time.

    Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00
     
    @@ -259,13 +234,14 @@ 

    Time.current # => Wed, 24 Nov 2004 01:04:44 EST -05:00

    -
    - +
    -
    - Also aliased as: unfreeze_time -
    +

    + Also aliased as: + + unfreeze_time. +

    @@ -294,15 +270,10 @@

    -

    - - travel_to(date_or_time, with_usec: false) - -

    +

    travel_to(date_or_time, with_usec: false)

    - -
    -

    Changes current time to the given time by stubbing Time.now, Time.new, Date.today, and DateTime.now to return the time or date passed into this method. The stubs are automatically removed at the end of the test.

    +
    +

    Changes current time to the given time by stubbing Time.now, Time.new, Date.today, and DateTime.now to return the time or date passed into this method. The stubs are automatically removed at the end of the test.

    Time.current     # => Sat, 09 Nov 2013 15:34:49 EST -05:00
     travel_to Time.zone.local(2004, 11, 24, 1, 4, 44)
    @@ -323,8 +294,7 @@ 

    end Time.current # => Sat, 09 Nov 2013 15:34:49 EST -05:00

    -
    - +
    @@ -420,24 +390,17 @@

    -

    - - unfreeze_time() - -

    +

    unfreeze_time()

    -
    - -
    - -
    - Alias for: travel_back -
    +

    + Alias for: + travel_back. +

    diff --git a/src/classes/ActiveSupport/TimeWithZone.html b/src/classes/ActiveSupport/TimeWithZone.html index 6668ed2226..5a1236373b 100644 --- a/src/classes/ActiveSupport/TimeWithZone.html +++ b/src/classes/ActiveSupport/TimeWithZone.html @@ -396,17 +396,9 @@

    Attributes

    Class Public methods

    -

    - - new(utc_time, time_zone, local_time = nil, period = nil) - -

    +

    new(utc_time, time_zone, local_time = nil, period = nil)

    -
    - -
    - @@ -443,15 +435,10 @@

    Instance Public methods

    -

    - - +(other) - -

    +

    +(other)

    - -
    -

    Adds an interval of time to the current object’s time and returns that value as a new TimeWithZone object.

    +
    +

    Adds an interval of time to the current object’s time and returns that value as a new TimeWithZone object.

    Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
     now = Time.zone.now # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00
    @@ -465,13 +452,14 @@ 

    now + 24.hours      # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00
     now + 1.day         # => Mon, 03 Nov 2014 01:26:28.725182881 EST -05:00
     
    -

    - +
    -
    - Also aliased as: since, in -
    +

    + Also aliased as: + + since, in. +

    @@ -501,15 +489,10 @@

    -

    - - -(other) - -

    +

    -(other)

    - -
    -

    Subtracts an interval of time and returns a new TimeWithZone object unless the other value acts_like? time. In which case, it will subtract the other time and return the difference in seconds as a Float.

    +
    +

    Subtracts an interval of time and returns a new TimeWithZone object unless the other value acts_like? time. In which case, it will subtract the other time and return the difference in seconds as a Float.

    Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
     now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00
    @@ -528,8 +511,7 @@ 

    Time.zone.now - 1.day.ago # => 86399.999967
     
    -

    - +
    @@ -561,17 +543,11 @@

    -

    - - <=>(other) - -

    +

    <=>(other)

    - -
    -

    Use the time in UTC for comparisons.

    -
    - +
    +

    Use the time in UTC for comparisons.

    +
    @@ -596,17 +572,11 @@

    -

    - - acts_like_time?() - -

    +

    acts_like_time?()

    - -
    -

    So that self acts_like?(:time).

    -
    - +
    +

    So that self acts_like?(:time).

    +
    @@ -631,15 +601,10 @@

    -

    - - advance(options) - -

    +

    advance(options)

    - -
    -

    Uses Date to provide precise Time calculations for years, months, and days according to the proleptic Gregorian calendar. The result is returned as a new TimeWithZone object.

    +
    +

    Uses Date to provide precise Time calculations for years, months, and days according to the proleptic Gregorian calendar. The result is returned as a new TimeWithZone object.

    The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.

    @@ -655,8 +620,7 @@

    now.advance(months: 1) # => Tue, 02 Dec 2014 01:26:28.558049687 EST -05:00 now.advance(years: 1) # => Mon, 02 Nov 2015 01:26:28.558049687 EST -05:00 -

    - +
    @@ -687,15 +651,10 @@

    -

    - - ago(other) - -

    +

    ago(other)

    - -
    -

    Subtracts an interval of time from the current object’s time and returns the result as a new TimeWithZone object.

    +
    +

    Subtracts an interval of time from the current object’s time and returns the result as a new TimeWithZone object.

    Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)'
     now = Time.zone.now # => Mon, 03 Nov 2014 00:26:28.725182881 EST -05:00
    @@ -709,8 +668,7 @@ 

    now.ago(24.hours)   # => Sun, 02 Nov 2014 01:26:28.725182881 EDT -04:00
     now.ago(1.day)      # => Sun, 02 Nov 2014 00:26:28.725182881 EDT -04:00
     
    -

    - +
    @@ -735,15 +693,10 @@

    -

    - - as_json(options = nil) - -

    +

    as_json(options = nil)

    - -
    -

    Coerces time to a string for JSON encoding. The default format is ISO 8601. You can get %Y/%m/%d %H:%M:%S +offset style by setting ActiveSupport::JSON::Encoding.use_standard_json_time_format to false.

    +
    +

    Coerces time to a string for JSON encoding. The default format is ISO 8601. You can get %Y/%m/%d %H:%M:%S +offset style by setting ActiveSupport::JSON::Encoding.use_standard_json_time_format to false.

    # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
     Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json
    @@ -753,8 +706,7 @@ 

    Time.utc(2005,2,1,15,15,10).in_time_zone("Hawaii").as_json # => "2005/02/01 05:15:10 -1000"

    -
    - +
    @@ -783,17 +735,11 @@

    -

    - - between?(min, max) - -

    +

    between?(min, max)

    - -
    -

    Returns true if the current object’s time is within the specified min and max time.

    -
    - +
    +

    Returns true if the current object’s time is within the specified min and max time.

    +
    @@ -818,17 +764,11 @@

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    An instance of ActiveSupport::TimeWithZone is never blank

    -
    - +
    +

    An instance of ActiveSupport::TimeWithZone is never blank

    +
    @@ -853,15 +793,10 @@

    -

    - - change(options) - -

    +

    change(options)

    - -
    -

    Returns a new ActiveSupport::TimeWithZone where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec, :usec, :nsec) reset cascadingly, so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour and minute is passed, then sec, usec, and nsec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :usec, :nsec, :offset, :zone. Pass either :usec or :nsec, not both. Similarly, pass either :zone or :offset, not both.

    +
    +

    Returns a new ActiveSupport::TimeWithZone where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec, :usec, :nsec) reset cascadingly, so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour and minute is passed, then sec, usec, and nsec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :usec, :nsec, :offset, :zone. Pass either :usec or :nsec, not both. Similarly, pass either :zone or :offset, not both.

    t = Time.zone.now          # => Fri, 14 Apr 2017 11:45:15.116992711 EST -05:00
     t.change(year: 2020)       # => Tue, 14 Apr 2020 11:45:15.116992711 EST -05:00
    @@ -870,8 +805,7 @@ 

    t.change(offset: "-10:00") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00 t.change(zone: "Hawaii") # => Fri, 14 Apr 2017 11:45:15.116992711 HST -10:00

    -
    - +
    @@ -911,24 +845,17 @@

    -

    - - comparable_time() - -

    +

    comparable_time()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -936,27 +863,23 @@

    -

    - - dst?() - -

    +

    dst?()

    - -
    -

    Returns true if the current time is within Daylight Savings Time for the specified time zone.

    +
    +

    Returns true if the current time is within Daylight Savings Time for the specified time zone.

    Time.zone = 'Eastern Time (US & Canada)'    # => 'Eastern Time (US & Canada)'
     Time.zone.parse("2012-5-30").dst?           # => true
     Time.zone.parse("2012-11-30").dst?          # => false
     
    -
    - +
    -
    - Also aliased as: isdst -
    +

    + Also aliased as: + + isdst. +

    @@ -980,17 +903,11 @@

    -

    - - eql?(other) - -

    +

    eql?(other)

    - -
    -

    Returns true if other is equal to current object.

    -
    - +
    +

    Returns true if other is equal to current object.

    +
    @@ -1015,15 +932,10 @@

    -

    - - formatted_offset(colon = true, alternate_utc_string = nil) - -

    +

    formatted_offset(colon = true, alternate_utc_string = nil)

    - -
    -

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    +
    +

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    Time.zone = 'Eastern Time (US & Canada)'   # => "Eastern Time (US & Canada)"
     Time.zone.now.formatted_offset(true)       # => "-05:00"
    @@ -1031,8 +943,7 @@ 

    Time.zone = 'UTC' # => "UTC" Time.zone.now.formatted_offset(true, "0") # => "0"

    -
    - +
    @@ -1057,17 +968,9 @@

    -

    - - freeze() - -

    +

    freeze()

    -
    - -
    - @@ -1094,17 +997,11 @@

    -

    - - future?() - -

    +

    future?()

    - -
    -

    Returns true if the current object’s time is in the future.

    -
    - +
    +

    Returns true if the current object’s time is in the future.

    +
    @@ -1129,24 +1026,17 @@

    -

    - - getgm() - -

    +

    getgm()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -1154,24 +1044,17 @@

    -

    - - getlocal(utc_offset = nil) - -

    +

    getlocal(utc_offset = nil)

    -
    - -
    - -
    - Alias for: localtime -
    +

    + Alias for: + localtime. +

    @@ -1179,24 +1062,17 @@

    -

    - - getutc() - -

    +

    getutc()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -1204,24 +1080,17 @@

    -

    - - gmt?() - -

    +

    gmt?()

    -
    - -
    - -
    - Alias for: utc? -
    +

    + Alias for: + utc?. +

    @@ -1229,24 +1098,17 @@

    -

    - - gmt_offset() - -

    +

    gmt_offset()

    -
    - -
    - -
    - Alias for: utc_offset -
    +

    + Alias for: + utc_offset. +

    @@ -1254,24 +1116,17 @@

    -

    - - gmtime() - -

    +

    gmtime()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -1279,24 +1134,17 @@

    -

    - - gmtoff() - -

    +

    gmtoff()

    -
    - -
    - -
    - Alias for: utc_offset -
    +

    + Alias for: + utc_offset. +

    @@ -1304,17 +1152,9 @@

    -

    - - hash() - -

    +

    hash()

    -
    - -
    - @@ -1339,20 +1179,14 @@

    -

    - - httpdate() - -

    +

    httpdate()

    - -
    -

    Returns a string of the object’s date and time in the format used by HTTP requests.

    +
    +

    Returns a string of the object’s date and time in the format used by HTTP requests.

    Time.zone.now.httpdate  # => "Tue, 01 Jan 2013 04:39:43 GMT"
     
    -
    - +
    @@ -1377,24 +1211,17 @@

    -

    - - in(other) - -

    +

    in(other)

    -
    - -
    - -
    - Alias for: + -
    +

    + Alias for: + +. +

    @@ -1402,17 +1229,11 @@

    -

    - - in_time_zone(new_zone = ::Time.zone) - -

    +

    in_time_zone(new_zone = ::Time.zone)

    - -
    -

    Returns the simultaneous time in Time.zone, or the specified zone.

    -
    - +
    +

    Returns the simultaneous time in Time.zone, or the specified zone.

    +
    @@ -1438,20 +1259,14 @@

    -

    - - inspect() - -

    +

    inspect()

    - -
    -

    Returns a string of the object’s date, time, zone, and offset from UTC.

    +
    +

    Returns a string of the object’s date, time, zone, and offset from UTC.

    Time.zone.now.inspect # => "2024-11-13 07:00:10.528054960 UTC +00:00"
     
    -
    - +
    @@ -1476,22 +1291,18 @@

    -

    - - is_a?(klass) - -

    +

    is_a?(klass)

    - -
    -

    Say we’re a Time to thwart type checking.

    -
    - +
    +

    Say we’re a Time to thwart type checking.

    +
    -
    - Also aliased as: kind_of? -
    +

    + Also aliased as: + + kind_of?. +

    @@ -1515,24 +1326,17 @@

    -

    - - isdst() - -

    +

    isdst()

    -
    - -
    - -
    - Alias for: dst? -
    +

    + Alias for: + dst?. +

    @@ -1540,24 +1344,17 @@

    -

    - - iso8601(fraction_digits = 0) - -

    +

    iso8601(fraction_digits = 0)

    -
    - -
    - -
    - Alias for: xmlschema -
    +

    + Alias for: + xmlschema. +

    @@ -1565,24 +1362,17 @@

    -

    - - kind_of?(klass) - -

    +

    kind_of?(klass)

    -
    - -
    - -
    - Alias for: is_a? -
    +

    + Alias for: + is_a?. +

    @@ -1590,22 +1380,18 @@

    -

    - - localtime(utc_offset = nil) - -

    +

    localtime(utc_offset = nil)

    - -
    -

    Returns a Time instance of the simultaneous time in the system timezone.

    -
    - +
    +

    Returns a Time instance of the simultaneous time in the system timezone.

    +
    -
    - Also aliased as: getlocal -
    +

    + Also aliased as: + + getlocal. +

    @@ -1629,17 +1415,9 @@

    -

    - - marshal_dump() - -

    +

    marshal_dump()

    -
    - -
    - @@ -1664,17 +1442,9 @@

    -

    - - marshal_load(variables) - -

    +

    marshal_load(variables)

    -
    - -
    - @@ -1699,17 +1469,11 @@

    -

    - - method_missing(...) - -

    +

    method_missing(...)

    - -
    -

    Send the missing method to time instance, and wrap result in a new TimeWithZone with the existing time_zone.

    -
    - +
    +

    Send the missing method to time instance, and wrap result in a new TimeWithZone with the existing time_zone.

    +
    @@ -1736,24 +1500,17 @@

    -

    - - next_day?() - -

    +

    next_day?()

    -
    - -
    - -
    - Alias for: tomorrow? -
    +

    + Alias for: + tomorrow?. +

    @@ -1761,17 +1518,11 @@

    -

    - - past?() - -

    +

    past?()

    - -
    -

    Returns true if the current object’s time is in the past.

    -
    - +
    +

    Returns true if the current object’s time is in the past.

    +
    @@ -1796,17 +1547,11 @@

    -

    - - period() - -

    +

    period()

    - -
    -

    Returns the underlying TZInfo::TimezonePeriod.

    -
    - +
    +

    Returns the underlying TZInfo::TimezonePeriod.

    +
    @@ -1831,24 +1576,17 @@

    -

    - - prev_day?() - -

    +

    prev_day?()

    -
    - -
    - -
    - Alias for: yesterday? -
    +

    + Alias for: + yesterday?. +

    @@ -1856,17 +1594,11 @@

    -

    - - respond_to?(sym, include_priv = false) - -

    +

    respond_to?(sym, include_priv = false)

    - -
    -

    respond_to_missing? is not called in some cases, such as when type conversion is performed with Kernel#String

    -
    - +
    +

    respond_to_missing? is not called in some cases, such as when type conversion is performed with Kernel#String

    +
    @@ -1893,17 +1625,11 @@

    -

    - - respond_to_missing?(sym, include_priv) - -

    +

    respond_to_missing?(sym, include_priv)

    - -
    -

    Ensure proxy class responds to all methods that underlying time instance responds to.

    -
    - +
    +

    Ensure proxy class responds to all methods that underlying time instance responds to.

    +
    @@ -1928,25 +1654,21 @@

    -

    - - rfc2822() - -

    +

    rfc2822()

    - -
    -

    Returns a string of the object’s date and time in the RFC 2822 standard format.

    +
    +

    Returns a string of the object’s date and time in the RFC 2822 standard format.

    Time.zone.now.rfc2822  # => "Tue, 01 Jan 2013 04:51:39 +0000"
     
    -
    - +
    -
    - Also aliased as: rfc822 -
    +

    + Also aliased as: + + rfc822. +

    @@ -1970,24 +1692,17 @@

    -

    - - rfc3339(fraction_digits = 0) - -

    +

    rfc3339(fraction_digits = 0)

    -
    - -
    - -
    - Alias for: xmlschema -
    +

    + Alias for: + xmlschema. +

    @@ -1995,24 +1710,17 @@

    -

    - - rfc822() - -

    +

    rfc822()

    -
    - -
    - -
    - Alias for: rfc2822 -
    +

    + Alias for: + rfc2822. +

    @@ -2020,24 +1728,17 @@

    -

    - - since(other) - -

    +

    since(other)

    -
    - -
    - -
    - Alias for: + -
    +

    + Alias for: + +. +

    @@ -2045,17 +1746,11 @@

    -

    - - strftime(format) - -

    +

    strftime(format)

    - -
    -

    Replaces %Z directive with +zone before passing to Time#strftime, so that zone information is correct.

    -
    - +
    +

    Replaces %Z directive with +zone before passing to Time#strftime, so that zone information is correct.

    +
    @@ -2081,17 +1776,11 @@

    -

    - - time() - -

    +

    time()

    - -
    -

    Returns a Time instance that represents the time in time_zone.

    -
    - +
    +

    Returns a Time instance that represents the time in time_zone.

    +
    @@ -2116,21 +1805,15 @@

    -

    - - to_a() - -

    +

    to_a()

    - -
    -

    Returns Array of parts of Time in sequence of [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone].

    +
    +

    Returns Array of parts of Time in sequence of [seconds, minutes, hours, day, month, year, weekday, yearday, dst?, zone].

    now = Time.zone.now     # => Tue, 18 Aug 2015 02:29:27.485278555 UTC +00:00
     now.to_a                # => [27, 29, 2, 18, 8, 2015, 2, 230, false, "UTC"]
     
    -
    - +
    @@ -2155,21 +1838,15 @@

    -

    - - to_datetime() - -

    +

    to_datetime()

    - -
    -

    Returns an instance of DateTime with the timezone’s UTC offset

    +
    +

    Returns an instance of DateTime with the timezone’s UTC offset

    Time.zone.now.to_datetime                         # => Tue, 18 Aug 2015 02:32:20 +0000
     Time.current.in_time_zone('Hawaii').to_datetime   # => Mon, 17 Aug 2015 16:32:20 -1000
     
    -
    - +
    @@ -2194,20 +1871,14 @@

    -

    - - to_f() - -

    +

    to_f()

    - -
    -

    Returns the object’s date and time as a floating-point number of seconds since the Epoch (January 1, 1970 00:00 UTC).

    +
    +

    Returns the object’s date and time as a floating-point number of seconds since the Epoch (January 1, 1970 00:00 UTC).

    Time.zone.now.to_f # => 1417709320.285418
     
    -
    - +
    @@ -2232,24 +1903,17 @@

    -

    - - to_formatted_s(format = :default) - -

    +

    to_formatted_s(format = :default)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -2257,15 +1921,10 @@

    -

    - - to_fs(format = :default) - -

    +

    to_fs(format = :default)

    - -
    -

    Returns a string of the object’s date and time.

    +
    +

    Returns a string of the object’s date and time.

    This method is aliased to to_formatted_s.

    @@ -2277,13 +1936,14 @@

  • Any key in Time::DATE_FORMATS can be used. See active_support/core_ext/time/conversions.rb.

  • -

    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    @@ -2313,25 +1973,21 @@

    -

    - - to_i() - -

    +

    to_i()

    - -
    -

    Returns the object’s date and time as an integer number of seconds since the Epoch (January 1, 1970 00:00 UTC).

    +
    +

    Returns the object’s date and time as an integer number of seconds since the Epoch (January 1, 1970 00:00 UTC).

    Time.zone.now.to_i # => 1417709320
     
    -
    - +
    -
    - Also aliased as: tv_sec -
    +

    + Also aliased as: + + tv_sec. +

    @@ -2355,20 +2011,14 @@

    -

    - - to_r() - -

    +

    to_r()

    - -
    -

    Returns the object’s date and time as a rational number of seconds since the Epoch (January 1, 1970 00:00 UTC).

    +
    +

    Returns the object’s date and time as a rational number of seconds since the Epoch (January 1, 1970 00:00 UTC).

    Time.zone.now.to_r # => (708854548642709/500000)
     
    -
    - +
    @@ -2393,17 +2043,11 @@

    -

    - - to_s() - -

    +

    to_s()

    - -
    -

    Returns a string of the object’s date and time.

    -
    - +
    +

    Returns a string of the object’s date and time.

    +
    @@ -2428,17 +2072,11 @@

    -

    - - to_time() - -

    +

    to_time()

    - -
    -

    Returns an instance of Time, either with the same timezone as self, with the same UTC offset as self or in the local system timezone depending on the setting of ActiveSupport.to_time_preserves_timezone.

    -
    - +
    +

    Returns an instance of Time, either with the same timezone as self, with the same UTC offset as self or in the local system timezone depending on the setting of ActiveSupport.to_time_preserves_timezone.

    +
    @@ -2463,17 +2101,11 @@

    -

    - - today?() - -

    +

    today?()

    - -
    -

    Returns true if the current object’s time falls within the current day.

    -
    - +
    +

    Returns true if the current object’s time falls within the current day.

    +
    @@ -2498,22 +2130,18 @@

    -

    - - tomorrow?() - -

    +

    tomorrow?()

    - -
    -

    Returns true if the current object’s time falls within the next day (tomorrow).

    -
    - +
    +

    Returns true if the current object’s time falls within the next day (tomorrow).

    +
    -
    - Also aliased as: next_day? -
    +

    + Also aliased as: + + next_day?. +

    @@ -2537,24 +2165,17 @@

    -

    - - tv_sec() - -

    +

    tv_sec()

    -
    - -
    - -
    - Alias for: to_i -
    +

    + Alias for: + to_i. +

    @@ -2562,22 +2183,18 @@

    -

    - - utc() - -

    +

    utc()

    - -
    -

    Returns a Time instance of the simultaneous time in the UTC timezone.

    -
    - +
    +

    Returns a Time instance of the simultaneous time in the UTC timezone.

    +
    -
    - Also aliased as: comparable_time, getgm, getutc, gmtime -
    +

    + Also aliased as: + + comparable_time, getgm, getutc, gmtime. +

    @@ -2601,28 +2218,24 @@

    -

    - - utc?() - -

    +

    utc?()

    - -
    -

    Returns true if the current time zone is set to UTC.

    +
    +

    Returns true if the current time zone is set to UTC.

    Time.zone = 'UTC'                           # => 'UTC'
     Time.zone.now.utc?                          # => true
     Time.zone = 'Eastern Time (US & Canada)'    # => 'Eastern Time (US & Canada)'
     Time.zone.now.utc?                          # => false
     
    -
    - +
    -
    - Also aliased as: gmt? -
    +

    + Also aliased as: + + gmt?. +

    @@ -2646,22 +2259,18 @@

    -

    - - utc_offset() - -

    +

    utc_offset()

    - -
    -

    Returns the offset from current time to UTC time in seconds.

    -
    - +
    +

    Returns the offset from current time to UTC time in seconds.

    +
    -
    - Also aliased as: gmt_offset, gmtoff -
    +

    + Also aliased as: + + gmt_offset, gmtoff. +

    @@ -2685,25 +2294,21 @@

    -

    - - xmlschema(fraction_digits = 0) - -

    +

    xmlschema(fraction_digits = 0)

    - -
    -

    Returns a string of the object’s date and time in the ISO 8601 standard format.

    +
    +

    Returns a string of the object’s date and time in the ISO 8601 standard format.

    Time.zone.now.xmlschema  # => "2014-12-04T11:02:37-05:00"
     
    -
    - +
    -
    - Also aliased as: iso8601, rfc3339 -
    +

    + Also aliased as: + + iso8601, rfc3339. +

    @@ -2733,22 +2338,18 @@

    -

    - - yesterday?() - -

    +

    yesterday?()

    - -
    -

    Returns true if the current object’s time falls within the previous day (yesterday).

    -
    - +
    +

    Returns true if the current object’s time falls within the previous day (yesterday).

    +
    -
    - Also aliased as: prev_day? -
    +

    + Also aliased as: + + prev_day?. +

    @@ -2772,21 +2373,15 @@

    -

    - - zone() - -

    +

    zone()

    - -
    -

    Returns the time zone abbreviation.

    +
    +

    Returns the time zone abbreviation.

    Time.zone = 'Eastern Time (US & Canada)'   # => "Eastern Time (US & Canada)"
     Time.zone.now.zone # => "EST"
     
    -
    - +
    diff --git a/src/classes/ActiveSupport/TimeZone.html b/src/classes/ActiveSupport/TimeZone.html index 1231da958c..f418b9f4dc 100644 --- a/src/classes/ActiveSupport/TimeZone.html +++ b/src/classes/ActiveSupport/TimeZone.html @@ -401,17 +401,11 @@

    Attributes

    Class Public methods

    -

    - - [](arg) - -

    +

    [](arg)

    - -
    -

    Locate a specific time zone object. If the argument is a string, it is interpreted to mean the name of the timezone to locate. If it is a numeric value it is either the hour offset, or the second offset, of the timezone to find. (The first one with that offset will be returned.) Returns nil if no such time zone is known to the system.

    -
    - +
    +

    Locate a specific time zone object. If the argument is a string, it is interpreted to mean the name of the timezone to locate. If it is a numeric value it is either the hour offset, or the second offset, of the timezone to find. (The first one with that offset will be returned.) Returns nil if no such time zone is known to the system.

    +
    @@ -452,17 +446,11 @@

    -

    - - all() - -

    +

    all()

    - -
    -

    Returns an array of all TimeZone objects. There are multiple TimeZone objects per time zone, in many cases, to make it easier for users to find their own time zone.

    -
    - +
    +

    Returns an array of all TimeZone objects. There are multiple TimeZone objects per time zone, in many cases, to make it easier for users to find their own time zone.

    +
    @@ -487,17 +475,11 @@

    -

    - - country_zones(country_code) - -

    +

    country_zones(country_code)

    - -
    -

    A convenience method for returning a collection of TimeZone objects for time zones in the country specified by its ISO 3166-1 Alpha2 code.

    -
    - +
    +

    A convenience method for returning a collection of TimeZone objects for time zones in the country specified by its ISO 3166-1 Alpha2 code.

    +
    @@ -523,18 +505,12 @@

    -

    - - create(name, utc_offset = nil, tzinfo = nil) - - -

    +

    create(name, utc_offset = nil, tzinfo = nil) +

    - -
    -

    Create a new TimeZone object with the given name and offset. The offset is the number of seconds that this time zone is offset from UTC (GMT). Seconds were chosen as the offset unit because that is the unit that Ruby uses to represent time zone offsets (see Time#utc_offset).

    -
    - +
    +

    Create a new TimeZone object with the given name and offset. The offset is the number of seconds that this time zone is offset from UTC (GMT). Seconds were chosen as the offset unit because that is the unit that Ruby uses to represent time zone offsets (see Time#utc_offset).

    +
    @@ -547,17 +523,9 @@

    -

    - - find_tzinfo(name) - -

    +

    find_tzinfo(name)

    -
    - -
    - @@ -582,17 +550,11 @@

    -

    - - new(name) - -

    +

    new(name)

    - -
    -

    Returns a TimeZone instance with the given name, or nil if no such TimeZone instance exists. (This exists to support the use of this class with the composed_of macro.)

    -
    - +
    +

    Returns a TimeZone instance with the given name, or nil if no such TimeZone instance exists. (This exists to support the use of this class with the composed_of macro.)

    +
    @@ -617,20 +579,14 @@

    -

    - - seconds_to_utc_offset(seconds, colon = true) - -

    +

    seconds_to_utc_offset(seconds, colon = true)

    - -
    -

    Assumes self represents an offset from UTC in seconds (as returned from Time#utc_offset) and turns this into an +HH:MM formatted string.

    +
    +

    Assumes self represents an offset from UTC in seconds (as returned from Time#utc_offset) and turns this into an +HH:MM formatted string.

    ActiveSupport::TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00"
     
    -
    - +
    @@ -659,17 +615,11 @@

    -

    - - us_zones() - -

    +

    us_zones()

    - -
    -

    A convenience method for returning a collection of TimeZone objects for time zones in the USA.

    -
    - +
    +

    A convenience method for returning a collection of TimeZone objects for time zones in the USA.

    +
    @@ -698,17 +648,11 @@

    Instance Public methods

    -

    - - <=>(zone) - -

    +

    <=>(zone)

    - -
    -

    Compare this time zone to the parameter. The two are compared first on their offsets, and then by name.

    -
    - +
    +

    Compare this time zone to the parameter. The two are compared first on their offsets, and then by name.

    +
    @@ -736,17 +680,11 @@

    -

    - - =~(re) - -

    +

    =~(re)

    - -
    -

    Compare name and TZInfo identifier to a supplied regexp, returning true if a match is found.

    -
    - +
    +

    Compare name and TZInfo identifier to a supplied regexp, returning true if a match is found.

    +
    @@ -771,15 +709,10 @@

    -

    - - at(*args) - -

    +

    at(*args)

    - -
    -

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from number of seconds since the Unix epoch.

    +
    +

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from number of seconds since the Unix epoch.

    Time.zone = 'Hawaii'        # => "Hawaii"
     Time.utc(2000).to_f         # => 946684800.0
    @@ -791,8 +724,7 @@ 

    Time.zone = 'Hawaii'                # => "Hawaii"
     Time.at(946684800, 123456.789).nsec # => 123456789
     
    -

    - +
    @@ -817,22 +749,16 @@

    -

    - - formatted_offset(colon = true, alternate_utc_string = nil) - -

    +

    formatted_offset(colon = true, alternate_utc_string = nil)

    - -
    -

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    +
    +

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    zone = ActiveSupport::TimeZone['Central Time (US & Canada)']
     zone.formatted_offset        # => "-06:00"
     zone.formatted_offset(false) # => "-0600"
     
    -
    - +
    @@ -857,15 +783,10 @@

    -

    - - iso8601(str) - -

    +

    iso8601(str)

    - -
    -

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from an ISO 8601 string.

    +
    +

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from an ISO 8601 string.

    Time.zone = 'Hawaii'                     # => "Hawaii"
     Time.zone.iso8601('1999-12-31T14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00
    @@ -878,8 +799,7 @@ 

    If the string is invalid then an ArgumentError will be raised unlike parse which usually returns nil when given an invalid date string.

    -
    - +
    @@ -939,21 +859,15 @@

    -

    - - local(*args) - -

    +

    local(*args)

    - -
    -

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from given values.

    +
    +

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from given values.

    Time.zone = 'Hawaii'                    # => "Hawaii"
     Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00
     
    -
    - +
    @@ -979,17 +893,11 @@

    -

    - - local_to_utc(time, dst = true) - -

    +

    local_to_utc(time, dst = true)

    - -
    -

    Adjust the given time to the simultaneous time in UTC. Returns a Time.utc() instance.

    -
    - +
    +

    Adjust the given time to the simultaneous time in UTC. Returns a Time.utc() instance.

    +
    @@ -1014,17 +922,11 @@

    -

    - - match?(re) - -

    +

    match?(re)

    - -
    -

    Compare name and TZInfo identifier to a supplied regexp, returning true if a match is found.

    -
    - +
    +

    Compare name and TZInfo identifier to a supplied regexp, returning true if a match is found.

    +
    @@ -1050,21 +952,15 @@

    -

    - - now() - -

    +

    now()

    - -
    -

    Returns an ActiveSupport::TimeWithZone instance representing the current time in the time zone represented by self.

    +
    +

    Returns an ActiveSupport::TimeWithZone instance representing the current time in the time zone represented by self.

    Time.zone = 'Hawaii'  # => "Hawaii"
     Time.zone.now         # => Wed, 23 Jan 2008 20:24:27 HST -10:00
     
    -
    - +
    @@ -1089,15 +985,10 @@

    -

    - - parse(str, now = now()) - -

    +

    parse(str, now = now())

    - -
    -

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from parsed string.

    +
    +

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from parsed string.

    Time.zone = 'Hawaii'                   # => "Hawaii"
     Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00
    @@ -1115,8 +1006,7 @@ 

    If the string is invalid then an ArgumentError could be raised.

    -
    - +
    @@ -1141,15 +1031,10 @@

    -

    - - rfc3339(str) - -

    +

    rfc3339(str)

    - -
    -

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from an RFC 3339 string.

    +
    +

    Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from an RFC 3339 string.

    Time.zone = 'Hawaii'                     # => "Hawaii"
     Time.zone.rfc3339('2000-01-01T00:00:00Z') # => Fri, 31 Dec 1999 14:00:00 HST -10:00
    @@ -1160,8 +1045,7 @@ 

    Time.zone = 'Hawaii'            # => "Hawaii"
     Time.zone.rfc3339('1999-12-31') # => ArgumentError: invalid date
     
    -

    - +
    @@ -1200,17 +1084,11 @@

    -

    - - standard_name() - -

    +

    standard_name()

    - -
    -

    Returns a standard time zone name defined by IANA www.iana.org/time-zones

    -
    - +
    +

    Returns a standard time zone name defined by IANA www.iana.org/time-zones

    +
    @@ -1235,15 +1113,10 @@

    -

    - - strptime(str, format, now = now()) - -

    +

    strptime(str, format, now = now())

    - -
    -

    Parses str according to format and returns an ActiveSupport::TimeWithZone.

    +
    +

    Parses str according to format and returns an ActiveSupport::TimeWithZone.

    Assumes that str is a time in the time zone self, unless format includes an explicit time zone. (This is the same behavior as parse.) In either case, the returned TimeWithZone has the timezone of self.

    @@ -1261,8 +1134,7 @@

    Time.zone.strptime('Mar 2000', '%b %Y') # => Wed, 01 Mar 2000 00:00:00 HST -10:00
     
    -

    - +
    @@ -1287,17 +1159,11 @@

    -

    - - to_s() - -

    +

    to_s()

    - -
    -

    Returns a textual representation of this time zone.

    -
    - +
    +

    Returns a textual representation of this time zone.

    +
    @@ -1322,17 +1188,11 @@

    -

    - - today() - -

    +

    today()

    - -
    -

    Returns the current date in this time zone.

    -
    - +
    +

    Returns the current date in this time zone.

    +
    @@ -1357,17 +1217,11 @@

    -

    - - tomorrow() - -

    +

    tomorrow()

    - -
    -

    Returns the next date in this time zone.

    -
    - +
    +

    Returns the next date in this time zone.

    +
    @@ -1392,17 +1246,11 @@

    -

    - - utc_offset() - -

    +

    utc_offset()

    - -
    -

    Returns the offset of this time zone from UTC in seconds.

    -
    - +
    +

    Returns the offset of this time zone from UTC in seconds.

    +
    @@ -1427,19 +1275,13 @@

    -

    - - utc_to_local(time) - -

    +

    utc_to_local(time)

    - -
    -

    Adjust the given time to the simultaneous time in the time zone represented by self. Returns a local time with the appropriate offset – if you want an ActiveSupport::TimeWithZone instance, use Time#in_time_zone() instead.

    +
    +

    Adjust the given time to the simultaneous time in the time zone represented by self. Returns a local time with the appropriate offset – if you want an ActiveSupport::TimeWithZone instance, use Time#in_time_zone() instead.

    As of tzinfo 2, utc_to_local returns a Time with a non-zero utc_offset. See the utc_to_local_returns_utc_offset_times config for more info.

    -
    - +
    @@ -1467,17 +1309,11 @@

    -

    - - yesterday() - -

    +

    yesterday()

    - -
    -

    Returns the previous date in this time zone.

    -
    - +
    +

    Returns the previous date in this time zone.

    +
    diff --git a/src/classes/ActiveSupport/XMLConverter/DisallowedType.html b/src/classes/ActiveSupport/XMLConverter/DisallowedType.html index 883331fba3..7dce3fd997 100644 --- a/src/classes/ActiveSupport/XMLConverter/DisallowedType.html +++ b/src/classes/ActiveSupport/XMLConverter/DisallowedType.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - new(type) - -

    +

    new(type)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/XmlMini.html b/src/classes/ActiveSupport/XmlMini.html index cd18808d74..cd639e1cac 100644 --- a/src/classes/ActiveSupport/XmlMini.html +++ b/src/classes/ActiveSupport/XmlMini.html @@ -179,17 +179,9 @@

    Attributes

    Instance Public methods

    -

    - - backend() - -

    +

    backend()

    -
    - -
    - @@ -214,17 +206,9 @@

    -

    - - backend=(name) - -

    +

    backend=(name)

    -
    - -
    - @@ -251,17 +235,9 @@

    -

    - - rename_key(key, options = {}) - -

    +

    rename_key(key, options = {})

    -
    - -
    - @@ -292,17 +268,9 @@

    -

    - - to_tag(key, value, options) - -

    +

    to_tag(key, value, options)

    -
    - -
    - @@ -356,17 +324,9 @@

    -

    - - with_backend(name) - -

    +

    with_backend(name)

    -
    - -
    - diff --git a/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html b/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html index b89058c17b..f380e2638b 100644 --- a/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html +++ b/src/classes/ActiveSupport/XmlMini_LibXMLSAX/HashBuilder.html @@ -140,17 +140,9 @@

    Attributes

    Instance Public methods

    -

    - - current_hash() - -

    +

    current_hash()

    -
    - -
    - @@ -175,24 +167,17 @@

    -

    - - on_cdata_block(string) - -

    +

    on_cdata_block(string)

    -
    - -
    - -
    - Alias for: on_characters -
    +

    + Alias for: + on_characters. +

    @@ -200,22 +185,16 @@

    -

    - - on_characters(string) - -

    +

    on_characters(string)

    -
    - -
    - -
    - Also aliased as: on_cdata_block -
    +

    + Also aliased as: + + on_cdata_block. +

    @@ -239,17 +218,9 @@

    -

    - - on_end_document() - -

    +

    on_end_document()

    -
    - -
    - @@ -275,17 +246,9 @@

    -

    - - on_end_element(name) - -

    +

    on_end_element(name)

    -
    - -
    - @@ -313,17 +276,9 @@

    -

    - - on_start_document() - -

    +

    on_start_document()

    -
    - -
    - @@ -349,17 +304,9 @@

    -

    - - on_start_element(name, attrs = {}) - -

    +

    on_start_element(name, attrs = {})

    -
    - -
    - diff --git a/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html b/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html index e5e58650b3..51cb011a47 100644 --- a/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html +++ b/src/classes/ActiveSupport/XmlMini_NokogiriSAX/HashBuilder.html @@ -132,24 +132,17 @@

    Attributes

    Instance Public methods

    -

    - - cdata_block(string) - -

    +

    cdata_block(string)

    -
    - -
    - -
    - Alias for: characters -
    +

    + Alias for: + characters. +

    @@ -157,22 +150,16 @@

    -

    - - characters(string) - -

    +

    characters(string)

    -
    - -
    - -
    - Also aliased as: cdata_block -
    +

    + Also aliased as: + + cdata_block. +

    @@ -196,17 +183,9 @@

    -

    - - current_hash() - -

    +

    current_hash()

    -
    - -
    - @@ -231,17 +210,9 @@

    -

    - - end_document() - -

    +

    end_document()

    -
    - -
    - @@ -266,17 +237,9 @@

    -

    - - end_element(name) - -

    +

    end_element(name)

    -
    - -
    - @@ -304,17 +267,9 @@

    -

    - - error(error_message) - -

    +

    error(error_message)

    -
    - -
    - @@ -339,17 +294,9 @@

    -

    - - start_document() - -

    +

    start_document()

    -
    - -
    - @@ -375,17 +322,9 @@

    -

    - - start_element(name, attrs = []) - -

    +

    start_element(name, attrs = [])

    -
    - -
    - diff --git a/src/classes/Arel.html b/src/classes/Arel.html index 93f55e0e8e..d8b73c26ab 100644 --- a/src/classes/Arel.html +++ b/src/classes/Arel.html @@ -70,15 +70,10 @@

    Constants

    Class Public methods

    -

    - - sql(sql_string, *positional_binds, retryable: false, **named_binds) - -

    +

    sql(sql_string, *positional_binds, retryable: false, **named_binds)

    - -
    -

    Wrap a known-safe SQL string for passing to query methods, e.g.

    +
    +

    Wrap a known-safe SQL string for passing to query methods, e.g.

    Post.order(Arel.sql("REPLACE(title, 'misc', 'zzzz') asc")).pluck(:id)
     
    @@ -90,8 +85,7 @@

    To construct a more complex query fragment, including the possible use of user-provided values, the sql_string may contain ? and :key placeholders, corresponding to the additional arguments. Note that this behavior only applies when bind value parameters are supplied in the call; without them, the placeholder tokens have no special meaning, and will be passed through to the query as-is.

    The :retryable option can be used to mark the SQL as safe to retry. Use this option only if the SQL is idempotent, as it could be executed more than once.

    -

    - +
    diff --git a/src/classes/Array.html b/src/classes/Array.html index a234f845e9..2a3a2a6e99 100644 --- a/src/classes/Array.html +++ b/src/classes/Array.html @@ -185,15 +185,10 @@

    Methods

    Class Public methods

    -

    - - wrap(object) - -

    +

    wrap(object)

    - -
    -

    Wraps its argument in an array unless it is already an array (or array-like).

    +
    +

    Wraps its argument in an array unless it is already an array (or array-like).

    Specifically:

    • @@ -232,8 +227,7 @@

      which returns [] for nil, but calls to Array(object) otherwise.

      The differences with Kernel#Array explained above apply to the rest of objects.

      -

    - +
    @@ -268,15 +262,10 @@

    Instance Public methods

    -

    - - deep_dup() - -

    +

    deep_dup()

    - -
    -

    Returns a deep copy of array.

    +
    +

    Returns a deep copy of array.

    array = [1, [2, 3]]
     dup   = array.deep_dup
    @@ -285,8 +274,7 @@ 

    array[1][2] # => nil dup[1][2] # => 4

    -
    - +
    @@ -311,28 +299,24 @@

    -

    - - excluding(*elements) - -

    +

    excluding(*elements)

    - -
    -

    Returns a copy of the Array excluding the specified elements.

    +
    +

    Returns a copy of the Array excluding the specified elements.

    ["David", "Rafael", "Aaron", "Todd"].excluding("Aaron", "Todd") # => ["David", "Rafael"]
     [ [ 0, 1 ], [ 1, 0 ] ].excluding([ [ 1, 0 ] ]) # => [ [ 0, 1 ] ]
     

    Note: This is an optimization of Enumerable#excluding that uses Array#- instead of Array#reject for performance reasons.

    -
    - +
    -
    - Also aliased as: without -
    +

    + Also aliased as: + + without. +

    @@ -356,22 +340,16 @@

    -

    - - extract!() - -

    +

    extract!()

    - -
    -

    Removes and returns the elements for which the block returns a true value. If no block is given, an Enumerator is returned instead.

    +
    +

    Removes and returns the elements for which the block returns a true value. If no block is given, an Enumerator is returned instead.

    numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
     odd_numbers = numbers.extract! { |number| number.odd? } # => [1, 3, 5, 7, 9]
     numbers # => [0, 2, 4, 6, 8]
     
    -
    - +
    @@ -404,15 +382,10 @@

    -

    - - extract_options!() - -

    +

    extract_options!()

    - -
    -

    Extracts options from a set of arguments. Removes and returns the last element in the array if it’s a hash, otherwise returns a blank hash.

    +
    +

    Extracts options from a set of arguments. Removes and returns the last element in the array if it’s a hash, otherwise returns a blank hash.

    def options(*args)
       args.extract_options!
    @@ -421,8 +394,7 @@ 

    options(1, 2) # => {} options(1, 2, a: :b) # => {:a=>:b}

    -
    - +
    @@ -451,20 +423,14 @@

    -

    - - fifth() - -

    +

    fifth()

    - -
    -

    Equal to self[4].

    +
    +

    Equal to self[4].

    %w( a b c d e ).fifth # => "e"
     
    -
    - +
    @@ -489,20 +455,14 @@

    -

    - - forty_two() - -

    +

    forty_two()

    - -
    -

    Equal to self[41]. Also known as accessing “the reddit”.

    +
    +

    Equal to self[41]. Also known as accessing “the reddit”.

    (1..42).to_a.forty_two # => 42
     
    -
    - +
    @@ -527,20 +487,14 @@

    -

    - - fourth() - -

    +

    fourth()

    - -
    -

    Equal to self[3].

    +
    +

    Equal to self[3].

    %w( a b c d e ).fourth # => "d"
     
    -
    - +
    @@ -565,15 +519,10 @@

    -

    - - from(position) - -

    +

    from(position)

    - -
    -

    Returns the tail of the array from position.

    +
    +

    Returns the tail of the array from position.

    %w( a b c d ).from(0)  # => ["a", "b", "c", "d"]
     %w( a b c d ).from(2)  # => ["c", "d"]
    @@ -582,8 +531,7 @@ 

    %w( a b c d ).from(-2) # => ["c", "d"] %w( a b c ).from(-10) # => []

    -
    - +
    @@ -608,15 +556,10 @@

    -

    - - in_groups(number, fill_with = nil, &block) - -

    +

    in_groups(number, fill_with = nil, &block)

    - -
    -

    Splits or iterates over the array in number of groups, padding any remaining slots with fill_with unless it is false.

    +
    +

    Splits or iterates over the array in number of groups, padding any remaining slots with fill_with unless it is false.

    %w(1 2 3 4 5 6 7 8 9 10).in_groups(3) {|group| p group}
     ["1", "2", "3", "4"]
    @@ -633,8 +576,7 @@ 

    ["4", "5"] ["6", "7"]

    -
    - +
    @@ -681,15 +623,10 @@

    -

    - - in_groups_of(number, fill_with = nil, &block) - -

    +

    in_groups_of(number, fill_with = nil, &block)

    - -
    -

    Splits or iterates over the array in groups of size number, padding any remaining slots with fill_with unless it is false.

    +
    +

    Splits or iterates over the array in groups of size number, padding any remaining slots with fill_with unless it is false.

    %w(1 2 3 4 5 6 7 8 9 10).in_groups_of(3) {|group| p group}
     ["1", "2", "3"]
    @@ -707,8 +644,7 @@ 

    ["3", "4"] ["5"]

    -
    - +
    @@ -752,21 +688,15 @@

    -

    - - including(*elements) - -

    +

    including(*elements)

    - -
    -

    Returns a new array that includes the passed elements.

    +
    +

    Returns a new array that includes the passed elements.

    [ 1, 2, 3 ].including(4, 5) # => [ 1, 2, 3, 4, 5 ]
     [ [ 0, 1 ] ].including([ [ 1, 0 ] ]) # => [ [ 0, 1 ], [ 1, 0 ] ]
     
    -
    - +
    @@ -791,15 +721,10 @@

    -

    - - inquiry() - -

    +

    inquiry()

    - -
    -

    Wraps the array in an ActiveSupport::ArrayInquirer object, which gives a friendlier way to check its string-like contents.

    +
    +

    Wraps the array in an ActiveSupport::ArrayInquirer object, which gives a friendlier way to check its string-like contents.

    pets = [:cat, :dog].inquiry
     
    @@ -809,8 +734,7 @@ 

    pets.any?(:cat, :ferret) # => true pets.any?(:ferret, :alligator) # => false

    -
    - +
    @@ -835,20 +759,14 @@

    -

    - - second() - -

    +

    second()

    - -
    -

    Equal to self[1].

    +
    +

    Equal to self[1].

    %w( a b c d e ).second # => "b"
     
    -
    - +
    @@ -873,20 +791,14 @@

    -

    - - second_to_last() - -

    +

    second_to_last()

    - -
    -

    Equal to self[-2].

    +
    +

    Equal to self[-2].

    %w( a b c d e ).second_to_last # => "d"
     
    -
    - +
    @@ -911,21 +823,15 @@

    -

    - - split(value = nil, &block) - -

    +

    split(value = nil, &block)

    - -
    -

    Divides the array into one or more subarrays based on a delimiting value or the result of an optional block.

    +
    +

    Divides the array into one or more subarrays based on a delimiting value or the result of an optional block.

    [1, 2, 3, 4, 5].split(3)              # => [[1, 2], [4, 5]]
     (1..10).to_a.split { |i| i % 3 == 0 } # => [[1, 2], [4, 5], [7, 8], [10]]
     
    -
    - +
    @@ -963,20 +869,14 @@

    -

    - - third() - -

    +

    third()

    - -
    -

    Equal to self[2].

    +
    +

    Equal to self[2].

    %w( a b c d e ).third # => "c"
     
    -
    - +
    @@ -1001,20 +901,14 @@

    -

    - - third_to_last() - -

    +

    third_to_last()

    - -
    -

    Equal to self[-3].

    +
    +

    Equal to self[-3].

    %w( a b c d e ).third_to_last # => "c"
     
    -
    - +
    @@ -1039,15 +933,10 @@

    -

    - - to(position) - -

    +

    to(position)

    - -
    -

    Returns the beginning of the array up to position.

    +
    +

    Returns the beginning of the array up to position.

    %w( a b c d ).to(0)  # => ["a"]
     %w( a b c d ).to(2)  # => ["a", "b", "c"]
    @@ -1056,8 +945,7 @@ 

    %w( a b c d ).to(-2) # => ["a", "b", "c"] %w( a b c ).to(-10) # => []

    -
    - +
    @@ -1086,24 +974,17 @@

    -

    - - to_formatted_s(format = :default) - -

    +

    to_formatted_s(format = :default)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -1111,15 +992,10 @@

    -

    - - to_fs(format = :default) - -

    +

    to_fs(format = :default)

    - -
    -

    Extends Array#to_s to convert a collection of elements into a comma separated id list if :db argument is given as the format.

    +
    +

    Extends Array#to_s to convert a collection of elements into a comma separated id list if :db argument is given as the format.

    This method is aliased to to_formatted_s.

    @@ -1127,13 +1003,14 @@

    Blog.none.to_fs(:db) # => "null" [1,2].to_fs # => "[1, 2]" -

    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    @@ -1166,17 +1043,11 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Calls to_param on all its elements and joins the result with slashes. This is used by url_for in Action Pack.

    -
    - +
    +

    Calls to_param on all its elements and joins the result with slashes. This is used by url_for in Action Pack.

    +
    @@ -1201,20 +1072,14 @@

    -

    - - to_query(key) - -

    +

    to_query(key)

    - -
    -

    Converts an array into a string suitable for use as a URL query string, using the given key as the param name.

    +
    +

    Converts an array into a string suitable for use as a URL query string, using the given key as the param name.

    ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding"
     
    -
    - +
    @@ -1245,15 +1110,10 @@

    -

    - - to_sentence(options = {}) - -

    +

    to_sentence(options = {})

    - -
    -

    Converts the array to a comma-separated sentence where the last element is joined by the connector word.

    +
    +

    Converts the array to a comma-separated sentence where the last element is joined by the connector word.

    You can pass the following options to change the default behavior. If you pass an option key that doesn’t exist in the list below, it will raise an ArgumentError.

    @@ -1302,8 +1162,7 @@

    Examples

    ['uno', 'dos', 'tres'].to_sentence(locale: :es) # => "uno o dos o al menos tres"
    -
    - +
    @@ -1350,15 +1209,10 @@

    Examples

    -

    - - to_xml(options = {}) - -

    +

    to_xml(options = {})

    - -
    -

    Returns a string that represents the array in XML by invoking to_xml on each element. Active Record collections delegate their representation in XML to this method.

    +
    +

    Returns a string that represents the array in XML by invoking to_xml on each element. Active Record collections delegate their representation in XML to this method.

    All elements are expected to respond to to_xml, if any of them does not then an exception is raised.

    @@ -1432,8 +1286,7 @@

    </message> </messages> -

    - +
    @@ -1485,24 +1338,17 @@

    -

    - - without(*elements) - -

    +

    without(*elements)

    -
    - -
    - -
    - Alias for: excluding -
    +

    + Alias for: + excluding. +

    diff --git a/src/classes/Class.html b/src/classes/Class.html index bf8ed9a41f..515a675580 100644 --- a/src/classes/Class.html +++ b/src/classes/Class.html @@ -70,15 +70,10 @@

    Methods

    Instance Public methods

    -

    - - class_attribute(*attrs, instance_accessor: true, instance_reader: instance_accessor, instance_writer: instance_accessor, instance_predicate: true, default: nil ) - -

    +

    class_attribute(*attrs, instance_accessor: true, instance_reader: instance_accessor, instance_writer: instance_accessor, instance_predicate: true, default: nil )

    - -
    -

    Declare a class-level attribute whose value is inheritable by subclasses. Subclasses can change their own value and it will not impact parent class.

    +
    +

    Declare a class-level attribute whose value is inheritable by subclasses. Subclasses can change their own value and it will not impact parent class.

    Options

    • @@ -161,8 +156,7 @@

      Examples

      class_attribute :settings, default: {}
       
      -
    - +
    @@ -235,15 +229,10 @@

    Examples

    -

    - - descendants() - -

    +

    descendants()

    - -
    -

    Returns an array with all classes that are < than its receiver.

    +
    +

    Returns an array with all classes that are < than its receiver.

    class C; end
     C.descendants # => []
    @@ -257,8 +246,7 @@ 

    class D < C; end C.descendants # => [B, A, D]

    -
    - +
    diff --git a/src/classes/Date.html b/src/classes/Date.html index efa4460b23..eda84c78d9 100644 --- a/src/classes/Date.html +++ b/src/classes/Date.html @@ -267,17 +267,11 @@

    Attributes

    Class Public methods

    -

    - - beginning_of_week() - -

    +

    beginning_of_week()

    - -
    -

    Returns the week start (e.g. :monday) for the current request, if this has been set (via Date.beginning_of_week=). If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. If no config.beginning_of_week was specified, returns :monday.

    -
    - +
    +

    Returns the week start (e.g. :monday) for the current request, if this has been set (via Date.beginning_of_week=). If Date.beginning_of_week has not been set for the current request, returns the week start specified in config.beginning_of_week. If no config.beginning_of_week was specified, returns :monday.

    +
    @@ -302,19 +296,13 @@

    -

    - - beginning_of_week=(week_start) - -

    +

    beginning_of_week=(week_start)

    - -
    -

    Sets Date.beginning_of_week to a week start (e.g. :monday) for current request/thread.

    +
    +

    Sets Date.beginning_of_week to a week start (e.g. :monday) for current request/thread.

    This method accepts any of the following day symbols: :monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday

    -
    - +
    @@ -339,17 +327,11 @@

    -

    - - current() - -

    +

    current()

    - -
    -

    Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today.

    -
    - +
    +

    Returns Time.zone.today when Time.zone or config.time_zone are set, otherwise just returns Date.today.

    +
    @@ -374,17 +356,11 @@

    -

    - - find_beginning_of_week!(week_start) - -

    +

    find_beginning_of_week!(week_start)

    - -
    -

    Returns week start day symbol (e.g. :monday), or raises an ArgumentError for invalid day symbol.

    -
    - +
    +

    Returns week start day symbol (e.g. :monday), or raises an ArgumentError for invalid day symbol.

    +
    @@ -410,17 +386,11 @@

    -

    - - tomorrow() - -

    +

    tomorrow()

    - -
    -

    Returns a new Date representing the date 1 day after today (i.e. tomorrow’s date).

    -
    - +
    +

    Returns a new Date representing the date 1 day after today (i.e. tomorrow’s date).

    +
    @@ -445,17 +415,11 @@

    -

    - - yesterday() - -

    +

    yesterday()

    - -
    -

    Returns a new Date representing the date 1 day ago (i.e. yesterday’s date).

    -
    - +
    +

    Returns a new Date representing the date 1 day ago (i.e. yesterday’s date).

    +
    @@ -484,28 +448,23 @@

    Instance Public methods

    -

    - - <=>(other) - -

    +

    <=>(other)

    -
    - -
    - -
    - Also aliased as: compare_without_coercion -
    +

    + Also aliased as: + + compare_without_coercion. +

    -
    - Alias for: compare_with_coercion -
    +

    + Alias for: + compare_with_coercion. +

    @@ -513,17 +472,11 @@

    -

    - - acts_like_date?() - -

    +

    acts_like_date?()

    - -
    -

    Duck-types as a Date-like class. See Object#acts_like?.

    -
    - +
    +

    Duck-types as a Date-like class. See Object#acts_like?.

    +
    @@ -548,15 +501,10 @@

    -

    - - advance(options) - -

    +

    advance(options)

    - -
    -

    Provides precise Date calculations for years, months, and days. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days.

    +
    +

    Provides precise Date calculations for years, months, and days. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days.

    The increments are applied in order of time units from largest to smallest. In other words, the date is incremented first by :years, then by :months, then by :weeks, then by :days. This order can affect the result around the end of a month. For example, incrementing first by months then by days:

    @@ -569,8 +517,7 @@

    Date.new(2004, 9, 30).advance(days: 1).advance(months: 1)
     # => Mon, 01 Nov 2004
     
    -

    - +
    @@ -602,17 +549,11 @@

    -

    - - ago(seconds) - -

    +

    ago(seconds)

    - -
    -

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) and then subtracts the specified number of seconds.

    -
    - +
    +

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) and then subtracts the specified number of seconds.

    +
    @@ -637,24 +578,17 @@

    -

    - - at_beginning_of_day() - -

    +

    at_beginning_of_day()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -662,24 +596,17 @@

    -

    - - at_end_of_day() - -

    +

    at_end_of_day()

    -
    - -
    - -
    - Alias for: end_of_day -
    +

    + Alias for: + end_of_day. +

    @@ -687,24 +614,17 @@

    -

    - - at_midday() - -

    +

    at_midday()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -712,24 +632,17 @@

    -

    - - at_middle_of_day() - -

    +

    at_middle_of_day()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -737,24 +650,17 @@

    -

    - - at_midnight() - -

    +

    at_midnight()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -762,24 +668,17 @@

    -

    - - at_noon() - -

    +

    at_noon()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -787,22 +686,18 @@

    -

    - - beginning_of_day() - -

    +

    beginning_of_day()

    - -
    -

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00)

    -
    - +
    +

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00)

    +
    -
    - Also aliased as: midnight, at_midnight, at_beginning_of_day -
    +

    + Also aliased as: + + midnight, at_midnight, at_beginning_of_day. +

    @@ -826,21 +721,15 @@

    -

    - - change(options) - -

    +

    change(options)

    - -
    -

    Returns a new Date where one or more of the elements have been changed according to the options parameter. The options parameter is a hash with a combination of these keys: :year, :month, :day.

    +
    +

    Returns a new Date where one or more of the elements have been changed according to the options parameter. The options parameter is a hash with a combination of these keys: :year, :month, :day.

    Date.new(2007, 5, 12).change(day: 1)               # => Date.new(2007, 5, 1)
     Date.new(2007, 5, 12).change(year: 2005, month: 1) # => Date.new(2005, 1, 12)
     
    -
    - +
    @@ -869,22 +758,18 @@

    -

    - - compare_with_coercion(other) - -

    +

    compare_with_coercion(other)

    - -
    -

    Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there.

    -
    - +
    +

    Allow Date to be compared with Time by converting to DateTime and relying on the <=> from there.

    +
    -
    - Also aliased as: <=> -
    +

    + Also aliased as: + + <=>. +

    @@ -912,24 +797,17 @@

    -

    - - compare_without_coercion(other) - -

    +

    compare_without_coercion(other)

    -
    - -
    - -
    - Alias for: <=> -
    +

    + Alias for: + <=>. +

    @@ -937,24 +815,17 @@

    -

    - - default_inspect() - -

    +

    default_inspect()

    -
    - -
    - -
    - Alias for: inspect -
    +

    + Alias for: + inspect. +

    @@ -962,22 +833,18 @@

    -

    - - end_of_day() - -

    +

    end_of_day()

    - -
    -

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59)

    -
    - +
    +

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59)

    +
    -
    - Also aliased as: at_end_of_day -
    +

    + Also aliased as: + + at_end_of_day. +

    @@ -1001,24 +868,17 @@

    -

    - - in(seconds) - -

    +

    in(seconds)

    -
    - -
    - -
    - Alias for: since -
    +

    + Alias for: + since. +

    @@ -1026,28 +886,23 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - -
    - Also aliased as: default_inspect -
    +

    + Also aliased as: + + default_inspect. +

    -
    - Alias for: readable_inspect -
    +

    + Alias for: + readable_inspect. +

    @@ -1055,24 +910,17 @@

    -

    - - midday() - -

    +

    midday()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1080,22 +928,18 @@

    -

    - - middle_of_day() - -

    +

    middle_of_day()

    - -
    -

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00)

    -
    - +
    +

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the middle of the day (12:00)

    +
    -
    - Also aliased as: midday, noon, at_midday, at_noon, at_middle_of_day -
    +

    + Also aliased as: + + midday, noon, at_midday, at_noon, at_middle_of_day. +

    @@ -1119,24 +963,17 @@

    -

    - - midnight() - -

    +

    midnight()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -1144,24 +981,17 @@

    -

    - - noon() - -

    +

    noon()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1169,22 +999,18 @@

    -

    - - readable_inspect() - -

    +

    readable_inspect()

    - -
    -

    Overrides the default inspect method with a human readable one, e.g., “Mon, 21 Feb 2005”

    -
    - +
    +

    Overrides the default inspect method with a human readable one, e.g., “Mon, 21 Feb 2005”

    +
    -
    - Also aliased as: inspect -
    +

    + Also aliased as: + + inspect. +

    @@ -1208,22 +1034,18 @@

    -

    - - since(seconds) - -

    +

    since(seconds)

    - -
    -

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) and then adds the specified number of seconds

    -
    - +
    +

    Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) and then adds the specified number of seconds

    +
    -
    - Also aliased as: in -
    +

    + Also aliased as: + + in. +

    @@ -1247,24 +1069,17 @@

    -

    - - to_formatted_s(format = :default) - -

    +

    to_formatted_s(format = :default)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -1272,15 +1087,10 @@

    -

    - - to_fs(format = :default) - -

    +

    to_fs(format = :default)

    - -
    -

    Convert to a formatted string. See DATE_FORMATS for predefined formats.

    +
    +

    Convert to a formatted string. See DATE_FORMATS for predefined formats.

    This method is aliased to to_formatted_s.

    @@ -1306,13 +1116,14 @@

    Adding your Date::DATE_FORMATS[:month_and_year] = '%B %Y' Date::DATE_FORMATS[:short_ordinal] = ->(date) { date.strftime("%B #{date.day.ordinalize}") } -

    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    @@ -1344,15 +1155,10 @@

    Adding your

    -

    - - to_time(form = :local) - -

    +

    to_time(form = :local)

    - -
    -

    Converts a Date instance to a Time, where the time is set to the beginning of the day. The timezone can be either :local or :utc (default :local).

    +
    +

    Converts a Date instance to a Time, where the time is set to the beginning of the day. The timezone can be either :local or :utc (default :local).

    date = Date.new(2007, 11, 10)  # => Sat, 10 Nov 2007
     
    @@ -1363,8 +1169,7 @@ 

    NOTE: The :local timezone is Ruby’s process timezone, i.e. ENV['TZ']. If the application’s timezone is needed, then use in_time_zone instead.

    -
    - +
    @@ -1390,21 +1195,15 @@

    -

    - - xmlschema() - -

    +

    xmlschema()

    - -
    -

    Returns a string which represents the time in used time zone as DateTime defined by XML Schema:

    +
    +

    Returns a string which represents the time in used time zone as DateTime defined by XML Schema:

    date = Date.new(2015, 05, 23)  # => Sat, 23 May 2015
     date.xmlschema                 # => "2015-05-23T00:00:00+04:00"
     
    -
    - +
    diff --git a/src/classes/DateAndTime/Calculations.html b/src/classes/DateAndTime/Calculations.html index 8cb920a16a..1e6b378616 100644 --- a/src/classes/DateAndTime/Calculations.html +++ b/src/classes/DateAndTime/Calculations.html @@ -318,17 +318,11 @@

    Constants

    Instance Public methods

    -

    - - after?(date_or_time) - -

    +

    after?(date_or_time)

    - -
    -

    Returns true if the date/time falls after date_or_time.

    -
    - +
    +

    Returns true if the date/time falls after date_or_time.

    +
    @@ -353,17 +347,11 @@

    -

    - - all_day() - -

    +

    all_day()

    - -
    -

    Returns a Range representing the whole day of the current date/time.

    -
    - +
    +

    Returns a Range representing the whole day of the current date/time.

    +
    @@ -388,17 +376,11 @@

    -

    - - all_month() - -

    +

    all_month()

    - -
    -

    Returns a Range representing the whole month of the current date/time.

    -
    - +
    +

    Returns a Range representing the whole month of the current date/time.

    +
    @@ -423,17 +405,11 @@

    -

    - - all_quarter() - -

    +

    all_quarter()

    - -
    -

    Returns a Range representing the whole quarter of the current date/time.

    -
    - +
    +

    Returns a Range representing the whole quarter of the current date/time.

    +
    @@ -458,17 +434,11 @@

    -

    - - all_week(start_day = Date.beginning_of_week) - -

    +

    all_week(start_day = Date.beginning_of_week)

    - -
    -

    Returns a Range representing the whole week of the current date/time. Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set.

    -
    - +
    +

    Returns a Range representing the whole week of the current date/time. Week starts on start_day, default is Date.beginning_of_week or config.beginning_of_week when set.

    +
    @@ -493,17 +463,11 @@

    -

    - - all_year() - -

    +

    all_year()

    - -
    -

    Returns a Range representing the whole year of the current date/time.

    -
    - +
    +

    Returns a Range representing the whole year of the current date/time.

    +
    @@ -528,24 +492,17 @@

    -

    - - at_beginning_of_month() - -

    +

    at_beginning_of_month()

    -
    - -
    - -
    - Alias for: beginning_of_month -
    +

    + Alias for: + beginning_of_month. +

    @@ -553,24 +510,17 @@

    -

    - - at_beginning_of_quarter() - -

    +

    at_beginning_of_quarter()

    -
    - -
    - -
    - Alias for: beginning_of_quarter -
    +

    + Alias for: + beginning_of_quarter. +

    @@ -578,24 +528,17 @@

    -

    - - at_beginning_of_week(start_day = Date.beginning_of_week) - -

    +

    at_beginning_of_week(start_day = Date.beginning_of_week)

    -
    - -
    - -
    - Alias for: beginning_of_week -
    +

    + Alias for: + beginning_of_week. +

    @@ -603,24 +546,17 @@

    -

    - - at_beginning_of_year() - -

    +

    at_beginning_of_year()

    -
    - -
    - -
    - Alias for: beginning_of_year -
    +

    + Alias for: + beginning_of_year. +

    @@ -628,24 +564,17 @@

    -

    - - at_end_of_month() - -

    +

    at_end_of_month()

    -
    - -
    - -
    - Alias for: end_of_month -
    +

    + Alias for: + end_of_month. +

    @@ -653,24 +582,17 @@

    -

    - - at_end_of_quarter() - -

    +

    at_end_of_quarter()

    -
    - -
    - -
    - Alias for: end_of_quarter -
    +

    + Alias for: + end_of_quarter. +

    @@ -678,24 +600,17 @@

    -

    - - at_end_of_week(start_day = Date.beginning_of_week) - -

    +

    at_end_of_week(start_day = Date.beginning_of_week)

    -
    - -
    - -
    - Alias for: end_of_week -
    +

    + Alias for: + end_of_week. +

    @@ -703,24 +618,17 @@

    -

    - - at_end_of_year() - -

    +

    at_end_of_year()

    -
    - -
    - -
    - Alias for: end_of_year -
    +

    + Alias for: + end_of_year. +

    @@ -728,17 +636,11 @@

    -

    - - before?(date_or_time) - -

    +

    before?(date_or_time)

    - -
    -

    Returns true if the date/time falls before date_or_time.

    -
    - +
    +

    Returns true if the date/time falls before date_or_time.

    +
    @@ -763,15 +665,10 @@

    -

    - - beginning_of_month() - -

    +

    beginning_of_month()

    - -
    -

    Returns a new date/time at the start of the month.

    +
    +

    Returns a new date/time at the start of the month.

    today = Date.today # => Thu, 18 Jun 2015
     today.beginning_of_month # => Mon, 01 Jun 2015
    @@ -782,13 +679,14 @@ 

    now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000
     now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000
     
    -

    - +
    -
    - Also aliased as: at_beginning_of_month -
    +

    + Also aliased as: + + at_beginning_of_month. +

    @@ -812,15 +710,10 @@

    -

    - - beginning_of_quarter() - -

    +

    beginning_of_quarter()

    - -
    -

    Returns a new date/time at the start of the quarter.

    +
    +

    Returns a new date/time at the start of the quarter.

    today = Date.today # => Fri, 10 Jul 2015
     today.beginning_of_quarter # => Wed, 01 Jul 2015
    @@ -831,13 +724,14 @@ 

    now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000
     now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000
     
    -

    - +
    -
    - Also aliased as: at_beginning_of_quarter -
    +

    + Also aliased as: + + at_beginning_of_quarter. +

    @@ -862,22 +756,18 @@

    -

    - - beginning_of_week(start_day = Date.beginning_of_week) - -

    +

    beginning_of_week(start_day = Date.beginning_of_week)

    - -
    -

    Returns a new date/time representing the start of this week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 0:00.

    -
    - +
    +

    Returns a new date/time representing the start of this week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 0:00.

    +
    -
    - Also aliased as: at_beginning_of_week -
    +

    + Also aliased as: + + at_beginning_of_week. +

    @@ -902,15 +792,10 @@

    -

    - - beginning_of_year() - -

    +

    beginning_of_year()

    - -
    -

    Returns a new date/time at the beginning of the year.

    +
    +

    Returns a new date/time at the beginning of the year.

    today = Date.today # => Fri, 10 Jul 2015
     today.beginning_of_year # => Thu, 01 Jan 2015
    @@ -921,13 +806,14 @@ 

    now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000
     now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000
     
    -

    - +
    -
    - Also aliased as: at_beginning_of_year -
    +

    + Also aliased as: + + at_beginning_of_year. +

    @@ -951,17 +837,11 @@

    -

    - - days_ago(days) - -

    +

    days_ago(days)

    - -
    -

    Returns a new date/time the specified number of days ago.

    -
    - +
    +

    Returns a new date/time the specified number of days ago.

    +
    @@ -986,17 +866,11 @@

    -

    - - days_since(days) - -

    +

    days_since(days)

    - -
    -

    Returns a new date/time the specified number of days in the future.

    -
    - +
    +

    Returns a new date/time the specified number of days in the future.

    +
    @@ -1021,17 +895,11 @@

    -

    - - days_to_week_start(start_day = Date.beginning_of_week) - -

    +

    days_to_week_start(start_day = Date.beginning_of_week)

    - -
    -

    Returns the number of days to the start of the week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set.

    -
    - +
    +

    Returns the number of days to the start of the week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set.

    +
    @@ -1057,22 +925,18 @@

    -

    - - end_of_month() - -

    +

    end_of_month()

    - -
    -

    Returns a new date/time representing the end of the month. DateTime objects will have a time set to 23:59:59.

    -
    - +
    +

    Returns a new date/time representing the end of the month. DateTime objects will have a time set to 23:59:59.

    +
    -
    - Also aliased as: at_end_of_month -
    +

    + Also aliased as: + + at_end_of_month. +

    @@ -1097,15 +961,10 @@

    -

    - - end_of_quarter() - -

    +

    end_of_quarter()

    - -
    -

    Returns a new date/time at the end of the quarter.

    +
    +

    Returns a new date/time at the end of the quarter.

    today = Date.today # => Fri, 10 Jul 2015
     today.end_of_quarter # => Wed, 30 Sep 2015
    @@ -1116,13 +975,14 @@ 

    now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000
     now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000
     
    -

    - +
    -
    - Also aliased as: at_end_of_quarter -
    +

    + Also aliased as: + + at_end_of_quarter. +

    @@ -1147,22 +1007,18 @@

    -

    - - end_of_week(start_day = Date.beginning_of_week) - -

    +

    end_of_week(start_day = Date.beginning_of_week)

    - -
    -

    Returns a new date/time representing the end of this week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 23:59:59.

    -
    - +
    +

    Returns a new date/time representing the end of this week on the given day. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 23:59:59.

    +
    -
    - Also aliased as: at_end_of_week -
    +

    + Also aliased as: + + at_end_of_week. +

    @@ -1186,22 +1042,18 @@

    -

    - - end_of_year() - -

    +

    end_of_year()

    - -
    -

    Returns a new date/time representing the end of the year. DateTime objects will have a time set to 23:59:59.

    -
    - +
    +

    Returns a new date/time representing the end of the year. DateTime objects will have a time set to 23:59:59.

    +
    -
    - Also aliased as: at_end_of_year -
    +

    + Also aliased as: + + at_end_of_year. +

    @@ -1225,17 +1077,11 @@

    -

    - - future?() - -

    +

    future?()

    - -
    -

    Returns true if the date/time is in the future.

    -
    - +
    +

    Returns true if the date/time is in the future.

    +
    @@ -1260,17 +1106,11 @@

    -

    - - last_month() - -

    +

    last_month()

    - -
    -

    Short-hand for months_ago(1).

    -
    - +
    +

    Short-hand for months_ago(1).

    +
    @@ -1295,24 +1135,17 @@

    -

    - - last_quarter() - -

    +

    last_quarter()

    -
    - -
    - -
    - Alias for: prev_quarter -
    +

    + Alias for: + prev_quarter. +

    @@ -1320,24 +1153,17 @@

    -

    - - last_week(start_day = Date.beginning_of_week, same_time: false) - -

    +

    last_week(start_day = Date.beginning_of_week, same_time: false)

    -
    - -
    - -
    - Alias for: prev_week -
    +

    + Alias for: + prev_week. +

    @@ -1345,24 +1171,17 @@

    -

    - - last_weekday() - -

    +

    last_weekday()

    -
    - -
    - -
    - Alias for: prev_weekday -
    +

    + Alias for: + prev_weekday. +

    @@ -1370,17 +1189,11 @@

    -

    - - last_year() - -

    +

    last_year()

    - -
    -

    Short-hand for years_ago(1).

    -
    - +
    +

    Short-hand for years_ago(1).

    +
    @@ -1405,17 +1218,11 @@

    -

    - - monday() - -

    +

    monday()

    - -
    -

    Returns Monday of this week assuming that week starts on Monday. DateTime objects have their time set to 0:00.

    -
    - +
    +

    Returns Monday of this week assuming that week starts on Monday. DateTime objects have their time set to 0:00.

    +
    @@ -1440,17 +1247,11 @@

    -

    - - months_ago(months) - -

    +

    months_ago(months)

    - -
    -

    Returns a new date/time the specified number of months ago.

    -
    - +
    +

    Returns a new date/time the specified number of months ago.

    +
    @@ -1475,17 +1276,11 @@

    -

    - - months_since(months) - -

    +

    months_since(months)

    - -
    -

    Returns a new date/time the specified number of months in the future.

    -
    - +
    +

    Returns a new date/time the specified number of months in the future.

    +
    @@ -1510,24 +1305,17 @@

    -

    - - next_day?() - -

    +

    next_day?()

    -
    - -
    - -
    - Alias for: tomorrow? -
    +

    + Alias for: + tomorrow?. +

    @@ -1535,22 +1323,16 @@

    -

    - - next_occurring(day_of_week) - -

    +

    next_occurring(day_of_week)

    - -
    -

    Returns a new date/time representing the next occurrence of the specified day of week.

    +
    +

    Returns a new date/time representing the next occurrence of the specified day of week.

    today = Date.today               # => Thu, 14 Dec 2017
     today.next_occurring(:monday)    # => Mon, 18 Dec 2017
     today.next_occurring(:thursday)  # => Thu, 21 Dec 2017
     
    -
    - +
    @@ -1577,17 +1359,11 @@

    -

    - - next_quarter() - -

    +

    next_quarter()

    - -
    -

    Short-hand for months_since(3).

    -
    - +
    +

    Short-hand for months_since(3).

    +
    @@ -1612,15 +1388,10 @@

    -

    - - next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false) - -

    +

    next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false)

    - -
    -

    Returns a new date/time representing the given day in the next week.

    +
    +

    Returns a new date/time representing the given day in the next week.

    today = Date.today # => Thu, 07 May 2015
     today.next_week    # => Mon, 11 May 2015
    @@ -1637,8 +1408,7 @@ 

    now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000
     now.next_week      # => Mon, 11 May 2015 00:00:00 +0000
     
    -

    - +
    @@ -1664,17 +1434,11 @@

    -

    - - next_weekday() - -

    +

    next_weekday()

    - -
    -

    Returns a new date/time representing the next weekday.

    -
    - +
    +

    Returns a new date/time representing the next weekday.

    +
    @@ -1703,17 +1467,11 @@

    -

    - - on_weekday?() - -

    +

    on_weekday?()

    - -
    -

    Returns true if the date/time does not fall on a Saturday or Sunday.

    -
    - +
    +

    Returns true if the date/time does not fall on a Saturday or Sunday.

    +
    @@ -1738,17 +1496,11 @@

    -

    - - on_weekend?() - -

    +

    on_weekend?()

    - -
    -

    Returns true if the date/time falls on a Saturday or Sunday.

    -
    - +
    +

    Returns true if the date/time falls on a Saturday or Sunday.

    +
    @@ -1773,17 +1525,11 @@

    -

    - - past?() - -

    +

    past?()

    - -
    -

    Returns true if the date/time is in the past.

    -
    - +
    +

    Returns true if the date/time is in the past.

    +
    @@ -1808,24 +1554,17 @@

    -

    - - prev_day?() - -

    +

    prev_day?()

    -
    - -
    - -
    - Alias for: yesterday? -
    +

    + Alias for: + yesterday?. +

    @@ -1833,22 +1572,16 @@

    -

    - - prev_occurring(day_of_week) - -

    +

    prev_occurring(day_of_week)

    - -
    -

    Returns a new date/time representing the previous occurrence of the specified day of week.

    +
    +

    Returns a new date/time representing the previous occurrence of the specified day of week.

    today = Date.today               # => Thu, 14 Dec 2017
     today.prev_occurring(:monday)    # => Mon, 11 Dec 2017
     today.prev_occurring(:thursday)  # => Thu, 07 Dec 2017
     
    -
    - +
    @@ -1875,22 +1608,18 @@

    -

    - - prev_quarter() - -

    +

    prev_quarter()

    - -
    -

    Short-hand for months_ago(3).

    -
    - +
    +

    Short-hand for months_ago(3).

    +
    -
    - Also aliased as: last_quarter -
    +

    + Also aliased as: + + last_quarter. +

    @@ -1914,22 +1643,18 @@

    -

    - - prev_week(start_day = Date.beginning_of_week, same_time: false) - -

    +

    prev_week(start_day = Date.beginning_of_week, same_time: false)

    - -
    -

    Returns a new date/time representing the given day in the previous week. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 0:00 unless same_time is true.

    -
    - +
    +

    Returns a new date/time representing the given day in the previous week. Week is assumed to start on start_day, default is Date.beginning_of_week or config.beginning_of_week when set. DateTime objects have their time set to 0:00 unless same_time is true.

    +
    -
    - Also aliased as: last_week -
    +

    + Also aliased as: + + last_week. +

    @@ -1954,22 +1679,18 @@

    -

    - - prev_weekday() - -

    +

    prev_weekday()

    - -
    -

    Returns a new date/time representing the previous weekday.

    -
    - +
    +

    Returns a new date/time representing the previous weekday.

    +
    -
    - Also aliased as: last_weekday -
    +

    + Also aliased as: + + last_weekday. +

    @@ -1997,23 +1718,17 @@

    -

    - - quarter() - -

    +

    quarter()

    - -
    -

    Returns the quarter for a date/time.

    +
    +

    Returns the quarter for a date/time.

    Date.new(2010, 1, 31).quarter  # => 1
     Date.new(2010, 4, 12).quarter  # => 2
     Date.new(2010, 9, 15).quarter  # => 3
     Date.new(2010, 12, 25).quarter # => 4
     
    -
    - +
    @@ -2038,17 +1753,11 @@

    -

    - - sunday() - -

    +

    sunday()

    - -
    -

    Returns Sunday of this week assuming that week starts on Monday. DateTime objects have their time set to 23:59:59.

    -
    - +
    +

    Returns Sunday of this week assuming that week starts on Monday. DateTime objects have their time set to 23:59:59.

    +
    @@ -2073,17 +1782,11 @@

    -

    - - today?() - -

    +

    today?()

    - -
    -

    Returns true if the date/time is today.

    -
    - +
    +

    Returns true if the date/time is today.

    +
    @@ -2108,17 +1811,11 @@

    -

    - - tomorrow() - -

    +

    tomorrow()

    - -
    -

    Returns a new date/time representing tomorrow.

    -
    - +
    +

    Returns a new date/time representing tomorrow.

    +
    @@ -2143,22 +1840,18 @@

    -

    - - tomorrow?() - -

    +

    tomorrow?()

    - -
    -

    Returns true if the date/time is tomorrow.

    -
    - +
    +

    Returns true if the date/time is tomorrow.

    +
    -
    - Also aliased as: next_day? -
    +

    + Also aliased as: + + next_day?. +

    @@ -2182,17 +1875,11 @@

    -

    - - weeks_ago(weeks) - -

    +

    weeks_ago(weeks)

    - -
    -

    Returns a new date/time the specified number of weeks ago.

    -
    - +
    +

    Returns a new date/time the specified number of weeks ago.

    +
    @@ -2217,17 +1904,11 @@

    -

    - - weeks_since(weeks) - -

    +

    weeks_since(weeks)

    - -
    -

    Returns a new date/time the specified number of weeks in the future.

    -
    - +
    +

    Returns a new date/time the specified number of weeks in the future.

    +
    @@ -2252,17 +1933,11 @@

    -

    - - years_ago(years) - -

    +

    years_ago(years)

    - -
    -

    Returns a new date/time the specified number of years ago.

    -
    - +
    +

    Returns a new date/time the specified number of years ago.

    +
    @@ -2287,17 +1962,11 @@

    -

    - - years_since(years) - -

    +

    years_since(years)

    - -
    -

    Returns a new date/time the specified number of years in the future.

    -
    - +
    +

    Returns a new date/time the specified number of years in the future.

    +
    @@ -2322,17 +1991,11 @@

    -

    - - yesterday() - -

    +

    yesterday()

    - -
    -

    Returns a new date/time representing yesterday.

    -
    - +
    +

    Returns a new date/time representing yesterday.

    +
    @@ -2357,22 +2020,18 @@

    -

    - - yesterday?() - -

    +

    yesterday?()

    - -
    -

    Returns true if the date/time is yesterday.

    -
    - +
    +

    Returns true if the date/time is yesterday.

    +
    -
    - Also aliased as: prev_day? -
    +

    + Also aliased as: + + prev_day?. +

    diff --git a/src/classes/DateAndTime/Zones.html b/src/classes/DateAndTime/Zones.html index d2cf0e8432..57aa9278c6 100644 --- a/src/classes/DateAndTime/Zones.html +++ b/src/classes/DateAndTime/Zones.html @@ -58,15 +58,10 @@

    Methods

    Instance Public methods

    -

    - - in_time_zone(zone = ::Time.zone) - -

    +

    in_time_zone(zone = ::Time.zone)

    - -
    -

    Returns the simultaneous time in Time.zone if a zone is given or if Time.zone_default is set. Otherwise, it returns the current time.

    +
    +

    Returns the simultaneous time in Time.zone if a zone is given or if Time.zone_default is set. Otherwise, it returns the current time.

    Time.zone = 'Hawaii'        # => 'Hawaii'
     Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00
    @@ -80,8 +75,7 @@ 

    Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00
     Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00
     
    -

    - +
    diff --git a/src/classes/DateTime.html b/src/classes/DateTime.html index a11c8f42fa..1f1fc71476 100644 --- a/src/classes/DateTime.html +++ b/src/classes/DateTime.html @@ -291,23 +291,17 @@

    Included Modules

    Class Public methods

    -

    - - civil_from_format(utc_or_local, year, month = 1, day = 1, hour = 0, min = 0, sec = 0) - -

    +

    civil_from_format(utc_or_local, year, month = 1, day = 1, hour = 0, min = 0, sec = 0)

    - -
    -

    Returns DateTime with local offset for given year if format is local else offset is zero.

    +
    +

    Returns DateTime with local offset for given year if format is local else offset is zero.

    DateTime.civil_from_format :local, 2012
     # => Sun, 01 Jan 2012 00:00:00 +0300
     DateTime.civil_from_format :local, 2012, 12, 17
     # => Mon, 17 Dec 2012 00:00:00 +0000
     
    -
    - +
    @@ -337,17 +331,11 @@

    -

    - - current() - -

    +

    current()

    - -
    -

    Returns Time.zone.now.to_datetime when Time.zone or config.time_zone are set, otherwise returns Time.now.to_datetime.

    -
    - +
    +

    Returns Time.zone.now.to_datetime when Time.zone or config.time_zone are set, otherwise returns Time.now.to_datetime.

    +
    @@ -376,17 +364,11 @@

    Instance Public methods

    -

    - - <=>(other) - -

    +

    <=>(other)

    - -
    -

    Layers additional behavior on DateTime#<=> so that Time and ActiveSupport::TimeWithZone instances can be compared with a DateTime.

    -
    - +
    +

    Layers additional behavior on DateTime#<=> so that Time and ActiveSupport::TimeWithZone instances can be compared with a DateTime.

    +
    @@ -415,17 +397,11 @@

    -

    - - acts_like_date?() - -

    +

    acts_like_date?()

    - -
    -

    Duck-types as a Date-like class. See Object#acts_like?.

    -
    - +
    +

    Duck-types as a Date-like class. See Object#acts_like?.

    +
    @@ -450,17 +426,11 @@

    -

    - - acts_like_time?() - -

    +

    acts_like_time?()

    - -
    -

    Duck-types as a Time-like class. See Object#acts_like?.

    -
    - +
    +

    Duck-types as a Time-like class. See Object#acts_like?.

    +
    @@ -485,19 +455,13 @@

    -

    - - advance(options) - -

    +

    advance(options)

    - -
    -

    Uses Date to provide precise Time calculations for years, months, and days. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.

    +
    +

    Uses Date to provide precise Time calculations for years, months, and days. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.

    Just like Date#advance, increments are applied in order of time units from largest to smallest. This order can affect the result around the end of a month.

    -
    - +
    @@ -543,17 +507,11 @@

    -

    - - ago(seconds) - -

    +

    ago(seconds)

    - -
    -

    Returns a new DateTime representing the time a number of seconds ago. Do not use this method in combination with x.months, use months_ago instead!

    -
    - +
    +

    Returns a new DateTime representing the time a number of seconds ago. Do not use this method in combination with x.months, use months_ago instead!

    +
    @@ -578,24 +536,17 @@

    -

    - - at_beginning_of_day() - -

    +

    at_beginning_of_day()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -603,24 +554,17 @@

    -

    - - at_beginning_of_hour() - -

    +

    at_beginning_of_hour()

    -
    - -
    - -
    - Alias for: beginning_of_hour -
    +

    + Alias for: + beginning_of_hour. +

    @@ -628,24 +572,17 @@

    -

    - - at_beginning_of_minute() - -

    +

    at_beginning_of_minute()

    -
    - -
    - -
    - Alias for: beginning_of_minute -
    +

    + Alias for: + beginning_of_minute. +

    @@ -653,24 +590,17 @@

    -

    - - at_end_of_day() - -

    +

    at_end_of_day()

    -
    - -
    - -
    - Alias for: end_of_day -
    +

    + Alias for: + end_of_day. +

    @@ -678,24 +608,17 @@

    -

    - - at_end_of_hour() - -

    +

    at_end_of_hour()

    -
    - -
    - -
    - Alias for: end_of_hour -
    +

    + Alias for: + end_of_hour. +

    @@ -703,24 +626,17 @@

    -

    - - at_end_of_minute() - -

    +

    at_end_of_minute()

    -
    - -
    - -
    - Alias for: end_of_minute -
    +

    + Alias for: + end_of_minute. +

    @@ -728,24 +644,17 @@

    -

    - - at_midday() - -

    +

    at_midday()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -753,24 +662,17 @@

    -

    - - at_middle_of_day() - -

    +

    at_middle_of_day()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -778,24 +680,17 @@

    -

    - - at_midnight() - -

    +

    at_midnight()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -803,24 +698,17 @@

    -

    - - at_noon() - -

    +

    at_noon()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -828,22 +716,18 @@

    -

    - - beginning_of_day() - -

    +

    beginning_of_day()

    - -
    -

    Returns a new DateTime representing the start of the day (0:00).

    -
    - +
    +

    Returns a new DateTime representing the start of the day (0:00).

    +
    -
    - Also aliased as: midnight, at_midnight, at_beginning_of_day -
    +

    + Also aliased as: + + midnight, at_midnight, at_beginning_of_day. +

    @@ -867,22 +751,18 @@

    -

    - - beginning_of_hour() - -

    +

    beginning_of_hour()

    - -
    -

    Returns a new DateTime representing the start of the hour (hh:00:00).

    -
    - +
    +

    Returns a new DateTime representing the start of the hour (hh:00:00).

    +
    -
    - Also aliased as: at_beginning_of_hour -
    +

    + Also aliased as: + + at_beginning_of_hour. +

    @@ -906,22 +786,18 @@

    -

    - - beginning_of_minute() - -

    +

    beginning_of_minute()

    - -
    -

    Returns a new DateTime representing the start of the minute (hh:mm:00).

    -
    - +
    +

    Returns a new DateTime representing the start of the minute (hh:mm:00).

    +
    -
    - Also aliased as: at_beginning_of_minute -
    +

    + Also aliased as: + + at_beginning_of_minute. +

    @@ -945,22 +821,16 @@

    -

    - - change(options) - -

    +

    change(options)

    - -
    -

    Returns a new DateTime where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec) reset cascadingly, so if only the hour is passed, then minute and sec is set to 0. If the hour and minute is passed, then sec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :offset, :start.

    +
    +

    Returns a new DateTime where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec) reset cascadingly, so if only the hour is passed, then minute and sec is set to 0. If the hour and minute is passed, then sec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :offset, :start.

    DateTime.new(2012, 8, 29, 22, 35, 0).change(day: 1)              # => DateTime.new(2012, 8, 1, 22, 35, 0)
     DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1)  # => DateTime.new(1981, 8, 1, 22, 35, 0)
     DateTime.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => DateTime.new(1981, 8, 29, 0, 0, 0)
     
    -
    - +
    @@ -1004,24 +874,17 @@

    -

    - - default_inspect() - -

    +

    default_inspect()

    -
    - -
    - -
    - Alias for: inspect -
    +

    + Alias for: + inspect. +

    @@ -1029,22 +892,18 @@

    -

    - - end_of_day() - -

    +

    end_of_day()

    - -
    -

    Returns a new DateTime representing the end of the day (23:59:59).

    -
    - +
    +

    Returns a new DateTime representing the end of the day (23:59:59).

    +
    -
    - Also aliased as: at_end_of_day -
    +

    + Also aliased as: + + at_end_of_day. +

    @@ -1068,22 +927,18 @@

    -

    - - end_of_hour() - -

    +

    end_of_hour()

    - -
    -

    Returns a new DateTime representing the end of the hour (hh:59:59).

    -
    - +
    +

    Returns a new DateTime representing the end of the hour (hh:59:59).

    +
    -
    - Also aliased as: at_end_of_hour -
    +

    + Also aliased as: + + at_end_of_hour. +

    @@ -1107,22 +962,18 @@

    -

    - - end_of_minute() - -

    +

    end_of_minute()

    - -
    -

    Returns a new DateTime representing the end of the minute (hh:mm:59).

    -
    - +
    +

    Returns a new DateTime representing the end of the minute (hh:mm:59).

    +
    -
    - Also aliased as: at_end_of_minute -
    +

    + Also aliased as: + + at_end_of_minute. +

    @@ -1146,22 +997,16 @@

    -

    - - formatted_offset(colon = true, alternate_utc_string = nil) - -

    +

    formatted_offset(colon = true, alternate_utc_string = nil)

    - -
    -

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    +
    +

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24))
     datetime.formatted_offset         # => "-06:00"
     datetime.formatted_offset(false)  # => "-0600"
     
    -
    - +
    @@ -1186,24 +1031,17 @@

    -

    - - getgm() - -

    +

    getgm()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -1211,24 +1049,17 @@

    -

    - - getlocal(utc_offset = nil) - -

    +

    getlocal(utc_offset = nil)

    -
    - -
    - -
    - Alias for: localtime -
    +

    + Alias for: + localtime. +

    @@ -1236,24 +1067,17 @@

    -

    - - getutc() - -

    +

    getutc()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -1261,24 +1085,17 @@

    -

    - - gmtime() - -

    +

    gmtime()

    -
    - -
    - -
    - Alias for: utc -
    +

    + Alias for: + utc. +

    @@ -1286,24 +1103,17 @@

    -

    - - in(seconds) - -

    +

    in(seconds)

    -
    - -
    - -
    - Alias for: since -
    +

    + Alias for: + since. +

    @@ -1311,28 +1121,23 @@

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - -
    - Also aliased as: default_inspect -
    +

    + Also aliased as: + + default_inspect. +

    -
    - Alias for: readable_inspect -
    +

    + Alias for: + readable_inspect. +

    @@ -1340,22 +1145,18 @@

    -

    - - localtime(utc_offset = nil) - -

    +

    localtime(utc_offset = nil)

    - -
    -

    Returns a Time instance of the simultaneous time in the system timezone.

    -
    - +
    +

    Returns a Time instance of the simultaneous time in the system timezone.

    +
    -
    - Also aliased as: getlocal -
    +

    + Also aliased as: + + getlocal. +

    @@ -1384,24 +1185,17 @@

    -

    - - midday() - -

    +

    midday()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1409,22 +1203,18 @@

    -

    - - middle_of_day() - -

    +

    middle_of_day()

    - -
    -

    Returns a new DateTime representing the middle of the day (12:00)

    -
    - +
    +

    Returns a new DateTime representing the middle of the day (12:00)

    +
    -
    - Also aliased as: midday, noon, at_midday, at_noon, at_middle_of_day -
    +

    + Also aliased as: + + midday, noon, at_midday, at_noon, at_middle_of_day. +

    @@ -1448,24 +1238,17 @@

    -

    - - midnight() - -

    +

    midnight()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -1473,24 +1256,17 @@

    -

    - - noon() - -

    +

    noon()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1498,17 +1274,11 @@

    -

    - - nsec() - -

    +

    nsec()

    - -
    -

    Returns the fraction of a second as nanoseconds

    -
    - +
    +

    Returns the fraction of a second as nanoseconds

    +
    @@ -1533,22 +1303,18 @@

    -

    - - readable_inspect() - -

    +

    readable_inspect()

    - -
    -

    Overrides the default inspect method with a human readable one, e.g., “Mon, 21 Feb 2005 14:30:00 +0000”.

    -
    - +
    +

    Overrides the default inspect method with a human readable one, e.g., “Mon, 21 Feb 2005 14:30:00 +0000”.

    +
    -
    - Also aliased as: inspect -
    +

    + Also aliased as: + + inspect. +

    @@ -1572,22 +1338,16 @@

    -

    - - seconds_since_midnight() - -

    +

    seconds_since_midnight()

    - -
    -

    Returns the number of seconds since 00:00:00.

    +
    +

    Returns the number of seconds since 00:00:00.

    DateTime.new(2012, 8, 29,  0,  0,  0).seconds_since_midnight # => 0
     DateTime.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296
     DateTime.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399
     
    -
    - +
    @@ -1612,22 +1372,16 @@

    -

    - - seconds_until_end_of_day() - -

    +

    seconds_until_end_of_day()

    - -
    -

    Returns the number of seconds until 23:59:59.

    +
    +

    Returns the number of seconds until 23:59:59.

    DateTime.new(2012, 8, 29,  0,  0,  0).seconds_until_end_of_day # => 86399
     DateTime.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103
     DateTime.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0
     
    -
    - +
    @@ -1652,22 +1406,18 @@

    -

    - - since(seconds) - -

    +

    since(seconds)

    - -
    -

    Returns a new DateTime representing the time a number of seconds since the instance time. Do not use this method in combination with x.months, use months_since instead!

    -
    - +
    +

    Returns a new DateTime representing the time a number of seconds since the instance time. Do not use this method in combination with x.months, use months_since instead!

    +
    -
    - Also aliased as: in -
    +

    + Also aliased as: + + in. +

    @@ -1691,20 +1441,14 @@

    -

    - - subsec() - -

    +

    subsec()

    - -
    -

    Returns the fraction of a second as a Rational

    +
    +

    Returns the fraction of a second as a Rational

    DateTime.new(2012, 8, 29, 0, 0, 0.5).subsec # => (1/2)
     
    -
    - +
    @@ -1729,17 +1473,11 @@

    -

    - - to_f() - -

    +

    to_f()

    - -
    -

    Converts self to a floating-point number of seconds, including fractional microseconds, since the Unix epoch.

    -
    - +
    +

    Converts self to a floating-point number of seconds, including fractional microseconds, since the Unix epoch.

    +
    @@ -1764,24 +1502,17 @@

    -

    - - to_formatted_s(format = :default) - -

    +

    to_formatted_s(format = :default)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -1789,15 +1520,10 @@

    -

    - - to_fs(format = :default) - -

    +

    to_fs(format = :default)

    - -
    -

    Convert to a formatted string. See Time::DATE_FORMATS for predefined formats.

    +
    +

    Convert to a formatted string. See Time::DATE_FORMATS for predefined formats.

    This method is aliased to to_formatted_s.

    @@ -1823,13 +1549,14 @@

    Adding y Time::DATE_FORMATS[:month_and_year] = '%B %Y' Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } -

    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    @@ -1857,17 +1584,11 @@

    Adding y

    -

    - - to_i() - -

    +

    to_i()

    - -
    -

    Converts self to an integer number of seconds since the Unix epoch.

    -
    - +
    +

    Converts self to an integer number of seconds since the Unix epoch.

    +
    @@ -1892,17 +1613,11 @@

    -

    - - to_time() - -

    +

    to_time()

    - -
    -

    Return an instance of Time with the same UTC offset as self.

    -
    - +
    +

    Return an instance of Time with the same UTC offset as self.

    +
    @@ -1927,17 +1642,11 @@

    -

    - - usec() - -

    +

    usec()

    - -
    -

    Returns the fraction of a second as microseconds

    -
    - +
    +

    Returns the fraction of a second as microseconds

    +
    @@ -1962,26 +1671,22 @@

    -

    - - utc() - -

    +

    utc()

    - -
    -

    Returns a Time instance of the simultaneous time in the UTC timezone.

    +
    +

    Returns a Time instance of the simultaneous time in the UTC timezone.

    DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24))     # => Mon, 21 Feb 2005 10:11:12 -0600
     DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 UTC
     
    -
    - +
    -
    - Also aliased as: getgm, getutc, gmtime -
    +

    + Also aliased as: + + getgm, getutc, gmtime. +

    @@ -2010,17 +1715,11 @@

    -

    - - utc?() - -

    +

    utc?()

    - -
    -

    Returns true if offset == 0.

    -
    - +
    +

    Returns true if offset == 0.

    +
    @@ -2045,17 +1744,11 @@

    -

    - - utc_offset() - -

    +

    utc_offset()

    - -
    -

    Returns the offset value in seconds.

    -
    - +
    +

    Returns the offset value in seconds.

    +
    diff --git a/src/classes/Delegator.html b/src/classes/Delegator.html index a90da3ccf8..7bb94f0d2e 100644 --- a/src/classes/Delegator.html +++ b/src/classes/Delegator.html @@ -68,18 +68,12 @@

    Methods

    Instance Public methods

    -

    - - try(*args, &block) - - -

    +

    try(*args, &block) +

    - -
    -

    See Object#try

    -
    - +
    +

    See Object#try

    +
    @@ -92,18 +86,12 @@

    -

    - - try!(*args, &block) - - -

    +

    try!(*args, &block) +

    - -
    -

    See Object#try!

    -
    - +
    +

    See Object#try!

    +
    diff --git a/src/classes/Digest/UUID.html b/src/classes/Digest/UUID.html index 3843c633e5..fbd01db178 100644 --- a/src/classes/Digest/UUID.html +++ b/src/classes/Digest/UUID.html @@ -73,17 +73,11 @@

    Methods

    Class Public methods

    -

    - - nil_uuid() - -

    +

    nil_uuid()

    - -
    -

    Returns the nil UUID. This is a special form of UUID that is specified to have all 128 bits set to zero.

    -
    - +
    +

    Returns the nil UUID. This is a special form of UUID that is specified to have all 128 bits set to zero.

    +
    @@ -108,21 +102,15 @@

    -

    - - uuid_from_hash(hash_class, namespace, name) - -

    +

    uuid_from_hash(hash_class, namespace, name)

    - -
    -

    Generates a v5 non-random UUID (Universally Unique IDentifier).

    +
    +

    Generates a v5 non-random UUID (Universally Unique IDentifier).

    Using OpenSSL::Digest::MD5 generates version 3 UUIDs; OpenSSL::Digest::SHA1 generates version 5 UUIDs. uuid_from_hash always generates the same UUID for a given name and namespace combination.

    See RFC 4122 for details of UUID at: www.ietf.org/rfc/rfc4122.txt

    -
    - +
    @@ -165,17 +153,11 @@

    -

    - - uuid_v3(uuid_namespace, name) - -

    +

    uuid_v3(uuid_namespace, name)

    - -
    -

    Convenience method for uuid_from_hash using OpenSSL::Digest::MD5.

    -
    - +
    +

    Convenience method for uuid_from_hash using OpenSSL::Digest::MD5.

    +
    @@ -200,17 +182,11 @@

    -

    - - uuid_v4() - -

    +

    uuid_v4()

    - -
    -

    Convenience method for SecureRandom.uuid.

    -
    - +
    +

    Convenience method for SecureRandom.uuid.

    +
    @@ -235,17 +211,11 @@

    -

    - - uuid_v5(uuid_namespace, name) - -

    +

    uuid_v5(uuid_namespace, name)

    - -
    -

    Convenience method for uuid_from_hash using OpenSSL::Digest::SHA1.

    -
    - +
    +

    Convenience method for uuid_from_hash using OpenSSL::Digest::SHA1.

    +
    diff --git a/src/classes/ERB/Util.html b/src/classes/ERB/Util.html index ab86d2b1d2..ddf23164e3 100644 --- a/src/classes/ERB/Util.html +++ b/src/classes/ERB/Util.html @@ -134,15 +134,10 @@

    Constants

    Class Public methods

    -

    - - html_escape_once(s) - -

    +

    html_escape_once(s)

    - -
    -

    A utility method for escaping HTML without affecting existing escaped entities.

    +
    +

    A utility method for escaping HTML without affecting existing escaped entities.

    html_escape_once('1 < 2 &amp; 3')
     # => "1 &lt; 2 &amp; 3"
    @@ -150,8 +145,7 @@ 

    html_escape_once('&lt;&lt; Accept & Checkout') # => "&lt;&lt; Accept &amp; Checkout"

    -
    - +
    @@ -176,15 +170,10 @@

    -

    - - json_escape(s) - -

    +

    json_escape(s)

    - -
    -

    A utility method for escaping HTML entities in JSON strings. Specifically, the &, > and < characters are replaced with their equivalent unicode escaped form - u0026, u003e, and u003c. The Unicode sequences u2028 and u2029 are also escaped as they are treated as newline characters in some JavaScript engines. These sequences have identical meaning as the original characters inside the context of a JSON string, so assuming the input is a valid and well-formed JSON value, the output will have equivalent meaning when parsed:

    +
    +

    A utility method for escaping HTML entities in JSON strings. Specifically, the &, > and < characters are replaced with their equivalent unicode escaped form - u0026, u003e, and u003c. The Unicode sequences u2028 and u2029 are also escaped as they are treated as newline characters in some JavaScript engines. These sequences have identical meaning as the original characters inside the context of a JSON string, so assuming the input is a valid and well-formed JSON value, the output will have equivalent meaning when parsed:

    json = JSON.generate({ name: "</script><script>alert('PWNED!!!')</script>"})
     # => "{\"name\":\"</script><script>alert('PWNED!!!')</script>\"}"
    @@ -217,8 +206,7 @@ 

    The escaping performed in this method is identical to those performed in the Active Support JSON encoder when ActiveSupport.escape_html_entities_in_json is set to true. Because this transformation is idempotent, this helper can be applied even if ActiveSupport.escape_html_entities_in_json is already true.

    Therefore, when you are unsure if ActiveSupport.escape_html_entities_in_json is enabled, or if you are unsure where your JSON string originated from, it is recommended that you always apply this helper (other libraries, such as the JSON gem, do not provide this kind of protection by default; also some gems might override to_json to bypass Active Support’s encoder).

    -

    - +
    @@ -249,23 +237,17 @@

    -

    - - xml_name_escape(name) - -

    +

    xml_name_escape(name)

    - -
    -

    A utility method for escaping XML names of tags and names of attributes.

    +
    +

    A utility method for escaping XML names of tags and names of attributes.

    xml_name_escape('1 < 2 & 3')
     # => "1___2___3"
     

    It follows the requirements of the specification: www.w3.org/TR/REC-xml/#NT-Name

    -
    - +
    diff --git a/src/classes/Enumerable.html b/src/classes/Enumerable.html index 3ddb2d8ba1..8a7e6ff07a 100644 --- a/src/classes/Enumerable.html +++ b/src/classes/Enumerable.html @@ -125,15 +125,10 @@

    Methods

    Instance Public methods

    -

    - - compact_blank() - -

    +

    compact_blank()

    - -
    -

    Returns a new Array without the blank items. Uses Object#blank? for determining if an item is blank.

    +
    +

    Returns a new Array without the blank items. Uses Object#blank? for determining if an item is blank.

    [1, "", nil, 2, " ", [], {}, false, true].compact_blank
     # =>  [1, 2, true]
    @@ -147,8 +142,7 @@ 

    { a: "", b: 1, c: nil, d: [], e: false, f: true }.compact_blank
     # => { b: 1, f: true }
     
    -

    - +
    @@ -173,17 +167,11 @@

    -

    - - exclude?(object) - -

    +

    exclude?(object)

    - -
    -

    The negative of the Enumerable#include?. Returns true if the collection does not include the object.

    -
    - +
    +

    The negative of the Enumerable#include?. Returns true if the collection does not include the object.

    +
    @@ -208,15 +196,10 @@

    -

    - - excluding(*elements) - -

    +

    excluding(*elements)

    - -
    -

    Returns a copy of the enumerable excluding the specified elements.

    +
    +

    Returns a copy of the enumerable excluding the specified elements.

    ["David", "Rafael", "Aaron", "Todd"].excluding "Aaron", "Todd"
     # => ["David", "Rafael"]
    @@ -227,13 +210,14 @@ 

    {foo: 1, bar: 2, baz: 3}.excluding :bar # => {foo: 1, baz: 3}

    -
    - +
    -
    - Also aliased as: without -
    +

    + Also aliased as: + + without. +

    @@ -258,23 +242,17 @@

    -

    - - in_order_of(key, series, filter: true) - -

    +

    in_order_of(key, series, filter: true)

    - -
    -

    Returns a new Array where the order has been set to that provided in the series, based on the key of the objects in the original enumerable.

    +
    +

    Returns a new Array where the order has been set to that provided in the series, based on the key of the objects in the original enumerable.

    [ Person.find(5), Person.find(3), Person.find(1) ].in_order_of(:id, [ 1, 5, 3 ])
     # => [ Person.find(1), Person.find(5), Person.find(3) ]
     

    If the series include keys that have no corresponding element in the Enumerable, these are ignored. If the Enumerable has additional elements that aren’t named in the series, these are not included in the result, unless the filter option is set to false.

    -
    - +
    @@ -303,15 +281,10 @@

    -

    - - including(*elements) - -

    +

    including(*elements)

    - -
    -

    Returns a new array that includes the passed elements.

    +
    +

    Returns a new array that includes the passed elements.

    [ 1, 2, 3 ].including(4, 5)
     # => [ 1, 2, 3, 4, 5 ]
    @@ -319,8 +292,7 @@ 

    ["David", "Rafael"].including %w[ Aaron Todd ] # => ["David", "Rafael", "Aaron", "Todd"]

    -
    - +
    @@ -345,15 +317,10 @@

    -

    - - index_by() - -

    +

    index_by()

    - -
    -

    Convert an enumerable to a hash, using the block result as the key and the element as the value.

    +
    +

    Convert an enumerable to a hash, using the block result as the key and the element as the value.

    people.index_by(&:login)
     # => { "nextangle" => <Person ...>, "chade-" => <Person ...>, ...}
    @@ -361,8 +328,7 @@ 

    people.index_by { |person| "#{person.first_name} #{person.last_name}" } # => { "Chade- Fowlersburg-e" => <Person ...>, "David Heinemeier Hansson" => <Person ...>, ...}

    -
    - +
    @@ -393,15 +359,10 @@

    -

    - - index_with(default = (no_default = true)) - -

    +

    index_with(default = (no_default = true))

    - -
    -

    Convert an enumerable to a hash, using the element as the key and the block result as the value.

    +
    +

    Convert an enumerable to a hash, using the element as the key and the block result as the value.

    post = Post.new(title: "hey there", body: "what's up?")
     
    @@ -414,8 +375,7 @@ 

    %i( created_at updated_at ).index_with(Time.now)
     # => { created_at: 2020-03-09 22:31:47, updated_at: 2020-03-09 22:31:47 }
     
    -

    - +
    @@ -450,17 +410,11 @@

    -

    - - many?() - -

    +

    many?()

    - -
    -

    Returns true if the enumerable has more than 1 element. Functionally equivalent to enum.to_a.size > 1. Can be called with a block too, much like any?, so people.many? { |p| p.age > 26 } returns true if more than one person is over 26.

    -
    - +
    +

    Returns true if the enumerable has more than 1 element. Functionally equivalent to enum.to_a.size > 1. Can be called with a block too, much like any?, so people.many? { |p| p.age > 26 } returns true if more than one person is over 26.

    +
    @@ -493,21 +447,15 @@

    -

    - - maximum(key) - -

    +

    maximum(key)

    - -
    -

    Calculates the maximum from the extracted elements.

    +
    +

    Calculates the maximum from the extracted elements.

    payments = [Payment.new(5), Payment.new(15), Payment.new(10)]
     payments.maximum(:price) # => 15
     
    -
    - +
    @@ -532,21 +480,15 @@

    -

    - - minimum(key) - -

    +

    minimum(key)

    - -
    -

    Calculates the minimum from the extracted elements.

    +
    +

    Calculates the minimum from the extracted elements.

    payments = [Payment.new(5), Payment.new(15), Payment.new(10)]
     payments.minimum(:price) # => 5
     
    -
    - +
    @@ -571,15 +513,10 @@

    -

    - - pick(*keys) - -

    +

    pick(*keys)

    - -
    -

    Extract the given key from the first element in the enumerable.

    +
    +

    Extract the given key from the first element in the enumerable.

    [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pick(:name)
     # => "David"
    @@ -587,8 +524,7 @@ 

    [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pick(:id, :name) # => [1, "David"]

    -
    - +
    @@ -619,15 +555,10 @@

    -

    - - pluck(*keys) - -

    +

    pluck(*keys)

    - -
    -

    Extract the given key from each element in the enumerable.

    +
    +

    Extract the given key from each element in the enumerable.

    [{ name: "David" }, { name: "Rafael" }, { name: "Aaron" }].pluck(:name)
     # => ["David", "Rafael", "Aaron"]
    @@ -635,8 +566,7 @@ 

    [{ id: 1, name: "David" }, { id: 2, name: "Rafael" }].pluck(:id, :name) # => [[1, "David"], [2, "Rafael"]]

    -
    - +
    @@ -666,22 +596,16 @@

    -

    - - sole() - -

    +

    sole()

    - -
    -

    Returns the sole item in the enumerable. If there are no items, or more than one item, raises Enumerable::SoleItemExpectedError.

    +
    +

    Returns the sole item in the enumerable. If there are no items, or more than one item, raises Enumerable::SoleItemExpectedError.

    ["x"].sole          # => "x"
     Set.new.sole        # => Enumerable::SoleItemExpectedError: no item found
     { a: 1, b: 2 }.sole # => Enumerable::SoleItemExpectedError: multiple items found
     
    -
    - +
    @@ -722,24 +646,17 @@

    -

    - - without(*elements) - -

    +

    without(*elements)

    -
    - -
    - -
    - Alias for: excluding -
    +

    + Alias for: + excluding. +

    diff --git a/src/classes/Exception.html b/src/classes/Exception.html index 376beeb644..01f7d24c5e 100644 --- a/src/classes/Exception.html +++ b/src/classes/Exception.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - as_json(options = nil) - -

    +

    as_json(options = nil)

    -
    - -
    - diff --git a/src/classes/FalseClass.html b/src/classes/FalseClass.html index 45f70766f5..a63975356e 100644 --- a/src/classes/FalseClass.html +++ b/src/classes/FalseClass.html @@ -72,22 +72,16 @@

    Methods

    Instance Public methods

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    false is blank:

    +
    +

    false is blank:

    false.blank? # => true
     

    @return [true]

    -
    - +
    @@ -112,17 +106,11 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Returns self.

    -
    - +
    +

    Returns self.

    +
    diff --git a/src/classes/File.html b/src/classes/File.html index 003620fcf5..d64d022421 100644 --- a/src/classes/File.html +++ b/src/classes/File.html @@ -67,15 +67,10 @@

    Methods

    Class Public methods

    -

    - - atomic_write(file_name, temp_dir = dirname(file_name)) - -

    +

    atomic_write(file_name, temp_dir = dirname(file_name))

    - -
    -

    Write to a file atomically. Useful for situations where you don’t want other processes or threads to see half-written files.

    +
    +

    Write to a file atomically. Useful for situations where you don’t want other processes or threads to see half-written files.

    File.atomic_write('important.file') do |file|
       file.write('hello')
    @@ -88,8 +83,7 @@ 

    file.write('hello') end

    -
    - +
    diff --git a/src/classes/Hash.html b/src/classes/Hash.html index 38adf19760..bbbcf94438 100644 --- a/src/classes/Hash.html +++ b/src/classes/Hash.html @@ -225,17 +225,11 @@

    Methods

    Class Public methods

    -

    - - from_trusted_xml(xml) - -

    +

    from_trusted_xml(xml)

    - -
    -

    Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML.

    -
    - +
    +

    Builds a Hash from XML just like Hash.from_xml, but also allows Symbol and YAML.

    +
    @@ -260,15 +254,10 @@

    -

    - - from_xml(xml, disallowed_types = nil) - -

    +

    from_xml(xml, disallowed_types = nil)

    - -
    -

    Returns a Hash containing a collection of pairs when the key is the node name and the value is its content

    +
    +

    Returns a Hash containing a collection of pairs when the key is the node name and the value is its content

    xml = <<-XML
       <?xml version="1.0" encoding="UTF-8"?>
    @@ -299,8 +288,7 @@ 

    Note that passing custom disallowed types will override the default types, which are Symbol and YAML.

    -
    - +
    @@ -329,15 +317,10 @@

    Instance Public methods

    -

    - - assert_valid_keys(*valid_keys) - -

    +

    assert_valid_keys(*valid_keys)

    - -
    -

    Validates all keys in a hash match *valid_keys, raising ArgumentError on a mismatch.

    +
    +

    Validates all keys in a hash match *valid_keys, raising ArgumentError on a mismatch.

    Note that keys are treated differently than HashWithIndifferentAccess, meaning that string and symbol keys will not match.

    @@ -345,8 +328,7 @@

    { name: 'Rob', age: '28' }.assert_valid_keys('name', 'age') # => raises "ArgumentError: Unknown key: :name. Valid keys are: 'name', 'age'" { name: 'Rob', age: '28' }.assert_valid_keys(:name, :age) # => passes, raises nothing -

    - +
    @@ -376,22 +358,16 @@

    -

    - - compact_blank!() - -

    +

    compact_blank!()

    - -
    -

    Removes all blank values from the Hash in place and returns self. Uses Object#blank? for determining if a value is blank.

    +
    +

    Removes all blank values from the Hash in place and returns self. Uses Object#blank? for determining if a value is blank.

    h = { a: "", b: 1, c: nil, d: [], e: false, f: true }
     h.compact_blank!
     # => { b: 1, f: true }
     
    -
    - +
    @@ -417,15 +393,10 @@

    -

    - - deep_dup() - -

    +

    deep_dup()

    - -
    -

    Returns a deep copy of hash.

    +
    +

    Returns a deep copy of hash.

    hash = { a: { b: 'b' } }
     dup  = hash.deep_dup
    @@ -434,8 +405,7 @@ 

    hash[:a][:c] # => nil dup[:a][:c] # => "c"

    -
    - +
    @@ -469,16 +439,11 @@

    -

    - - deep_merge(other_hash, &block) +

    deep_merge(other_hash, &block) +

    - - - - -
    -

    Returns a new hash with self and other_hash merged recursively.

    +
    +

    Returns a new hash with self and other_hash merged recursively.

    h1 = { a: true, b: { c: [1, 2, 3] } }
     h2 = { a: false, b: { x: [3, 4, 5] } }
    @@ -493,8 +458,7 @@ 

    h1.deep_merge(h2) { |key, this_val, other_val| this_val + other_val } # => { a: 100, b: 450, c: { c1: 300 } }

    -
    - +
    @@ -507,18 +471,12 @@

    -

    - - deep_merge!(other_hash, &block) - - -

    +

    deep_merge!(other_hash, &block) +

    - -
    -

    Same as deep_merge, but modifies self.

    -
    - +
    +

    Same as deep_merge, but modifies self.

    +
    @@ -531,23 +489,17 @@

    -

    - - deep_stringify_keys() - -

    +

    deep_stringify_keys()

    - -
    -

    Returns a new hash with all keys converted to strings. This includes the keys from the root hash and from all nested hashes and arrays.

    +
    +

    Returns a new hash with all keys converted to strings. This includes the keys from the root hash and from all nested hashes and arrays.

    hash = { person: { name: 'Rob', age: '28' } }
     
     hash.deep_stringify_keys
     # => {"person"=>{"name"=>"Rob", "age"=>"28"}}
     
    -
    - +
    @@ -572,17 +524,11 @@

    -

    - - deep_stringify_keys!() - -

    +

    deep_stringify_keys!()

    - -
    -

    Destructively converts all keys to strings. This includes the keys from the root hash and from all nested hashes and arrays.

    -
    - +
    +

    Destructively converts all keys to strings. This includes the keys from the root hash and from all nested hashes and arrays.

    +
    @@ -607,23 +553,17 @@

    -

    - - deep_symbolize_keys() - -

    +

    deep_symbolize_keys()

    - -
    -

    Returns a new hash with all keys converted to symbols, as long as they respond to to_sym. This includes the keys from the root hash and from all nested hashes and arrays.

    +
    +

    Returns a new hash with all keys converted to symbols, as long as they respond to to_sym. This includes the keys from the root hash and from all nested hashes and arrays.

    hash = { 'person' => { 'name' => 'Rob', 'age' => '28' } }
     
     hash.deep_symbolize_keys
     # => {:person=>{:name=>"Rob", :age=>"28"}}
     
    -
    - +
    @@ -648,17 +588,11 @@

    -

    - - deep_symbolize_keys!() - -

    +

    deep_symbolize_keys!()

    - -
    -

    Destructively converts all keys to symbols, as long as they respond to to_sym. This includes the keys from the root hash and from all nested hashes and arrays.

    -
    - +
    +

    Destructively converts all keys to symbols, as long as they respond to to_sym. This includes the keys from the root hash and from all nested hashes and arrays.

    +
    @@ -683,23 +617,17 @@

    -

    - - deep_transform_keys(&block) - -

    +

    deep_transform_keys(&block)

    - -
    -

    Returns a new hash with all keys converted by the block operation. This includes the keys from the root hash and from all nested hashes and arrays.

    +
    +

    Returns a new hash with all keys converted by the block operation. This includes the keys from the root hash and from all nested hashes and arrays.

    hash = { person: { name: 'Rob', age: '28' } }
     
     hash.deep_transform_keys{ |key| key.to_s.upcase }
     # => {"PERSON"=>{"NAME"=>"Rob", "AGE"=>"28"}}
     
    -
    - +
    @@ -724,17 +652,11 @@

    -

    - - deep_transform_keys!(&block) - -

    +

    deep_transform_keys!(&block)

    - -
    -

    Destructively converts all keys by using the block operation. This includes the keys from the root hash and from all nested hashes and arrays.

    -
    - +
    +

    Destructively converts all keys by using the block operation. This includes the keys from the root hash and from all nested hashes and arrays.

    +
    @@ -759,23 +681,17 @@

    -

    - - deep_transform_values(&block) - -

    +

    deep_transform_values(&block)

    - -
    -

    Returns a new hash with all values converted by the block operation. This includes the values from the root hash and from all nested hashes and arrays.

    +
    +

    Returns a new hash with all values converted by the block operation. This includes the values from the root hash and from all nested hashes and arrays.

    hash = { person: { name: 'Rob', age: '28' } }
     
     hash.deep_transform_values{ |value| value.to_s.upcase }
     # => {person: {name: "ROB", age: "28"}}
     
    -
    - +
    @@ -800,17 +716,11 @@

    -

    - - deep_transform_values!(&block) - -

    +

    deep_transform_values!(&block)

    - -
    -

    Destructively converts all values by using the block operation. This includes the values from the root hash and from all nested hashes and arrays.

    -
    - +
    +

    Destructively converts all values by using the block operation. This includes the values from the root hash and from all nested hashes and arrays.

    +
    @@ -835,22 +745,16 @@

    -

    - - except!(*keys) - -

    +

    except!(*keys)

    - -
    -

    Removes the given keys from hash and returns it.

    +
    +

    Removes the given keys from hash and returns it.

    hash = { a: true, b: false, c: nil }
     hash.except!(:c) # => { a: true, b: false }
     hash             # => { a: true, b: false }
     
    -
    - +
    @@ -876,22 +780,16 @@

    -

    - - extract!(*keys) - -

    +

    extract!(*keys)

    - -
    -

    Removes and returns the key/value pairs matching the given keys.

    +
    +

    Removes and returns the key/value pairs matching the given keys.

    hash = { a: 1, b: 2, c: 3, d: 4 }
     hash.extract!(:a, :b) # => {:a=>1, :b=>2}
     hash                  # => {:c=>3, :d=>4}
     
    -
    - +
    @@ -916,17 +814,11 @@

    -

    - - extractable_options?() - -

    +

    extractable_options?()

    - -
    -

    By default, only instances of Hash itself are extractable. Subclasses of Hash may implement this method and return true to declare themselves as extractable. If a Hash is extractable, Array#extract_options! pops it from the Array when it is the last element of the Array.

    -
    - +
    +

    By default, only instances of Hash itself are extractable. Subclasses of Hash may implement this method and return true to declare themselves as extractable. If a Hash is extractable, Array#extract_options! pops it from the Array when it is the last element of the Array.

    +
    @@ -951,29 +843,24 @@

    -

    - - nested_under_indifferent_access() - -

    +

    nested_under_indifferent_access()

    - -
    -

    Called when object is nested under an object that receives with_indifferent_access. This method will be called on the current object by the enclosing object and is aliased to with_indifferent_access by default. Subclasses of Hash may override this method to return self if converting to an ActiveSupport::HashWithIndifferentAccess would not be desirable.

    +
    +

    Called when object is nested under an object that receives with_indifferent_access. This method will be called on the current object by the enclosing object and is aliased to with_indifferent_access by default. Subclasses of Hash may override this method to return self if converting to an ActiveSupport::HashWithIndifferentAccess would not be desirable.

    b = { b: 1 }
     { a: b }.with_indifferent_access['a'] # calls b.nested_under_indifferent_access
     # => {"b"=>1}
     
    -
    - +
    -
    - Alias for: with_indifferent_access -
    +

    + Alias for: + with_indifferent_access. +

    @@ -981,15 +868,10 @@

    -

    - - reverse_merge(other_hash) - -

    +

    reverse_merge(other_hash)

    - -
    -

    Merges the caller into other_hash. For example,

    +
    +

    Merges the caller into other_hash. For example,

    options = options.reverse_merge(size: 25, velocity: 10)
     
    @@ -1000,13 +882,14 @@

    This is particularly useful for initializing an options hash with default values.

    -

    - +
    -
    - Also aliased as: with_defaults -
    +

    + Also aliased as: + + with_defaults. +

    @@ -1030,22 +913,18 @@

    -

    - - reverse_merge!(other_hash) - -

    +

    reverse_merge!(other_hash)

    - -
    -

    Destructive reverse_merge.

    -
    - +
    +

    Destructive reverse_merge.

    +
    -
    - Also aliased as: reverse_update, with_defaults! -
    +

    + Also aliased as: + + reverse_update, with_defaults!. +

    @@ -1069,24 +948,17 @@

    -

    - - reverse_update(other_hash) - -

    +

    reverse_update(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge! -
    +

    + Alias for: + reverse_merge!. +

    @@ -1094,22 +966,16 @@

    -

    - - slice!(*keys) - -

    +

    slice!(*keys)

    - -
    -

    Replaces the hash with only the given keys. Returns a hash containing the removed key/value pairs.

    +
    +

    Replaces the hash with only the given keys. Returns a hash containing the removed key/value pairs.

    hash = { a: 1, b: 2, c: 3, d: 4 }
     hash.slice!(:a, :b)  # => {:c=>3, :d=>4}
     hash                 # => {:a=>1, :b=>2}
     
    -
    - +
    @@ -1139,23 +1005,17 @@

    -

    - - stringify_keys() - -

    +

    stringify_keys()

    - -
    -

    Returns a new hash with all keys converted to strings.

    +
    +

    Returns a new hash with all keys converted to strings.

    hash = { name: 'Rob', age: '28' }
     
     hash.stringify_keys
     # => {"name"=>"Rob", "age"=>"28"}
     
    -
    - +
    @@ -1180,17 +1040,11 @@

    -

    - - stringify_keys!() - -

    +

    stringify_keys!()

    - -
    -

    Destructively converts all keys to strings. Same as stringify_keys, but modifies self.

    -
    - +
    +

    Destructively converts all keys to strings. Same as stringify_keys, but modifies self.

    +
    @@ -1215,28 +1069,24 @@

    -

    - - symbolize_keys() - -

    +

    symbolize_keys()

    - -
    -

    Returns a new hash with all keys converted to symbols, as long as they respond to to_sym.

    +
    +

    Returns a new hash with all keys converted to symbols, as long as they respond to to_sym.

    hash = { 'name' => 'Rob', 'age' => '28' }
     
     hash.symbolize_keys
     # => {:name=>"Rob", :age=>"28"}
     
    -
    - +
    -
    - Also aliased as: to_options -
    +

    + Also aliased as: + + to_options. +

    @@ -1260,22 +1110,18 @@

    -

    - - symbolize_keys!() - -

    +

    symbolize_keys!()

    - -
    -

    Destructively converts all keys to symbols, as long as they respond to to_sym. Same as symbolize_keys, but modifies self.

    -
    - +
    +

    Destructively converts all keys to symbols, as long as they respond to to_sym. Same as symbolize_keys, but modifies self.

    +
    -
    - Also aliased as: to_options! -
    +

    + Also aliased as: + + to_options!. +

    @@ -1299,24 +1145,17 @@

    -

    - - to_options() - -

    +

    to_options()

    -
    - -
    - -
    - Alias for: symbolize_keys -
    +

    + Alias for: + symbolize_keys. +

    @@ -1324,24 +1163,17 @@

    -

    - - to_options!() - -

    +

    to_options!()

    -
    - -
    - -
    - Alias for: symbolize_keys! -
    +

    + Alias for: + symbolize_keys!. +

    @@ -1349,24 +1181,17 @@

    -

    - - to_param(namespace = nil) - -

    +

    to_param(namespace = nil)

    -
    - -
    - -
    - Alias for: to_query -
    +

    + Alias for: + to_query. +

    @@ -1374,15 +1199,10 @@

    -

    - - to_query(namespace = nil) - -

    +

    to_query(namespace = nil)

    - -
    -

    Returns a string representation of the receiver suitable for use as a URL query string:

    +
    +

    Returns a string representation of the receiver suitable for use as a URL query string:

    {name: 'David', nationality: 'Danish'}.to_query
     # => "name=David&nationality=Danish"
    @@ -1395,13 +1215,14 @@ 

    The string pairs “key=value” that conform the query string are sorted lexicographically in ascending order.

    -
    - +
    -
    - Also aliased as: to_param -
    +

    + Also aliased as: + + to_param. +

    @@ -1432,15 +1253,10 @@

    -

    - - to_xml(options = {}) - -

    +

    to_xml(options = {})

    - -
    -

    Returns a string containing an XML representation of its receiver:

    +
    +

    Returns a string containing an XML representation of its receiver:

    { foo: 1, bar: 2 }.to_xml
     # =>
    @@ -1497,8 +1313,7 @@ 

    By default the root node is “hash”, but that’s configurable via the :root option.

    The default XML builder is a fresh instance of Builder::XmlMarkup. You can configure your own builder with the :builder option. The method also accepts options like :dasherize and friends, they are forwarded to the builder.

    -

    - +
    @@ -1538,24 +1353,17 @@

    -

    - - with_defaults(other_hash) - -

    +

    with_defaults(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge -
    +

    + Alias for: + reverse_merge. +

    @@ -1563,24 +1371,17 @@

    -

    - - with_defaults!(other_hash) - -

    +

    with_defaults!(other_hash)

    -
    - -
    - -
    - Alias for: reverse_merge! -
    +

    + Alias for: + reverse_merge!. +

    @@ -1588,25 +1389,21 @@

    -

    - - with_indifferent_access() - -

    +

    with_indifferent_access()

    - -
    -

    Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver:

    +
    +

    Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver:

    { a: 1 }.with_indifferent_access['a'] # => 1
     
    -
    - +
    -
    - Also aliased as: nested_under_indifferent_access -
    +

    + Also aliased as: + + nested_under_indifferent_access. +

    diff --git a/src/classes/Integer.html b/src/classes/Integer.html index 87cba3d59f..3d14f0cce5 100644 --- a/src/classes/Integer.html +++ b/src/classes/Integer.html @@ -92,24 +92,17 @@

    Methods

    Instance Public methods

    -

    - - month() - -

    +

    month()

    -
    - -
    - -
    - Alias for: months -
    +

    + Alias for: + months. +

    @@ -117,25 +110,21 @@

    -

    - - months() - -

    +

    months()

    - -
    -

    Returns a Duration instance matching the number of months provided.

    +
    +

    Returns a Duration instance matching the number of months provided.

    2.months # => 2 months
     
    -
    - +
    -
    - Also aliased as: month -
    +

    + Also aliased as: + + month. +

    @@ -159,22 +148,16 @@

    -

    - - multiple_of?(number) - -

    +

    multiple_of?(number)

    - -
    -

    Check whether the integer is evenly divisible by the argument.

    +
    +

    Check whether the integer is evenly divisible by the argument.

    0.multiple_of?(0)  # => true
     6.multiple_of?(5)  # => false
     10.multiple_of?(2) # => true
     
    -
    - +
    @@ -199,15 +182,10 @@

    -

    - - ordinal() - -

    +

    ordinal()

    - -
    -

    Ordinal returns the suffix used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    +
    +

    Ordinal returns the suffix used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    1.ordinal     # => "st"
     2.ordinal     # => "nd"
    @@ -216,8 +194,7 @@ 

    -11.ordinal # => "th" -1001.ordinal # => "st"

    -
    - +
    @@ -242,15 +219,10 @@

    -

    - - ordinalize() - -

    +

    ordinalize()

    - -
    -

    Ordinalize turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    +
    +

    Ordinalize turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

    1.ordinalize     # => "1st"
     2.ordinalize     # => "2nd"
    @@ -259,8 +231,7 @@ 

    -11.ordinalize # => "-11th" -1001.ordinalize # => "-1001st"

    -
    - +
    @@ -285,24 +256,17 @@

    -

    - - year() - -

    +

    year()

    -
    - -
    - -
    - Alias for: years -
    +

    + Alias for: + years. +

    @@ -310,25 +274,21 @@

    -

    - - years() - -

    +

    years()

    - -
    -

    Returns a Duration instance matching the number of years provided.

    +
    +

    Returns a Duration instance matching the number of years provided.

    2.years # => 2 years
     
    -
    - +
    -
    - Also aliased as: year -
    +

    + Also aliased as: + + year. +

    diff --git a/src/classes/Kernel.html b/src/classes/Kernel.html index 96a0f71248..80d84659fc 100644 --- a/src/classes/Kernel.html +++ b/src/classes/Kernel.html @@ -82,17 +82,11 @@

    Methods

    Instance Public methods

    -

    - - class_eval(*args, &block) - -

    +

    class_eval(*args, &block)

    - -
    -

    class_eval on an object acts like singleton_class.class_eval.

    -
    - +
    +

    class_eval on an object acts like singleton_class.class_eval.

    +
    @@ -117,19 +111,13 @@

    -

    - - concern(topic, &module_definition) - -

    +

    concern(topic, &module_definition)

    - -
    -

    A shortcut to define a toplevel concern, not within a module.

    +
    +

    A shortcut to define a toplevel concern, not within a module.

    See Module::Concerning for more.

    -
    - +
    @@ -154,17 +142,11 @@

    -

    - - enable_warnings(&block) - -

    +

    enable_warnings(&block)

    - -
    -

    Sets $VERBOSE to true for the duration of the block and back to its original value afterwards.

    -
    - +
    +

    Sets $VERBOSE to true for the duration of the block and back to its original value afterwards.

    +
    @@ -189,15 +171,10 @@

    -

    - - silence_warnings(&block) - -

    +

    silence_warnings(&block)

    - -
    -

    Sets $VERBOSE to nil for the duration of the block and back to its original value afterwards.

    +
    +

    Sets $VERBOSE to nil for the duration of the block and back to its original value afterwards.

    silence_warnings do
       value = noisy_call # no warning voiced
    @@ -205,8 +182,7 @@ 

    noisy_call # warning voiced

    -
    - +
    @@ -231,15 +207,10 @@

    -

    - - suppress(*exception_classes) - -

    +

    suppress(*exception_classes)

    - -
    -

    Blocks and ignores any exception passed as argument if raised within the block.

    +
    +

    Blocks and ignores any exception passed as argument if raised within the block.

    suppress(ZeroDivisionError) do
       1/0
    @@ -248,8 +219,7 @@ 

    puts 'This code gets executed and nothing related to ZeroDivisionError was seen'

    -
    - +
    @@ -275,17 +245,11 @@

    -

    - - with_warnings(flag) - -

    +

    with_warnings(flag)

    - -
    -

    Sets $VERBOSE for the duration of the block and back to its original value afterwards.

    -
    - +
    +

    Sets $VERBOSE for the duration of the block and back to its original value afterwards.

    +
    diff --git a/src/classes/LoadError.html b/src/classes/LoadError.html index 44f5ddd39b..8e28697688 100644 --- a/src/classes/LoadError.html +++ b/src/classes/LoadError.html @@ -64,17 +64,11 @@

    Methods

    Instance Public methods

    -

    - - is_missing?(location) - -

    +

    is_missing?(location)

    - -
    -

    Returns true if the given path name (except perhaps for the “.rb” extension) is the missing file which caused the exception to be raised.

    -
    - +
    +

    Returns true if the given path name (except perhaps for the “.rb” extension) is the missing file which caused the exception to be raised.

    +
    diff --git a/src/classes/Mail.html b/src/classes/Mail.html index ebcc69925f..e1e202ba8e 100644 --- a/src/classes/Mail.html +++ b/src/classes/Mail.html @@ -86,17 +86,9 @@

    Methods

    Class Public methods

    -

    - - from_source(source) - -

    +

    from_source(source)

    -
    - -
    - diff --git a/src/classes/Mail/Address.html b/src/classes/Mail/Address.html index 7b315ca0e8..4e2dd063d9 100644 --- a/src/classes/Mail/Address.html +++ b/src/classes/Mail/Address.html @@ -69,17 +69,9 @@

    Methods

    Class Public methods

    -

    - - wrap(address) - -

    +

    wrap(address)

    -
    - -
    - @@ -108,17 +100,9 @@

    Instance Public methods

    -

    - - ==(other_address) - -

    +

    ==(other_address)

    -
    - -
    - diff --git a/src/classes/Mail/Message.html b/src/classes/Mail/Message.html index 5cdf350041..2385dbebcb 100644 --- a/src/classes/Mail/Message.html +++ b/src/classes/Mail/Message.html @@ -98,17 +98,9 @@

    Methods

    Instance Public methods

    -

    - - bcc_addresses() - -

    +

    bcc_addresses()

    -
    - -
    - @@ -133,17 +125,9 @@

    -

    - - cc_addresses() - -

    +

    cc_addresses()

    -
    - -
    - @@ -168,17 +152,9 @@

    -

    - - from_address() - -

    +

    from_address()

    -
    - -
    - @@ -203,17 +179,9 @@

    -

    - - recipients() - -

    +

    recipients()

    -
    - -
    - @@ -239,17 +207,9 @@

    -

    - - recipients_addresses() - -

    +

    recipients_addresses()

    -
    - -
    - @@ -274,17 +234,9 @@

    -

    - - reply_to_address() - -

    +

    reply_to_address()

    -
    - -
    - @@ -309,17 +261,9 @@

    -

    - - to_addresses() - -

    +

    to_addresses()

    -
    - -
    - @@ -344,17 +288,9 @@

    -

    - - x_forwarded_to_addresses() - -

    +

    x_forwarded_to_addresses()

    -
    - -
    - @@ -379,17 +315,9 @@

    -

    - - x_original_to_addresses() - -

    +

    x_original_to_addresses()

    -
    - -
    - diff --git a/src/classes/Method.html b/src/classes/Method.html index ef7532b7f3..edc2639d4c 100644 --- a/src/classes/Method.html +++ b/src/classes/Method.html @@ -64,21 +64,15 @@

    Methods

    Instance Public methods

    -

    - - duplicable?() - -

    +

    duplicable?()

    - -
    -

    Methods are not duplicable:

    +
    +

    Methods are not duplicable:

    method(:puts).duplicable? # => false
     method(:puts).dup         # => TypeError: allocator undefined for Method
     
    -
    - +
    diff --git a/src/classes/Mime.html b/src/classes/Mime.html index 13f481f8ae..25a26cad25 100644 --- a/src/classes/Mime.html +++ b/src/classes/Mime.html @@ -129,17 +129,9 @@

    Constants

    Class Public methods

    -

    - - [](type) - -

    +

    [](type)

    -
    - -
    - @@ -165,17 +157,9 @@

    -

    - - fetch(type, &block) - -

    +

    fetch(type, &block)

    -
    - -
    - @@ -201,17 +185,9 @@

    -

    - - symbols() - -

    +

    symbols()

    -
    - -
    - diff --git a/src/classes/Mime/AllType.html b/src/classes/Mime/AllType.html index 20346c51cf..5e32184020 100644 --- a/src/classes/Mime/AllType.html +++ b/src/classes/Mime/AllType.html @@ -85,17 +85,9 @@

    Included Modules

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -124,17 +116,9 @@

    Instance Public methods

    -

    - - all?() - -

    +

    all?()

    -
    - -
    - @@ -157,17 +141,9 @@

    -

    - - html?() - -

    +

    html?()

    -
    - -
    - diff --git a/src/classes/Mime/Mimes.html b/src/classes/Mime/Mimes.html index bf373adb0a..6dee742aa1 100644 --- a/src/classes/Mime/Mimes.html +++ b/src/classes/Mime/Mimes.html @@ -107,17 +107,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -148,17 +140,9 @@

    Instance Public methods

    -

    - - <<(type) - -

    +

    <<(type)

    -
    - -
    - @@ -186,17 +170,9 @@

    -

    - - delete_if() - -

    +

    delete_if()

    -
    - -
    - @@ -228,17 +204,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -263,17 +231,9 @@

    -

    - - valid_symbols?(symbols) - -

    +

    valid_symbols?(symbols)

    -
    - -
    - diff --git a/src/classes/Mime/NullType.html b/src/classes/Mime/NullType.html index 72bdb77cb3..22af3ff797 100644 --- a/src/classes/Mime/NullType.html +++ b/src/classes/Mime/NullType.html @@ -86,17 +86,9 @@

    Included Modules

    Instance Public methods

    -

    - - nil?() - -

    +

    nil?()

    -
    - -
    - @@ -121,17 +113,9 @@

    -

    - - ref() - -

    +

    ref()

    -
    - -
    - @@ -154,17 +138,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/Mime/Type.html b/src/classes/Mime/Type.html index 2f4d8ccdd1..e4a83dd4e4 100644 --- a/src/classes/Mime/Type.html +++ b/src/classes/Mime/Type.html @@ -273,17 +273,9 @@

    Attributes

    Class Public methods

    -

    - - lookup(string) - -

    +

    lookup(string)

    -
    - -
    - @@ -312,17 +304,9 @@

    -

    - - lookup_by_extension(extension) - -

    +

    lookup_by_extension(extension)

    -
    - -
    - @@ -347,17 +331,9 @@

    -

    - - new(string, symbol = nil, synonyms = []) - -

    +

    new(string, symbol = nil, synonyms = [])

    -
    - -
    - @@ -387,17 +363,9 @@

    -

    - - parse(accept_header) - -

    +

    parse(accept_header)

    -
    - -
    - @@ -445,19 +413,13 @@

    -

    - - parse_data_with_trailing_star(type) - -

    +

    parse_data_with_trailing_star(type)

    - -
    -

    For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]].

    +
    +

    For an input of 'text', returns [Mime[:json], Mime[:xml], Mime[:ics], Mime[:html], Mime[:css], Mime[:csv], Mime[:js], Mime[:yaml], Mime[:text]].

    For an input of 'application', returns [Mime[:html], Mime[:js], Mime[:xml], Mime[:yaml], Mime[:atom], Mime[:json], Mime[:rss], Mime[:url_encoded_form]].

    -
    - +
    @@ -482,17 +444,9 @@

    -

    - - parse_trailing_star(accept_header) - -

    +

    parse_trailing_star(accept_header)

    -
    - -
    - @@ -517,17 +471,9 @@

    -

    - - register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false) - -

    +

    register(string, symbol, mime_type_synonyms = [], extension_synonyms = [], skip_lookup = false)

    -
    - -
    - @@ -562,17 +508,11 @@

    -

    - - register_alias(string, symbol, extension_synonyms = []) - -

    +

    register_alias(string, symbol, extension_synonyms = [])

    - -
    -

    Registers an alias that’s not used on MIME type lookup, but can be referenced directly. Especially useful for rendering different HTML versions depending on the user agent, like an iPhone.

    -
    - +
    +

    Registers an alias that’s not used on MIME type lookup, but can be referenced directly. Especially useful for rendering different HTML versions depending on the user agent, like an iPhone.

    +
    @@ -597,17 +537,9 @@

    -

    - - register_callback(&block) - -

    +

    register_callback(&block)

    -
    - -
    - @@ -632,22 +564,16 @@

    -

    - - unregister(symbol) - -

    +

    unregister(symbol)

    - -
    -

    This method is opposite of register method.

    +
    +

    This method is opposite of register method.

    To unregister a MIME type:

    Mime::Type.unregister(:mobile)
     
    -
    - +
    @@ -681,17 +607,9 @@

    Instance Public methods

    -

    - - ==(mime_type) - -

    +

    ==(mime_type)

    -
    - -
    - @@ -719,17 +637,9 @@

    -

    - - ===(list) - -

    +

    ===(list)

    -
    - -
    - @@ -758,17 +668,9 @@

    -

    - - =~(mime_type) - -

    +

    =~(mime_type)

    -
    - -
    - @@ -795,17 +697,9 @@

    -

    - - all?() - -

    +

    all?()

    -
    - -
    - @@ -828,17 +722,9 @@

    -

    - - eql?(other) - -

    +

    eql?(other)

    -
    - -
    - @@ -866,17 +752,9 @@

    -

    - - html?() - -

    +

    html?()

    -
    - -
    - @@ -901,17 +779,9 @@

    -

    - - match?(mime_type) - -

    +

    match?(mime_type)

    -
    - -
    - @@ -938,17 +808,9 @@

    -

    - - ref() - -

    +

    ref()

    -
    - -
    - @@ -973,17 +835,9 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - @@ -1008,17 +862,9 @@

    -

    - - to_str() - -

    +

    to_str()

    -
    - -
    - @@ -1043,17 +889,9 @@

    -

    - - to_sym() - -

    +

    to_sym()

    -
    - -
    - diff --git a/src/classes/Minitest.html b/src/classes/Minitest.html index a6a331da90..f7c4ecb0c8 100644 --- a/src/classes/Minitest.html +++ b/src/classes/Minitest.html @@ -78,17 +78,11 @@

    Methods

    Class Public methods

    -

    - - plugin_rails_init(options) - -

    +

    plugin_rails_init(options)

    - -
    -

    Owes great inspiration to test runner trailblazers like RSpec, minitest-reporters, maxitest, and others.

    -
    - +
    +

    Owes great inspiration to test runner trailblazers like RSpec, minitest-reporters, maxitest, and others.

    +
    @@ -136,17 +130,9 @@

    -

    - - plugin_rails_options(opts, options) - -

    +

    plugin_rails_options(opts, options)

    -
    - -
    - diff --git a/src/classes/Minitest/BacktraceFilterWithFallback.html b/src/classes/Minitest/BacktraceFilterWithFallback.html index d7532a7386..38b0fd4ca2 100644 --- a/src/classes/Minitest/BacktraceFilterWithFallback.html +++ b/src/classes/Minitest/BacktraceFilterWithFallback.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(preferred, fallback) - -

    +

    new(preferred, fallback)

    -
    - -
    - @@ -107,17 +99,9 @@

    Instance Public methods

    -

    - - filter(backtrace) - -

    +

    filter(backtrace)

    -
    - -
    - diff --git a/src/classes/Minitest/ProfileReporter.html b/src/classes/Minitest/ProfileReporter.html index 6bb6575b56..009adc9ca9 100644 --- a/src/classes/Minitest/ProfileReporter.html +++ b/src/classes/Minitest/ProfileReporter.html @@ -93,17 +93,9 @@

    Attributes

    Class Public methods

    -

    - - new(io = $stdout, options = {}) - -

    +

    new(io = $stdout, options = {})

    -
    - -
    - @@ -134,17 +126,9 @@

    Instance Public methods

    -

    - - passed?() - -

    +

    passed?()

    -
    - -
    - @@ -169,17 +153,9 @@

    -

    - - record(result) - -

    +

    record(result)

    -
    - -
    - @@ -213,17 +189,9 @@

    -

    - - report() - -

    +

    report()

    -
    - -
    - @@ -250,17 +218,9 @@

    -

    - - summary() - -

    +

    summary()

    -
    - -
    - diff --git a/src/classes/Minitest/SuppressedSummaryReporter.html b/src/classes/Minitest/SuppressedSummaryReporter.html index c7338c2173..5e099de9e0 100644 --- a/src/classes/Minitest/SuppressedSummaryReporter.html +++ b/src/classes/Minitest/SuppressedSummaryReporter.html @@ -64,17 +64,11 @@

    Methods

    Instance Public methods

    -

    - - aggregated_results(*) - -

    +

    aggregated_results(*)

    - -
    -

    Disable extra failure output after a run if output is inline.

    -
    - +
    +

    Disable extra failure output after a run if output is inline.

    +
    diff --git a/src/classes/Module.html b/src/classes/Module.html index 87fac9feab..2e6d3d2dd0 100644 --- a/src/classes/Module.html +++ b/src/classes/Module.html @@ -248,17 +248,9 @@

    Attributes

    Class Public methods

    -

    - - attr_internal_naming_format=(format) - -

    +

    attr_internal_naming_format=(format)

    -
    - -
    - @@ -295,15 +287,10 @@

    Instance Public methods

    -

    - - alias_attribute(new_name, old_name) - -

    +

    alias_attribute(new_name, old_name)

    - -
    -

    Allows you to make aliases for attributes, which includes getter, setter, and a predicate.

    +
    +

    Allows you to make aliases for attributes, which includes getter, setter, and a predicate.

    class Content < ActiveRecord::Base
       # has a title attribute
    @@ -320,8 +307,7 @@ 

    e.subject = "Megastars" e.title # => "Megastars"

    -
    - +
    @@ -353,15 +339,10 @@

    -

    - - anonymous?() - -

    +

    anonymous?()

    - -
    -

    A module may or may not have a name.

    +
    +

    A module may or may not have a name.

    module M; end
     M.name # => "M"
    @@ -386,8 +367,7 @@ 

    m.name # => "M" m.anonymous? # => false

    -
    - +
    @@ -412,24 +392,17 @@

    -

    - - attr_internal(*attrs) - -

    +

    attr_internal(*attrs)

    -
    - -
    - -
    - Alias for: attr_internal_accessor -
    +

    + Alias for: + attr_internal_accessor. +

    @@ -437,22 +410,18 @@

    -

    - - attr_internal_accessor(*attrs) - -

    +

    attr_internal_accessor(*attrs)

    - -
    -

    Declares an attribute reader and writer backed by an internally-named instance variable.

    -
    - +
    +

    Declares an attribute reader and writer backed by an internally-named instance variable.

    +
    -
    - Also aliased as: attr_internal -
    +

    + Also aliased as: + + attr_internal. +

    @@ -477,17 +446,11 @@

    -

    - - attr_internal_reader(*attrs) - -

    +

    attr_internal_reader(*attrs)

    - -
    -

    Declares an attribute reader backed by an internally-named instance variable.

    -
    - +
    +

    Declares an attribute reader backed by an internally-named instance variable.

    +
    @@ -512,17 +475,11 @@

    -

    - - attr_internal_writer(*attrs) - -

    +

    attr_internal_writer(*attrs)

    - -
    -

    Declares an attribute writer backed by an internally-named instance variable.

    -
    - +
    +

    Declares an attribute writer backed by an internally-named instance variable.

    +
    @@ -547,24 +504,17 @@

    -

    - - cattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk) - -

    +

    cattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk)

    -
    - -
    - -
    - Alias for: mattr_accessor -
    +

    + Alias for: + mattr_accessor. +

    @@ -572,24 +522,17 @@

    -

    - - cattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil) - -

    +

    cattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil)

    -
    - -
    - -
    - Alias for: mattr_reader -
    +

    + Alias for: + mattr_reader. +

    @@ -597,24 +540,17 @@

    -

    - - cattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil) - -

    +

    cattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil)

    -
    - -
    - -
    - Alias for: mattr_writer -
    +

    + Alias for: + mattr_writer. +

    @@ -622,22 +558,16 @@

    -

    - - deep_dup() - -

    +

    deep_dup()

    - -
    -

    Returns a copy of module or class if it’s anonymous. If it’s named, returns self.

    +
    +

    Returns a copy of module or class if it’s anonymous. If it’s named, returns self.

    Object.deep_dup == Object # => true
     klass = Class.new
     klass.deep_dup == klass # => false
     
    -
    - +
    @@ -666,15 +596,10 @@

    -

    - - delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil) - -

    +

    delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil)

    - -
    -

    Provides a delegate class method to easily expose contained objects’ public methods as your own.

    +
    +

    Provides a delegate class method to easily expose contained objects’ public methods as your own.

    Options

    • @@ -829,8 +754,7 @@

      Options

      The target method must be public, otherwise it will raise NoMethodError.

      -
    - +
    @@ -863,15 +787,10 @@

    Options

    -

    - - delegate_missing_to(target, allow_nil: nil) - -

    +

    delegate_missing_to(target, allow_nil: nil)

    - -
    -

    When building decorators, a common pattern may emerge:

    +
    +

    When building decorators, a common pattern may emerge:

    class Partition
       def initialize(event)
    @@ -913,8 +832,7 @@ 

    The delegated method must be public on the target, otherwise it will raise ActiveSupport::DelegationError. If you wish to instead return nil, use the :allow_nil option.

    The marshal_dump and _dump methods are exempt from delegation due to possible interference when calling Marshal.dump(object), should the delegation target method of object add or remove instance variables.

    -

    - +
    @@ -943,15 +861,10 @@

    -

    - - deprecate(*method_names, deprecator:, **options) - -

    +

    deprecate(*method_names, deprecator:, **options)

    - -
    -
    deprecate :foo, deprecator: MyLib.deprecator
    +          
    +
    deprecate :foo, deprecator: MyLib.deprecator
     deprecate :foo, bar: "warning!", deprecator: MyLib.deprecator
     
    @@ -964,8 +877,7 @@

    end end

    -
    - +
    @@ -995,15 +907,10 @@

    -

    - - mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk) - -

    +

    mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil, &blk)

    - -
    -

    Defines both class and instance accessors for class attributes. All class and instance methods created will be public, even if this method is called with a private or protected access modifier.

    +
    +

    Defines both class and instance accessors for class attributes. All class and instance methods created will be public, even if this method is called with a private or protected access modifier.

    module HairColors
       mattr_accessor :hair_colors
    @@ -1069,13 +976,14 @@ 

    Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] Person.class_variable_get("@@hair_styles") # => [:long, :short]

    -
    - +
    -
    - Also aliased as: cattr_accessor -
    +

    + Also aliased as: + + cattr_accessor. +

    @@ -1101,15 +1009,10 @@

    -

    - - mattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil) - -

    +

    mattr_reader(*syms, instance_reader: true, instance_accessor: true, default: nil, location: nil)

    - -
    -

    Defines a class attribute and creates a class and instance reader methods. The underlying class variable is set to nil, if it is not previously defined. All class and instance methods created will be public, even if this method is called with a private or protected access modifier.

    +
    +

    Defines a class attribute and creates a class and instance reader methods. The underlying class variable is set to nil, if it is not previously defined. All class and instance methods created will be public, even if this method is called with a private or protected access modifier.

    module HairColors
       mattr_reader :hair_colors
    @@ -1155,13 +1058,14 @@ 

    Person.new.hair_colors # => [:brown, :black, :blonde, :red] Person.new.hair_styles # => [:long, :short]

    -
    - +
    -
    - Also aliased as: cattr_reader -
    +

    + Also aliased as: + + cattr_reader. +

    @@ -1202,15 +1106,10 @@

    -

    - - mattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil) - -

    +

    mattr_writer(*syms, instance_writer: true, instance_accessor: true, default: nil, location: nil)

    - -
    -

    Defines a class attribute and creates a class and instance writer methods to allow assignment to the attribute. All class and instance methods created will be public, even if this method is called with a private or protected access modifier.

    +
    +

    Defines a class attribute and creates a class and instance writer methods to allow assignment to the attribute. All class and instance methods created will be public, even if this method is called with a private or protected access modifier.

    module HairColors
       mattr_writer :hair_colors
    @@ -1253,13 +1152,14 @@ 

    Person.class_variable_get("@@hair_colors") # => [:brown, :black, :blonde, :red] Person.class_variable_get("@@hair_styles") # => [:long, :short]

    -
    - +
    -
    - Also aliased as: cattr_writer -
    +

    + Also aliased as: + + cattr_writer. +

    @@ -1299,15 +1199,10 @@

    -

    - - module_parent() - -

    +

    module_parent()

    - -
    -

    Returns the module which contains this one according to its name.

    +
    +

    Returns the module which contains this one according to its name.

    module M
       module N
    @@ -1324,8 +1219,7 @@ 

    M.module_parent          # => Object
     Module.new.module_parent # => Object
     
    -

    - +
    @@ -1350,20 +1244,14 @@

    -

    - - module_parent_name() - -

    +

    module_parent_name()

    - -
    -

    Returns the name of the module containing this one.

    +
    +

    Returns the name of the module containing this one.

    M::N.module_parent_name # => "M"
     
    -
    - +
    @@ -1397,15 +1285,10 @@

    -

    - - module_parents() - -

    +

    module_parents()

    - -
    -

    Returns all the parents of this module according to its name, ordered from nested outwards. The receiver is not contained within the result.

    +
    +

    Returns all the parents of this module according to its name, ordered from nested outwards. The receiver is not contained within the result.

    module M
       module N
    @@ -1417,8 +1300,7 @@ 

    M::N.module_parents # => [M, Object] X.module_parents # => [M, Object]

    -
    - +
    @@ -1452,17 +1334,11 @@

    -

    - - redefine_method(method, &block) - -

    +

    redefine_method(method, &block)

    - -
    -

    Replaces the existing method definition, if there is one, with the passed block as its body.

    -
    - +
    +

    Replaces the existing method definition, if there is one, with the passed block as its body.

    +
    @@ -1490,17 +1366,11 @@

    -

    - - redefine_singleton_method(method, &block) - -

    +

    redefine_singleton_method(method, &block)

    - -
    -

    Replaces the existing singleton method definition, if there is one, with the passed block as its body.

    -
    - +
    +

    Replaces the existing singleton method definition, if there is one, with the passed block as its body.

    +
    @@ -1525,17 +1395,11 @@

    -

    - - remove_possible_method(method) - -

    +

    remove_possible_method(method)

    - -
    -

    Removes the named method, if it exists.

    -
    - +
    +

    Removes the named method, if it exists.

    +
    @@ -1562,17 +1426,11 @@

    -

    - - remove_possible_singleton_method(method) - -

    +

    remove_possible_singleton_method(method)

    - -
    -

    Removes the named singleton method, if it exists.

    -
    - +
    +

    Removes the named singleton method, if it exists.

    +
    @@ -1597,17 +1455,11 @@

    -

    - - silence_redefinition_of_method(method) - -

    +

    silence_redefinition_of_method(method)

    - -
    -

    Marks the named method as intended to be redefined, if it exists. Suppresses the Ruby method redefinition warning. Prefer redefine_method where possible.

    -
    - +
    +

    Marks the named method as intended to be redefined, if it exists. Suppresses the Ruby method redefinition warning. Prefer redefine_method where possible.

    +
    @@ -1636,24 +1488,17 @@

    -

    - - thread_cattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil) - -

    +

    thread_cattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil)

    -
    - -
    - -
    - Alias for: thread_mattr_accessor -
    +

    + Alias for: + thread_mattr_accessor. +

    @@ -1661,15 +1506,10 @@

    -

    - - thread_mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil) - -

    +

    thread_mattr_accessor(*syms, instance_reader: true, instance_writer: true, instance_accessor: true, default: nil)

    - -
    -

    Defines both class and instance accessors for class attributes.

    +
    +

    Defines both class and instance accessors for class attributes.

    class Account
       thread_mattr_accessor :user
    @@ -1713,13 +1553,14 @@ 

    A default value may be specified using the :default option. Because multiple threads can access the default value, non-frozen default values will be duped and frozen.

    -
    - +
    -
    - Also aliased as: thread_cattr_accessor -
    +

    + Also aliased as: + + thread_cattr_accessor. +

    diff --git a/src/classes/Module/Concerning.html b/src/classes/Module/Concerning.html index cfb78ea588..ba26043cf7 100644 --- a/src/classes/Module/Concerning.html +++ b/src/classes/Module/Concerning.html @@ -169,15 +169,10 @@

    Methods

    Instance Public methods

    -

    - - concern(topic, &module_definition) - -

    +

    concern(topic, &module_definition)

    - -
    -

    A low-cruft shortcut to define a concern.

    +
    +

    A low-cruft shortcut to define a concern.

    concern :EventTracking do
       ...
    @@ -192,8 +187,7 @@ 

    ... end

    -
    - +
    @@ -221,17 +215,11 @@

    -

    - - concerning(topic, prepend: false, &block) - -

    +

    concerning(topic, prepend: false, &block)

    - -
    -

    Define a new concern and mix it in.

    -
    - +
    +

    Define a new concern and mix it in.

    +
    diff --git a/src/classes/NameError.html b/src/classes/NameError.html index e66cc0caa4..1134ab7441 100644 --- a/src/classes/NameError.html +++ b/src/classes/NameError.html @@ -68,15 +68,10 @@

    Methods

    Instance Public methods

    -

    - - missing_name() - -

    +

    missing_name()

    - -
    -

    Extract the name of the missing constant from the exception message.

    +
    +

    Extract the name of the missing constant from the exception message.

    begin
       HelloWorld
    @@ -85,8 +80,7 @@ 

    end # => "HelloWorld"

    -
    - +
    @@ -131,15 +125,10 @@

    -

    - - missing_name?(name) - -

    +

    missing_name?(name)

    - -
    -

    Was this exception raised because the given name was missing?

    +
    +

    Was this exception raised because the given name was missing?

    begin
       HelloWorld
    @@ -148,8 +137,7 @@ 

    end # => true

    -
    - +
    diff --git a/src/classes/NilClass.html b/src/classes/NilClass.html index fe4e00777d..5b2203acca 100644 --- a/src/classes/NilClass.html +++ b/src/classes/NilClass.html @@ -86,22 +86,16 @@

    Methods

    Instance Public methods

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    nil is blank:

    +
    +

    nil is blank:

    nil.blank? # => true
     

    @return [true]

    -
    - +
    @@ -126,17 +120,11 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Returns self.

    -
    - +
    +

    Returns self.

    +
    @@ -161,17 +149,11 @@

    -

    - - to_query(key) - -

    +

    to_query(key)

    - -
    -

    Returns a CGI-escaped key.

    -
    - +
    +

    Returns a CGI-escaped key.

    +
    @@ -196,15 +178,10 @@

    -

    - - try(*, &) - -

    +

    try(*, &)

    - -
    -

    Calling try on nil always returns nil. It becomes especially helpful when navigating through associations that may return nil.

    +
    +

    Calling try on nil always returns nil. It becomes especially helpful when navigating through associations that may return nil.

    nil.try(:name) # => nil
     
    @@ -218,8 +195,7 @@

    @person.try(:children).try(:first).try(:name)
     
    -

    - +
    @@ -244,20 +220,14 @@

    -

    - - try!(*, &) - -

    +

    try!(*, &)

    - -
    -

    Calling try! on nil always returns nil.

    +
    +

    Calling try! on nil always returns nil.

    nil.try!(:name) # => nil
     
    -
    - +
    diff --git a/src/classes/Numeric.html b/src/classes/Numeric.html index 57ae971f52..1af58bade2 100644 --- a/src/classes/Numeric.html +++ b/src/classes/Numeric.html @@ -243,24 +243,17 @@

    Constants

    Instance Public methods

    -

    - - byte() - -

    +

    byte()

    -
    - -
    - -
    - Alias for: bytes -
    +

    + Alias for: + bytes. +

    @@ -268,25 +261,21 @@

    -

    - - bytes() - -

    +

    bytes()

    - -
    -

    Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes

    +
    +

    Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes

    2.bytes # => 2
     
    -
    - +
    -
    - Also aliased as: byte -
    +

    + Also aliased as: + + byte. +

    @@ -310,24 +299,17 @@

    -

    - - day() - -

    +

    day()

    -
    - -
    - -
    - Alias for: days -
    +

    + Alias for: + days. +

    @@ -335,25 +317,21 @@

    -

    - - days() - -

    +

    days()

    - -
    -

    Returns a Duration instance matching the number of days provided.

    +
    +

    Returns a Duration instance matching the number of days provided.

    2.days # => 2 days
     
    -
    - +
    -
    - Also aliased as: day -
    +

    + Also aliased as: + + day. +

    @@ -377,24 +355,17 @@

    -

    - - exabyte() - -

    +

    exabyte()

    -
    - -
    - -
    - Alias for: exabytes -
    +

    + Alias for: + exabytes. +

    @@ -402,25 +373,21 @@

    -

    - - exabytes() - -

    +

    exabytes()

    - -
    -

    Returns the number of bytes equivalent to the exabytes provided.

    +
    +

    Returns the number of bytes equivalent to the exabytes provided.

    2.exabytes # => 2_305_843_009_213_693_952
     
    -
    - +
    -
    - Also aliased as: exabyte -
    +

    + Also aliased as: + + exabyte. +

    @@ -444,24 +411,17 @@

    -

    - - fortnight() - -

    +

    fortnight()

    -
    - -
    - -
    - Alias for: fortnights -
    +

    + Alias for: + fortnights. +

    @@ -469,25 +429,21 @@

    -

    - - fortnights() - -

    +

    fortnights()

    - -
    -

    Returns a Duration instance matching the number of fortnights provided.

    +
    +

    Returns a Duration instance matching the number of fortnights provided.

    2.fortnights # => 4 weeks
     
    -
    - +
    -
    - Also aliased as: fortnight -
    +

    + Also aliased as: + + fortnight. +

    @@ -511,24 +467,17 @@

    -

    - - gigabyte() - -

    +

    gigabyte()

    -
    - -
    - -
    - Alias for: gigabytes -
    +

    + Alias for: + gigabytes. +

    @@ -536,25 +485,21 @@

    -

    - - gigabytes() - -

    +

    gigabytes()

    - -
    -

    Returns the number of bytes equivalent to the gigabytes provided.

    +
    +

    Returns the number of bytes equivalent to the gigabytes provided.

    2.gigabytes # => 2_147_483_648
     
    -
    - +
    -
    - Also aliased as: gigabyte -
    +

    + Also aliased as: + + gigabyte. +

    @@ -578,24 +523,17 @@

    -

    - - hour() - -

    +

    hour()

    -
    - -
    - -
    - Alias for: hours -
    +

    + Alias for: + hours. +

    @@ -603,25 +541,21 @@

    -

    - - hours() - -

    +

    hours()

    - -
    -

    Returns a Duration instance matching the number of hours provided.

    +
    +

    Returns a Duration instance matching the number of hours provided.

    2.hours # => 2 hours
     
    -
    - +
    -
    - Also aliased as: hour -
    +

    + Also aliased as: + + hour. +

    @@ -645,17 +579,9 @@

    -

    - - html_safe?() - -

    +

    html_safe?()

    -
    - -
    - @@ -680,21 +606,15 @@

    -

    - - in_milliseconds() - -

    +

    in_milliseconds()

    - -
    -

    Returns the number of milliseconds equivalent to the seconds provided. Used with the standard time durations.

    +
    +

    Returns the number of milliseconds equivalent to the seconds provided. Used with the standard time durations.

    2.in_milliseconds # => 2000
     1.hour.in_milliseconds # => 3600000
     
    -
    - +
    @@ -719,24 +639,17 @@

    -

    - - kilobyte() - -

    +

    kilobyte()

    -
    - -
    - -
    - Alias for: kilobytes -
    +

    + Alias for: + kilobytes. +

    @@ -744,25 +657,21 @@

    -

    - - kilobytes() - -

    +

    kilobytes()

    - -
    -

    Returns the number of bytes equivalent to the kilobytes provided.

    +
    +

    Returns the number of bytes equivalent to the kilobytes provided.

    2.kilobytes # => 2048
     
    -
    - +
    -
    - Also aliased as: kilobyte -
    +

    + Also aliased as: + + kilobyte. +

    @@ -786,24 +695,17 @@

    -

    - - megabyte() - -

    +

    megabyte()

    -
    - -
    - -
    - Alias for: megabytes -
    +

    + Alias for: + megabytes. +

    @@ -811,25 +713,21 @@

    -

    - - megabytes() - -

    +

    megabytes()

    - -
    -

    Returns the number of bytes equivalent to the megabytes provided.

    +
    +

    Returns the number of bytes equivalent to the megabytes provided.

    2.megabytes # => 2_097_152
     
    -
    - +
    -
    - Also aliased as: megabyte -
    +

    + Also aliased as: + + megabyte. +

    @@ -853,24 +751,17 @@

    -

    - - minute() - -

    +

    minute()

    -
    - -
    - -
    - Alias for: minutes -
    +

    + Alias for: + minutes. +

    @@ -878,25 +769,21 @@

    -

    - - minutes() - -

    +

    minutes()

    - -
    -

    Returns a Duration instance matching the number of minutes provided.

    +
    +

    Returns a Duration instance matching the number of minutes provided.

    2.minutes # => 2 minutes
     
    -
    - +
    -
    - Also aliased as: minute -
    +

    + Also aliased as: + + minute. +

    @@ -920,24 +807,17 @@

    -

    - - petabyte() - -

    +

    petabyte()

    -
    - -
    - -
    - Alias for: petabytes -
    +

    + Alias for: + petabytes. +

    @@ -945,25 +825,21 @@

    -

    - - petabytes() - -

    +

    petabytes()

    - -
    -

    Returns the number of bytes equivalent to the petabytes provided.

    +
    +

    Returns the number of bytes equivalent to the petabytes provided.

    2.petabytes # => 2_251_799_813_685_248
     
    -
    - +
    -
    - Also aliased as: petabyte -
    +

    + Also aliased as: + + petabyte. +

    @@ -987,24 +863,17 @@

    -

    - - second() - -

    +

    second()

    -
    - -
    - -
    - Alias for: seconds -
    +

    + Alias for: + seconds. +

    @@ -1012,25 +881,21 @@

    -

    - - seconds() - -

    +

    seconds()

    - -
    -

    Returns a Duration instance matching the number of seconds provided.

    +
    +

    Returns a Duration instance matching the number of seconds provided.

    2.seconds # => 2 seconds
     
    -
    - +
    -
    - Also aliased as: second -
    +

    + Also aliased as: + + second. +

    @@ -1054,24 +919,17 @@

    -

    - - terabyte() - -

    +

    terabyte()

    -
    - -
    - -
    - Alias for: terabytes -
    +

    + Alias for: + terabytes. +

    @@ -1079,25 +937,21 @@

    -

    - - terabytes() - -

    +

    terabytes()

    - -
    -

    Returns the number of bytes equivalent to the terabytes provided.

    +
    +

    Returns the number of bytes equivalent to the terabytes provided.

    2.terabytes # => 2_199_023_255_552
     
    -
    - +
    -
    - Also aliased as: terabyte -
    +

    + Also aliased as: + + terabyte. +

    @@ -1121,24 +975,17 @@

    -

    - - week() - -

    +

    week()

    -
    - -
    - -
    - Alias for: weeks -
    +

    + Alias for: + weeks. +

    @@ -1146,25 +993,21 @@

    -

    - - weeks() - -

    +

    weeks()

    - -
    -

    Returns a Duration instance matching the number of weeks provided.

    +
    +

    Returns a Duration instance matching the number of weeks provided.

    2.weeks # => 2 weeks
     
    -
    - +
    -
    - Also aliased as: week -
    +

    + Also aliased as: + + week. +

    @@ -1188,24 +1031,17 @@

    -

    - - zettabyte() - -

    +

    zettabyte()

    -
    - -
    - -
    - Alias for: zettabytes -
    +

    + Alias for: + zettabytes. +

    @@ -1213,25 +1049,21 @@

    -

    - - zettabytes() - -

    +

    zettabytes()

    - -
    -

    Returns the number of bytes equivalent to the zettabytes provided.

    +
    +

    Returns the number of bytes equivalent to the zettabytes provided.

    2.zettabytes # => 2_361_183_241_434_822_606_848
     
    -
    - +
    -
    - Also aliased as: zettabyte -
    +

    + Also aliased as: + + zettabyte. +

    diff --git a/src/classes/Object.html b/src/classes/Object.html index e6b05e5bcb..ff76a40165 100644 --- a/src/classes/Object.html +++ b/src/classes/Object.html @@ -191,15 +191,10 @@

    Constants

    Instance Public methods

    -

    - - acts_like?(duck) - -

    +

    acts_like?(duck)

    - -
    -

    Provides a way to check whether some class acts like some other class based on the existence of an appropriately-named marker method.

    +
    +

    Provides a way to check whether some class acts like some other class based on the existence of an appropriately-named marker method.

    A class that provides the same interface as SomeClass may define a marker method named acts_like_some_class? to signal its compatibility to callers of acts_like?(:some_class).

    @@ -221,8 +216,7 @@

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    An object is blank if it’s false, empty, or a whitespace string. For example, nil, ”, ‘ ’, [], {}, and false are all blank.

    +
    +

    An object is blank if it’s false, empty, or a whitespace string. For example, nil, ”, ‘ ’, [], {}, and false are all blank.

    This simplifies

    @@ -277,8 +266,7 @@

    @return [true, false]

    -

    - +
    @@ -303,15 +291,10 @@

    -

    - - deep_dup() - -

    +

    deep_dup()

    - -
    -

    Returns a deep copy of object if it’s duplicable. If it’s not duplicable, returns self.

    +
    +

    Returns a deep copy of object if it’s duplicable. If it’s not duplicable, returns self.

    object = Object.new
     dup    = object.deep_dup
    @@ -320,8 +303,7 @@ 

    object.instance_variable_defined?(:@a) # => false dup.instance_variable_defined?(:@a) # => true

    -
    - +
    @@ -346,19 +328,13 @@

    -

    - - duplicable?() - -

    +

    duplicable?()

    - -
    -

    Can you safely dup this object?

    +
    +

    Can you safely dup this object?

    False for method objects; true otherwise.

    -
    - +
    @@ -383,17 +359,9 @@

    -

    - - html_safe?() - -

    +

    html_safe?()

    -
    - -
    - @@ -418,15 +386,10 @@

    -

    - - in?(another_object) - -

    +

    in?(another_object)

    - -
    -

    Returns true if this object is included in the argument.

    +
    +

    Returns true if this object is included in the argument.

    When argument is a Range, cover? is used to properly handle inclusion check within open ranges. Otherwise, argument must be any object which responds to include?. Usage:

    @@ -435,8 +398,7 @@

    For non Range arguments, this will throw an ArgumentError if the argument doesn’t respond to include?.

    -

    - +
    @@ -468,15 +430,10 @@

    -

    - - instance_values() - -

    +

    instance_values()

    - -
    -

    Returns a hash with string keys that maps instance variable names without “@” to their corresponding values.

    +
    +

    Returns a hash with string keys that maps instance variable names without “@” to their corresponding values.

    class C
       def initialize(x, y)
    @@ -486,8 +443,7 @@ 

    C.new(0, 1).instance_values # => {"x" => 0, "y" => 1}

    -
    - +
    @@ -514,15 +470,10 @@

    -

    - - instance_variable_names() - -

    +

    instance_variable_names()

    - -
    -

    Returns an array of instance variable names as strings including “@”.

    +
    +

    Returns an array of instance variable names as strings including “@”.

    class C
       def initialize(x, y)
    @@ -532,8 +483,7 @@ 

    C.new(0, 1).instance_variable_names # => ["@y", "@x"]

    -
    - +
    @@ -558,15 +508,10 @@

    -

    - - presence() - -

    +

    presence()

    - -
    -

    Returns the receiver if it’s present otherwise returns nil. object.presence is equivalent to

    +
    +

    Returns the receiver if it’s present otherwise returns nil. object.presence is equivalent to

    object.present? ? object : nil
     
    @@ -584,8 +529,7 @@

    @return [Object]

    -

    - +
    @@ -610,15 +554,10 @@

    -

    - - presence_in(another_object) - -

    +

    presence_in(another_object)

    - -
    -

    Returns the receiver if it’s included in the argument otherwise returns nil. Argument must be any object which responds to include?. Usage:

    +
    +

    Returns the receiver if it’s included in the argument otherwise returns nil. Argument must be any object which responds to include?. Usage:

    params[:bucket_type].presence_in %w( project calendar )
     
    @@ -626,8 +565,7 @@

    This will throw an ArgumentError if the argument doesn’t respond to include?.

    @return [Object]

    -

    - +
    @@ -652,19 +590,13 @@

    -

    - - present?() - -

    +

    present?()

    - -
    -

    An object is present if it’s not blank.

    +
    +

    An object is present if it’s not blank.

    @return [true, false]

    -
    - +
    @@ -689,17 +621,11 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Alias of to_s.

    -
    - +
    +

    Alias of to_s.

    +
    @@ -724,17 +650,11 @@

    -

    - - to_query(key) - -

    +

    to_query(key)

    - -
    -

    Converts an object into a string suitable for use as a URL query string, using the given key as the param name.

    -
    - +
    +

    Converts an object into a string suitable for use as a URL query string, using the given key as the param name.

    +
    @@ -759,16 +679,11 @@

    -

    - - try(*args, &block) +

    try(*args, &block) +

    - -

    - - -
    -

    Invokes the public method whose name goes as first argument just like public_send does, except that if the receiver does not respond to it the call returns nil rather than raising an exception.

    +
    +

    Invokes the public method whose name goes as first argument just like public_send does, except that if the receiver does not respond to it the call returns nil rather than raising an exception.

    This method is defined to be able to write

    @@ -827,8 +742,7 @@

    Please also note that try is defined on Object. Therefore, it won’t work with instances of classes that do not have Object among their ancestors, like direct subclasses of BasicObject.

    -

    - +
    @@ -841,23 +755,17 @@

    -

    - - try!(*args, &block) +

    try!(*args, &block) +

    - - - - -
    -

    Same as try, but raises a NoMethodError exception if the receiver is not nil and does not implement the tried method.

    +
    +

    Same as try, but raises a NoMethodError exception if the receiver is not nil and does not implement the tried method.

    "a".try!(:upcase) # => "A"
     nil.try!(:upcase) # => nil
     123.try!(:upcase) # => NoMethodError: undefined method `upcase' for 123:Integer
     
    -
    - +
    @@ -870,15 +778,10 @@

    -

    - - with(**attributes) - -

    +

    with(**attributes)

    - -
    -

    Set and restore public attributes around a block.

    +
    +

    Set and restore public attributes around a block.

    client.timeout # => 5
     client.with(timeout: 1) do |c|
    @@ -901,8 +804,7 @@ 

    It can be used on any object as long as both the reader and writer methods are public.

    -
    - +
    @@ -938,15 +840,10 @@

    -

    - - with_options(options, &block) - -

    +

    with_options(options, &block)

    - -
    -

    An elegant way to factor duplication out of options passed to a series of method calls. Each method called in the block, with the block variable as the receiver, will have its options merged with the default options Hash or Hash-like object provided. Each method called on the block variable must take an options hash as its final argument.

    +
    +

    An elegant way to factor duplication out of options passed to a series of method calls. Each method called in the block, with the block variable as the receiver, will have its options merged with the default options Hash or Hash-like object provided. Each method called on the block variable must take an options hash as its final argument.

    Without with_options, this code contains duplication:

    @@ -1033,8 +930,7 @@

    styled.button_tag "I'm red too!" # => <button style="color: red;">I'm red too!</button> -

    - +
    diff --git a/src/classes/Pathname.html b/src/classes/Pathname.html index 9615b81ad2..c79eef7fda 100644 --- a/src/classes/Pathname.html +++ b/src/classes/Pathname.html @@ -72,15 +72,10 @@

    Methods

    Instance Public methods

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    An Pathname is blank if it’s empty:

    +
    +

    An Pathname is blank if it’s empty:

    Pathname.new("").blank?      # => true
     Pathname.new(" ").blank?     # => false
    @@ -88,8 +83,7 @@ 

    @return [true, false]

    -
    - +
    @@ -114,15 +108,10 @@

    -

    - - existence() - -

    +

    existence()

    - -
    -

    Returns the receiver if the named file exists otherwise returns nil. pathname.existence is equivalent to

    +
    +

    Returns the receiver if the named file exists otherwise returns nil. pathname.existence is equivalent to

    pathname.exist? ? pathname : nil
     
    @@ -138,8 +127,7 @@

    @return [Pathname]

    -

    - +
    diff --git a/src/classes/Rails.html b/src/classes/Rails.html index 18403d6efe..54e4b9b7fb 100644 --- a/src/classes/Rails.html +++ b/src/classes/Rails.html @@ -494,17 +494,9 @@

    Attributes

    Class Public methods

    -

    - - application() - -

    +

    application()

    -
    - -
    - @@ -529,17 +521,9 @@

    -

    - - autoloaders() - -

    +

    autoloaders()

    -
    - -
    - @@ -564,17 +548,9 @@

    -

    - - backtrace_cleaner() - -

    +

    backtrace_cleaner()

    -
    - -
    - @@ -599,17 +575,11 @@

    -

    - - configuration() - -

    +

    configuration()

    - -
    -

    The Configuration instance used to configure the Rails environment

    -
    - +
    +

    The Configuration instance used to configure the Rails environment

    +
    @@ -634,23 +604,17 @@

    -

    - - env() - -

    +

    env()

    - -
    -

    Returns the current Rails environment.

    +
    +

    Returns the current Rails environment.

    Rails.env # => "development"
     Rails.env.development? # => true
     Rails.env.production? # => false
     Rails.env.local? # => true              true for "development" and "test", false for anything else
     
    -
    - +
    @@ -675,20 +639,14 @@

    -

    - - env=(environment) - -

    +

    env=(environment)

    - -
    -

    Sets the Rails environment.

    +
    +

    Sets the Rails environment.

    Rails.env = "staging" # => "staging"
     
    -
    - +
    @@ -713,23 +671,17 @@

    -

    - - error() - -

    +

    error()

    - -
    -

    Returns the ActiveSupport::ErrorReporter of the current Rails project, otherwise it returns nil if there is no project.

    +
    +

    Returns the ActiveSupport::ErrorReporter of the current Rails project, otherwise it returns nil if there is no project.

    Rails.error.handle(IOError) do
       # ...
     end
     Rails.error.report(error)
     
    -
    - +
    @@ -754,20 +706,14 @@

    -

    - - event() - -

    +

    event()

    - -
    -

    Returns the ActiveSupport::EventReporter of the current Rails project, otherwise it returns nil if there is no project.

    +
    +

    Returns the ActiveSupport::EventReporter of the current Rails project, otherwise it returns nil if there is no project.

    Rails.event.notify("my_event", { message: "Hello, world!" })
     
    -
    - +
    @@ -792,17 +738,11 @@

    -

    - - gem_version() - -

    +

    gem_version()

    - -
    -

    Returns the currently loaded version of Rails as a Gem::Version.

    -
    - +
    +

    Returns the currently loaded version of Rails as a Gem::Version.

    +
    @@ -827,15 +767,10 @@

    -

    - - groups(*groups) - -

    +

    groups(*groups)

    - -
    -

    Returns all Rails groups for loading based on:

    +
    +

    Returns all Rails groups for loading based on:

    • The Rails environment;

    • @@ -848,8 +783,7 @@

      # => [:default, "development", :assets] for Rails.env == "development" # => [:default, "production"] for Rails.env == "production" -

    - +
    @@ -881,21 +815,15 @@

    -

    - - public_path() - -

    +

    public_path()

    - -
    -

    Returns a Pathname object of the public folder of the current Rails project, otherwise it returns nil if there is no project:

    +
    +

    Returns a Pathname object of the public folder of the current Rails project, otherwise it returns nil if there is no project:

    Rails.public_path
       # => #<Pathname:/Users/someuser/some/path/project/public>
     
    -
    - +
    @@ -920,21 +848,15 @@

    -

    - - root() - -

    +

    root()

    - -
    -

    Returns a Pathname object of the current Rails project, otherwise it returns nil if there is no project:

    +
    +

    Returns a Pathname object of the current Rails project, otherwise it returns nil if there is no project:

    Rails.root
       # => #<Pathname:/Users/someuser/some/path/project>
     
    -
    - +
    @@ -959,17 +881,11 @@

    -

    - - version() - -

    +

    version()

    - -
    -

    Returns the currently loaded version of Rails as a string.

    -
    - +
    +

    Returns the currently loaded version of Rails as a string.

    +
    diff --git a/src/classes/Rails/API/EdgeTask.html b/src/classes/Rails/API/EdgeTask.html index dcbe23bd8f..a9df971558 100644 --- a/src/classes/Rails/API/EdgeTask.html +++ b/src/classes/Rails/API/EdgeTask.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - badge_version() - -

    +

    badge_version()

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - canonical_url() - -

    +

    canonical_url()

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - rails_version() - -

    +

    rails_version()

    -
    - -
    - diff --git a/src/classes/Rails/API/RepoTask.html b/src/classes/Rails/API/RepoTask.html index 01ba323c83..4bc97df647 100644 --- a/src/classes/Rails/API/RepoTask.html +++ b/src/classes/Rails/API/RepoTask.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - api_dir() - -

    +

    api_dir()

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - component_root_dir(component) - -

    +

    component_root_dir(component)

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - configure_sdoc() - -

    +

    configure_sdoc()

    -
    - -
    - diff --git a/src/classes/Rails/API/StableTask.html b/src/classes/Rails/API/StableTask.html index c655311f0d..21689684a1 100644 --- a/src/classes/Rails/API/StableTask.html +++ b/src/classes/Rails/API/StableTask.html @@ -72,17 +72,9 @@

    Methods

    Instance Public methods

    -

    - - badge_version() - -

    +

    badge_version()

    -
    - -
    - @@ -107,17 +99,9 @@

    -

    - - canonical_url() - -

    +

    canonical_url()

    -
    - -
    - @@ -142,17 +126,9 @@

    -

    - - rails_version() - -

    +

    rails_version()

    -
    - -
    - diff --git a/src/classes/Rails/API/Task.html b/src/classes/Rails/API/Task.html index 028ac17827..80c3472416 100644 --- a/src/classes/Rails/API/Task.html +++ b/src/classes/Rails/API/Task.html @@ -200,17 +200,9 @@

    Constants

    Class Public methods

    -

    - - new(name) - -

    +

    new(name)

    -
    - -
    - @@ -248,17 +240,9 @@

    Instance Public methods

    -

    - - api_main() - -

    +

    api_main()

    -
    - -
    - @@ -283,17 +267,9 @@

    -

    - - configure_rdoc_files() - -

    +

    configure_rdoc_files()

    -
    - -
    - @@ -345,17 +321,9 @@

    -

    - - configure_sdoc() - -

    +

    configure_sdoc()

    -
    - -
    - @@ -387,17 +355,11 @@

    -

    - - desc(description) - -

    +

    desc(description)

    - -
    -

    Hack, ignore the desc calls performed by the original initializer.

    -
    - +
    +

    Hack, ignore the desc calls performed by the original initializer.

    +
    diff --git a/src/classes/Rails/AppBuilder.html b/src/classes/Rails/AppBuilder.html index ade6aff8d7..4e3d1afa48 100644 --- a/src/classes/Rails/AppBuilder.html +++ b/src/classes/Rails/AppBuilder.html @@ -209,17 +209,9 @@

    Methods

    Instance Public methods

    -

    - - app() - -

    +

    app()

    -
    - -
    - @@ -249,17 +241,9 @@

    -

    - - bin() - -

    +

    bin()

    -
    - -
    - @@ -288,17 +272,9 @@

    -

    - - bin_when_updating() - -

    +

    bin_when_updating()

    -
    - -
    - @@ -323,17 +299,9 @@

    -

    - - cifiles() - -

    +

    cifiles()

    -
    - -
    - @@ -360,17 +328,9 @@

    -

    - - config() - -

    +

    config()

    -
    - -
    - @@ -410,17 +370,9 @@

    -

    - - config_target_version() - -

    +

    config_target_version()

    -
    - -
    - @@ -445,17 +397,9 @@

    -

    - - config_when_updating() - -

    +

    config_when_updating()

    -
    - -
    - @@ -525,17 +469,9 @@

    -

    - - configru() - -

    +

    configru()

    -
    - -
    - @@ -560,17 +496,9 @@

    -

    - - credentials() - -

    +

    credentials()

    -
    - -
    - @@ -598,17 +526,9 @@

    -

    - - credentials_diff_enroll() - -

    +

    credentials_diff_enroll()

    -
    - -
    - @@ -637,17 +557,9 @@

    -

    - - database_yml() - -

    +

    database_yml()

    -
    - -
    - @@ -672,17 +584,9 @@

    -

    - - db() - -

    +

    db()

    -
    - -
    - @@ -707,17 +611,9 @@

    -

    - - devcontainer() - -

    +

    devcontainer()

    -
    - -
    - @@ -754,17 +650,9 @@

    -

    - - dockerfiles() - -

    +

    dockerfiles()

    -
    - -
    - @@ -793,17 +681,9 @@

    -

    - - gemfile() - -

    +

    gemfile()

    -
    - -
    - @@ -828,17 +708,9 @@

    -

    - - gitattributes() - -

    +

    gitattributes()

    -
    - -
    - @@ -863,17 +735,9 @@

    -

    - - gitignore() - -

    +

    gitignore()

    -
    - -
    - @@ -898,17 +762,9 @@

    -

    - - lib() - -

    +

    lib()

    -
    - -
    - @@ -934,17 +790,9 @@

    -

    - - log() - -

    +

    log()

    -
    - -
    - @@ -969,17 +817,9 @@

    -

    - - master_key() - -

    +

    master_key()

    -
    - -
    - @@ -1008,17 +848,9 @@

    -

    - - node_version() - -

    +

    node_version()

    -
    - -
    - @@ -1043,17 +875,9 @@

    -

    - - public_directory() - -

    +

    public_directory()

    -
    - -
    - @@ -1080,17 +904,9 @@

    -

    - - rakefile() - -

    +

    rakefile()

    -
    - -
    - @@ -1115,17 +931,9 @@

    -

    - - readme() - -

    +

    readme()

    -
    - -
    - @@ -1150,17 +958,9 @@

    -

    - - rubocop() - -

    +

    rubocop()

    -
    - -
    - @@ -1185,17 +985,9 @@

    -

    - - ruby_version() - -

    +

    ruby_version()

    -
    - -
    - @@ -1220,17 +1012,9 @@

    -

    - - script() - -

    +

    script()

    -
    - -
    - @@ -1255,17 +1039,9 @@

    -

    - - storage() - -

    +

    storage()

    -
    - -
    - @@ -1291,17 +1067,9 @@

    -

    - - system_test() - -

    +

    system_test()

    -
    - -
    - @@ -1328,17 +1096,9 @@

    -

    - - test() - -

    +

    test()

    -
    - -
    - @@ -1370,17 +1130,9 @@

    -

    - - tmp() - -

    +

    tmp()

    -
    - -
    - @@ -1406,17 +1158,9 @@

    -

    - - vendor() - -

    +

    vendor()

    -
    - -
    - @@ -1441,17 +1185,9 @@

    -

    - - version_control() - -

    +

    version_control()

    -
    - -
    - diff --git a/src/classes/Rails/Application.html b/src/classes/Rails/Application.html index 946d3cfde8..5ce682a77e 100644 --- a/src/classes/Rails/Application.html +++ b/src/classes/Rails/Application.html @@ -328,17 +328,9 @@

    Attributes

    Class Public methods

    -

    - - create(initial_variable_values = {}, &block) - -

    +

    create(initial_variable_values = {}, &block)

    -
    - -
    - @@ -363,17 +355,9 @@

    -

    - - find_root(from) - -

    +

    find_root(from)

    -
    - -
    - @@ -398,17 +382,9 @@

    -

    - - inherited(base) - -

    +

    inherited(base)

    -
    - -
    - @@ -438,17 +414,9 @@

    -

    - - instance() - -

    +

    instance()

    -
    - -
    - @@ -473,17 +441,9 @@

    -

    - - new(initial_variable_values = {}, &block) - -

    +

    new(initial_variable_values = {}, &block)

    -
    - -
    - @@ -532,15 +492,10 @@

    Instance Public methods

    -

    - - config_for(name, env: Rails.env) - -

    +

    config_for(name, env: Rails.env)

    - -
    -

    Convenience for loading config/foo.yml for the current Rails env. Example:

    +
    +

    Convenience for loading config/foo.yml for the current Rails env. Example:

    # config/exception_notification.yml:
     production:
    @@ -580,8 +535,7 @@ 

    Rails.application.config_for(:example)[:foo][:bar] # => { baz: 1, qux: 2 }

    -
    - +
    @@ -629,17 +583,11 @@

    -

    - - console(&blk) - -

    +

    console(&blk)

    - -
    -

    Sends any console called in the instance of a new application up to the console method defined in Rails::Railtie.

    -
    - +
    +

    Sends any console called in the instance of a new application up to the console method defined in Rails::Railtie.

    +
    @@ -664,21 +612,15 @@

    -

    - - credentials() - -

    +

    credentials()

    - -
    -

    Returns an ActiveSupport::EncryptedConfiguration instance for the credentials file specified by config.credentials.content_path.

    +
    +

    Returns an ActiveSupport::EncryptedConfiguration instance for the credentials file specified by config.credentials.content_path.

    By default, config.credentials.content_path will point to either config/credentials/#{environment}.yml.enc for the current environment (for example, config/credentials/production.yml.enc for the production environment), or config/credentials.yml.enc if that file does not exist.

    The encryption key is taken from either ENV["RAILS_MASTER_KEY"], or from the file specified by config.credentials.key_path. By default, config.credentials.key_path will point to either config/credentials/#{environment}.key for the current environment, or config/master.key if that file does not exist.

    -
    - +
    @@ -703,17 +645,11 @@

    -

    - - deprecators() - -

    +

    deprecators()

    - -
    -

    A managed collection of deprecators (ActiveSupport::Deprecation::Deprecators). The collection’s configuration methods affect all deprecators in the collection. Additionally, the collection’s silence method silences all deprecators in the collection for the duration of a given block.

    -
    - +
    +

    A managed collection of deprecators (ActiveSupport::Deprecation::Deprecators). The collection’s configuration methods affect all deprecators in the collection. Additionally, the collection’s silence method silences all deprecators in the collection for the duration of a given block.

    +
    @@ -740,17 +676,11 @@

    -

    - - eager_load!() - -

    +

    eager_load!()

    - -
    -

    Eager loads the application code.

    -
    - +
    +

    Eager loads the application code.

    +
    @@ -775,15 +705,10 @@

    -

    - - encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY") - -

    +

    encrypted(path, key_path: "config/master.key", env_key: "RAILS_MASTER_KEY")

    - -
    -

    Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted file. By default, the encryption key is taken from either ENV["RAILS_MASTER_KEY"], or from the config/master.key file.

    +
    +

    Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted file. By default, the encryption key is taken from either ENV["RAILS_MASTER_KEY"], or from the config/master.key file.

    my_config = Rails.application.encrypted("config/my_config.enc")
     
    @@ -795,8 +720,7 @@ 

    Encrypted files can be edited with the bin/rails encrypted:edit command. (See the output of bin/rails encrypted:edit --help for more information.)

    -
    - +
    @@ -826,17 +750,11 @@

    -

    - - env_config() - -

    +

    env_config()

    - -
    -

    Stores some of the Rails initial environment parameters which will be used by middlewares and engines to configure themselves.

    -
    - +
    +

    Stores some of the Rails initial environment parameters which will be used by middlewares and engines to configure themselves.

    +
    @@ -890,17 +808,11 @@

    -

    - - generators(&blk) - -

    +

    generators(&blk)

    - -
    -

    Sends any generators called in the instance of a new application up to the generators method defined in Rails::Railtie.

    -
    - +
    +

    Sends any generators called in the instance of a new application up to the generators method defined in Rails::Railtie.

    +
    @@ -925,17 +837,11 @@

    -

    - - initialized?() - -

    +

    initialized?()

    - -
    -

    Returns true if the application is initialized.

    -
    - +
    +

    Returns true if the application is initialized.

    +
    @@ -960,17 +866,11 @@

    -

    - - initializer(name, opts = {}, &block) - -

    +

    initializer(name, opts = {}, &block)

    - -
    -

    Sends the initializers to the initializer method defined in the Rails::Initializable module. Each Rails::Application class has its own set of initializers, as defined by the Initializable module.

    -
    - +
    +

    Sends the initializers to the initializer method defined in the Rails::Initializable module. Each Rails::Application class has its own set of initializers, as defined by the Initializable module.

    +
    @@ -995,17 +895,11 @@

    -

    - - isolate_namespace(mod) - -

    +

    isolate_namespace(mod)

    - -
    -

    Sends the isolate_namespace method up to the class method.

    -
    - +
    +

    Sends the isolate_namespace method up to the class method.

    +
    @@ -1030,17 +924,11 @@

    -

    - - key_generator(secret_key_base = self.secret_key_base) - -

    +

    key_generator(secret_key_base = self.secret_key_base)

    - -
    -

    Returns a key generator (ActiveSupport::CachingKeyGenerator) for a specified secret_key_base. The return value is memoized, so additional calls with the same secret_key_base will return the same key generator instance.

    -
    - +
    +

    Returns a key generator (ActiveSupport::CachingKeyGenerator) for a specified secret_key_base. The return value is memoized, so additional calls with the same secret_key_base will return the same key generator instance.

    +
    @@ -1069,15 +957,10 @@

    -

    - - message_verifier(verifier_name) - -

    +

    message_verifier(verifier_name)

    - -
    -

    Returns a message verifier object.

    +
    +

    Returns a message verifier object.

    This verifier can be used to generate and verify signed messages in the application.

    @@ -1098,8 +981,7 @@

    Examples

    Rails.application.message_verifier('my_purpose').verify(message) # => 'data to sign against tampering' -
    - +
    @@ -1124,15 +1006,10 @@

    Examples

    -

    - - message_verifiers() - -

    +

    message_verifiers()

    - -
    -

    Returns a message verifier factory (ActiveSupport::MessageVerifiers). This factory can be used as a central point to configure and create message verifiers (ActiveSupport::MessageVerifier) for your application.

    +
    +

    Returns a message verifier factory (ActiveSupport::MessageVerifiers). This factory can be used as a central point to configure and create message verifiers (ActiveSupport::MessageVerifier) for your application.

    By default, message verifiers created by this factory will generate messages using the default ActiveSupport::MessageVerifier options. You can override these options with a combination of ActiveSupport::MessageVerifiers#clear_rotations and ActiveSupport::MessageVerifiers#rotate. However, this must be done prior to building any message verifier instances. For example, in a before_initialize block:

    @@ -1150,8 +1027,7 @@

    app.message_verifiers.rotate(secret_key_base: "old secret_key_base") end -

    - +
    @@ -1179,20 +1055,14 @@

    -

    - - name() - -

    +

    name()

    - -
    -

    Returns the dasherized application name.

    +
    +

    Returns the dasherized application name.

    MyApp::Application.new.name => "my-app"
     
    -
    - +
    @@ -1217,17 +1087,11 @@

    -

    - - rake_tasks(&block) - -

    +

    rake_tasks(&block)

    - -
    -

    If you try to define a set of Rake tasks on the instance, these will get passed up to the Rake tasks defined on the application’s class.

    -
    - +
    +

    If you try to define a set of Rake tasks on the instance, these will get passed up to the Rake tasks defined on the application’s class.

    +
    @@ -1252,17 +1116,11 @@

    -

    - - reload_routes!() - -

    +

    reload_routes!()

    - -
    -

    Reload application routes regardless if they changed or not.

    -
    - +
    +

    Reload application routes regardless if they changed or not.

    +
    @@ -1291,17 +1149,11 @@

    -

    - - runner(&blk) - -

    +

    runner(&blk)

    - -
    -

    Sends any runner called in the instance of a new application up to the runner method defined in Rails::Railtie.

    -
    - +
    +

    Sends any runner called in the instance of a new application up to the runner method defined in Rails::Railtie.

    +
    @@ -1326,15 +1178,10 @@

    -

    - - secret_key_base() - -

    +

    secret_key_base()

    - -
    -

    The secret_key_base is used as the input secret to the application’s key generator, which in turn is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances, including the ones that sign and encrypt cookies.

    +
    +

    The secret_key_base is used as the input secret to the application’s key generator, which in turn is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances, including the ones that sign and encrypt cookies.

    We look for it first in ENV["SECRET_KEY_BASE"], then in credentials.secret_key_base. For most applications, the correct place to store it is in the encrypted credentials file.

    @@ -1343,8 +1190,7 @@

    Generating a random secret_key_base and storing it in tmp/local_secret.txt can also be triggered by setting ENV["SECRET_KEY_BASE_DUMMY"]. This is useful when precompiling assets for production as part of a build step that otherwise does not need access to the production secrets.

    Dockerfile example: RUN SECRET_KEY_BASE_DUMMY=1 bundle exec rails assets:precompile.

    -

    - +
    @@ -1369,17 +1215,11 @@

    -

    - - server(&blk) - -

    +

    server(&blk)

    - -
    -

    Sends any server called in the instance of a new application up to the server method defined in Rails::Railtie.

    -
    - +
    +

    Sends any server called in the instance of a new application up to the server method defined in Rails::Railtie.

    +
    @@ -1407,17 +1247,9 @@

    Instance Protected methods

    -

    - - ensure_generator_templates_added() - -

    +

    ensure_generator_templates_added()

    -
    - -
    - diff --git a/src/classes/Rails/Application/Configuration.html b/src/classes/Rails/Application/Configuration.html index 37f821e330..fb88acec61 100644 --- a/src/classes/Rails/Application/Configuration.html +++ b/src/classes/Rails/Application/Configuration.html @@ -553,17 +553,9 @@

    Attributes

    Class Public methods

    -

    - - new(*) - -

    +

    new(*)

    -
    - -
    - @@ -647,17 +639,9 @@

    Instance Public methods

    -

    - - annotations() - -

    +

    annotations()

    -
    - -
    - @@ -682,17 +666,9 @@

    -

    - - api_only=(value) - -

    +

    api_only=(value)

    -
    - -
    - @@ -720,17 +696,9 @@

    -

    - - autoload_lib(ignore:) - -

    +

    autoload_lib(ignore:)

    -
    - -
    - @@ -763,17 +731,9 @@

    -

    - - autoload_lib_once(ignore:) - -

    +

    autoload_lib_once(ignore:)

    -
    - -
    - @@ -806,17 +766,9 @@

    -

    - - colorize_logging() - -

    +

    colorize_logging()

    -
    - -
    - @@ -841,17 +793,9 @@

    -

    - - colorize_logging=(val) - -

    +

    colorize_logging=(val)

    -
    - -
    - @@ -877,17 +821,11 @@

    -

    - - content_security_policy(&block) - -

    +

    content_security_policy(&block)

    - - - + @@ -916,17 +854,11 @@

    -

    - - database_configuration() - -

    +

    database_configuration()

    - -
    -

    Loads and returns the entire raw configuration of database from values stored in config/database.yml.

    -
    - +
    +

    Loads and returns the entire raw configuration of database from values stored in config/database.yml.

    +
    @@ -984,17 +916,9 @@

    -

    - - debug_exception_response_format() - -

    +

    debug_exception_response_format()

    -
    - -
    - @@ -1019,17 +943,9 @@

    -

    - - default_log_file() - -

    +

    default_log_file()

    -
    - -
    - @@ -1062,17 +978,9 @@

    -

    - - enable_reloading() - -

    +

    enable_reloading()

    -
    - -
    - @@ -1097,17 +1005,9 @@

    -

    - - enable_reloading=(value) - -

    +

    enable_reloading=(value)

    -
    - -
    - @@ -1132,17 +1032,9 @@

    -

    - - encoding=(value) - -

    +

    encoding=(value)

    -
    - -
    - @@ -1171,17 +1063,11 @@

    -

    - - load_defaults(target_version) - -

    +

    load_defaults(target_version)

    - -
    -

    Loads default configuration values for a target version. This includes defaults for versions prior to the target version. See the configuration guide for the default values associated with a particular version.

    -
    - +
    +

    Loads default configuration values for a target version. This includes defaults for versions prior to the target version. See the configuration guide for the default values associated with a particular version.

    +
    @@ -1486,17 +1372,9 @@

    -

    - - log_level=(level) - -

    +

    log_level=(level)

    -
    - -
    - @@ -1522,17 +1400,9 @@

    -

    - - paths() - -

    +

    paths()

    -
    - -
    - @@ -1568,17 +1438,11 @@

    -

    - - permissions_policy(&block) - -

    +

    permissions_policy(&block)

    - -
    -

    Configures the ActionDispatch::PermissionsPolicy.

    -
    - + @@ -1607,17 +1471,9 @@

    -

    - - reloading_enabled?() - -

    +

    reloading_enabled?()

    -
    - -
    - @@ -1642,17 +1498,9 @@

    -

    - - secret_key_base() - -

    +

    secret_key_base()

    -
    - -
    - @@ -1685,17 +1533,9 @@

    -

    - - secret_key_base=(new_secret_key_base) - -

    +

    secret_key_base=(new_secret_key_base)

    -
    - -
    - @@ -1728,15 +1568,10 @@

    -

    - - session_store(new_session_store = nil, **options) - -

    +

    session_store(new_session_store = nil, **options)

    - -
    -

    Specifies what class to use to store the session. Possible values are :cache_store, :cookie_store, :mem_cache_store, a custom store, or :disabled. :disabled tells Rails not to deal with sessions.

    +
    +

    Specifies what class to use to store the session. Possible values are :cache_store, :cookie_store, :mem_cache_store, a custom store, or :disabled. :disabled tells Rails not to deal with sessions.

    Additional options will be set as session_options:

    @@ -1749,8 +1584,7 @@

    # use ActionDispatch::Session::MyCustomStore as the session store
     config.session_store :my_custom_store
     
    -

    - +
    diff --git a/src/classes/Rails/Application/DefaultMiddlewareStack.html b/src/classes/Rails/Application/DefaultMiddlewareStack.html index 813df1db98..2d761f69c2 100644 --- a/src/classes/Rails/Application/DefaultMiddlewareStack.html +++ b/src/classes/Rails/Application/DefaultMiddlewareStack.html @@ -97,17 +97,9 @@

    Attributes

    Class Public methods

    -

    - - new(app, config, paths) - -

    +

    new(app, config, paths)

    -
    - -
    - @@ -138,17 +130,9 @@

    Instance Public methods

    -

    - - build_stack() - -

    +

    build_stack()

    -
    - -
    - diff --git a/src/classes/Rails/Application/RoutesReloader.html b/src/classes/Rails/Application/RoutesReloader.html index 85401f3ce8..de4aec9f65 100644 --- a/src/classes/Rails/Application/RoutesReloader.html +++ b/src/classes/Rails/Application/RoutesReloader.html @@ -135,17 +135,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -178,17 +170,9 @@

    Instance Public methods

    -

    - - execute() - -

    +

    execute()

    -
    - -
    - @@ -214,17 +198,9 @@

    -

    - - execute_unless_loaded() - -

    +

    execute_unless_loaded()

    -
    - -
    - @@ -253,17 +229,9 @@

    -

    - - reload!() - -

    +

    reload!()

    -
    - -
    - diff --git a/src/classes/Rails/CodeStatistics.html b/src/classes/Rails/CodeStatistics.html index 60e39c5356..9f493194e0 100644 --- a/src/classes/Rails/CodeStatistics.html +++ b/src/classes/Rails/CodeStatistics.html @@ -136,17 +136,9 @@

    Constants

    Class Public methods

    -

    - - new(*pairs) - -

    +

    new(*pairs)

    -
    - -
    - @@ -173,15 +165,10 @@

    -

    - - register_directory(label, path, test_directory: false) - -

    +

    register_directory(label, path, test_directory: false)

    - -
    -

    Add directories to the output of the bin/rails stats command.

    +
    +

    Add directories to the output of the bin/rails stats command.

    Rails::CodeStatistics.register_directory("My Directory", "path/to/dir")
     
    @@ -190,8 +177,7 @@

    Rails::CodeStatistics.register_directory("Model specs", "spec/models", test_directory: true)
     
    -

    - +
    @@ -221,17 +207,9 @@

    Instance Public methods

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/Rails/Command.html b/src/classes/Rails/Command.html index 9a63f78a4b..a8f03e4f7e 100644 --- a/src/classes/Rails/Command.html +++ b/src/classes/Rails/Command.html @@ -195,17 +195,11 @@

    Constants

    Class Public methods

    -

    - - invoke(full_namespace, args = [], **config) - -

    +

    invoke(full_namespace, args = [], **config)

    - -
    -

    Receives a namespace, arguments, and the behavior to invoke the command.

    -
    - +
    +

    Receives a namespace, arguments, and the behavior to invoke the command.

    +
    @@ -249,17 +243,11 @@

    -

    - - root() - -

    +

    root()

    - -
    -

    Returns the root of the Rails engine or app running the command.

    -
    - +
    +

    Returns the root of the Rails engine or app running the command.

    +
    @@ -291,17 +279,9 @@

    Class Private methods

    -

    - - command_type() - -

    +

    command_type()

    -
    - -
    - @@ -326,17 +306,9 @@

    -

    - - file_lookup_paths() - -

    +

    file_lookup_paths()

    -
    - -
    - @@ -361,17 +333,9 @@

    -

    - - lookup_paths() - -

    +

    lookup_paths()

    -
    - -
    - diff --git a/src/classes/Rails/Command/Actions.html b/src/classes/Rails/Command/Actions.html index eb78412d60..9119f7abed 100644 --- a/src/classes/Rails/Command/Actions.html +++ b/src/classes/Rails/Command/Actions.html @@ -78,17 +78,9 @@

    Methods

    Instance Public methods

    -

    - - boot_application!() - -

    +

    boot_application!()

    -
    - -
    - @@ -114,17 +106,9 @@

    -

    - - load_environment_config!() - -

    +

    load_environment_config!()

    -
    - -
    - @@ -152,17 +136,9 @@

    -

    - - load_generators() - -

    +

    load_generators()

    -
    - -
    - @@ -189,17 +165,9 @@

    -

    - - load_tasks() - -

    +

    load_tasks()

    -
    - -
    - @@ -225,17 +193,9 @@

    -

    - - require_application!() - -

    +

    require_application!()

    -
    - -
    - @@ -261,17 +221,11 @@

    -

    - - set_application_directory!() - -

    +

    set_application_directory!()

    - -
    -

    Change to the application’s path if there is no config.ru file in current directory. This allows us to run rails server from other directories, but still get the main config.ru and properly set the tmp directory.

    -
    - +
    +

    Change to the application’s path if there is no config.ru file in current directory. This allows us to run rails server from other directories, but still get the main config.ru and properly set the tmp directory.

    +
    diff --git a/src/classes/Rails/Command/Base.html b/src/classes/Rails/Command/Base.html index eb4aa32b91..d32246906d 100644 --- a/src/classes/Rails/Command/Base.html +++ b/src/classes/Rails/Command/Base.html @@ -117,17 +117,9 @@

    Included Modules

    Class Public methods

    -

    - - banner(command = nil, *) - -

    +

    banner(command = nil, *)

    -
    - -
    - @@ -159,20 +151,14 @@

    -

    - - base_name() - -

    +

    base_name()

    - -
    -

    Sets the base_name taking into account the current class namespace.

    +
    +

    Sets the base_name taking into account the current class namespace.

    Rails::Command::TestCommand.base_name # => 'rails'
     
    -
    - +
    @@ -199,20 +185,14 @@

    -

    - - command_name() - -

    +

    command_name()

    - -
    -

    Return command name without namespaces.

    +
    +

    Return command name without namespaces.

    Rails::Command::TestCommand.command_name # => 'test'
     
    -
    - +
    @@ -240,19 +220,13 @@

    -

    - - default_command_root() - -

    +

    default_command_root()

    - -
    -

    Default file root to place extra files a command might need, placed one folder above the command file.

    +
    +

    Default file root to place extra files a command might need, placed one folder above the command file.

    For a Rails::Command::TestCommand placed in rails/command/test_command.rb would return rails/test.

    -
    - +
    @@ -278,17 +252,11 @@

    -

    - - desc(usage = nil, description = nil, options = {}) - -

    +

    desc(usage = nil, description = nil, options = {})

    - -
    -

    Tries to get the description from a USAGE file one folder above the command root.

    -
    - +
    +

    Tries to get the description from a USAGE file one folder above the command root.

    +
    @@ -317,17 +285,11 @@

    -

    - - engine?() - -

    +

    engine?()

    - -
    -

    Returns true when the app is a Rails engine.

    -
    - +
    +

    Returns true when the app is a Rails engine.

    +
    @@ -352,17 +314,9 @@

    -

    - - executable(command_name = self.command_name) - -

    +

    executable(command_name = self.command_name)

    -
    - -
    - @@ -387,17 +341,11 @@

    -

    - - hide_command!() - -

    +

    hide_command!()

    - -
    -

    Convenience method to hide this command from the available ones when running rails command.

    -
    - +
    +

    Convenience method to hide this command from the available ones when running rails command.

    +
    @@ -422,17 +370,11 @@

    -

    - - namespace(name = nil) - -

    +

    namespace(name = nil)

    - -
    -

    Convenience method to get the namespace from the class name. It’s the same as Thor default except that the Command at the end of the class is removed.

    -
    - +
    +

    Convenience method to get the namespace from the class name. It’s the same as Thor default except that the Command at the end of the class is removed.

    +
    @@ -461,17 +403,9 @@

    -

    - - printing_commands() - -

    +

    printing_commands()

    -
    - -
    - @@ -498,17 +432,11 @@

    -

    - - usage_path() - -

    +

    usage_path()

    - -
    -

    Path to lookup a USAGE description in a file.

    -
    - +
    +

    Path to lookup a USAGE description in a file.

    +
    diff --git a/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html b/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html index 8b737081a6..f1ebafd0d2 100644 --- a/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html +++ b/src/classes/Rails/Command/UnusedRoutesCommand/RouteInfo.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - new(route) - -

    +

    new(route)

    -
    - -
    - @@ -109,17 +101,9 @@

    Instance Public methods

    -

    - - unused?() - -

    +

    unused?()

    -
    - -
    - diff --git a/src/classes/Rails/Configuration/MiddlewareStackProxy.html b/src/classes/Rails/Configuration/MiddlewareStackProxy.html index c44a059ad2..564142bcbc 100644 --- a/src/classes/Rails/Configuration/MiddlewareStackProxy.html +++ b/src/classes/Rails/Configuration/MiddlewareStackProxy.html @@ -166,17 +166,9 @@

    Attributes

    Class Public methods

    -

    - - new(operations = [], delete_operations = []) - -

    +

    new(operations = [], delete_operations = [])

    -
    - -
    - @@ -206,17 +198,9 @@

    Instance Public methods

    -

    - - delete(...) - -

    +

    delete(...)

    -
    - -
    - @@ -241,24 +225,17 @@

    -

    - - insert(...) - -

    +

    insert(...)

    -
    - -
    - -
    - Alias for: insert_before -
    +

    + Alias for: + insert_before. +

    @@ -266,17 +243,9 @@

    -

    - - insert_after(...) - -

    +

    insert_after(...)

    -
    - -
    - @@ -301,22 +270,16 @@

    -

    - - insert_before(...) - -

    +

    insert_before(...)

    -
    - -
    - -
    - Also aliased as: insert -
    +

    + Also aliased as: + + insert. +

    @@ -340,24 +303,17 @@

    -

    - - move(...) - -

    +

    move(...)

    -
    - -
    - -
    - Alias for: move_before -
    +

    + Alias for: + move_before. +

    @@ -365,17 +321,9 @@

    -

    - - move_after(...) - -

    +

    move_after(...)

    -
    - -
    - @@ -400,22 +348,16 @@

    -

    - - move_before(...) - -

    +

    move_before(...)

    -
    - -
    - -
    - Also aliased as: move -
    +

    + Also aliased as: + + move. +

    @@ -439,17 +381,9 @@

    -

    - - swap(...) - -

    +

    swap(...)

    -
    - -
    - @@ -474,17 +408,9 @@

    -

    - - unshift(...) - -

    +

    unshift(...)

    -
    - -
    - @@ -509,17 +435,9 @@

    -

    - - use(...) - -

    +

    use(...)

    -
    - -
    - diff --git a/src/classes/Rails/Console.html b/src/classes/Rails/Console.html index 99b425e976..bb46cd0c5d 100644 --- a/src/classes/Rails/Console.html +++ b/src/classes/Rails/Console.html @@ -144,17 +144,9 @@

    Attributes

    Class Public methods

    -

    - - new(app, options = {}) - -

    +

    new(app, options = {})

    -
    - -
    - @@ -194,17 +186,9 @@

    -

    - - start(*args) - -

    +

    start(*args)

    -
    - -
    - @@ -233,22 +217,16 @@

    Instance Public methods

    -

    - - environment() - -

    +

    environment()

    -
    - -
    - -
    - Also aliased as: environment? -
    +

    + Also aliased as: + + environment?. +

    @@ -272,24 +250,17 @@

    -

    - - environment?() - -

    +

    environment?()

    -
    - -
    - -
    - Alias for: environment -
    +

    + Alias for: + environment. +

    @@ -297,17 +268,9 @@

    -

    - - sandbox?() - -

    +

    sandbox?()

    -
    - -
    - @@ -336,17 +299,9 @@

    -

    - - set_environment!() - -

    +

    set_environment!()

    -
    - -
    - @@ -371,17 +326,9 @@

    -

    - - start() - -

    +

    start()

    -
    - -
    - diff --git a/src/classes/Rails/Console/AppInstance.html b/src/classes/Rails/Console/AppInstance.html index a71991c0a3..938fe73736 100644 --- a/src/classes/Rails/Console/AppInstance.html +++ b/src/classes/Rails/Console/AppInstance.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - execute(create = false) - -

    +

    execute(create = false)

    -
    - -
    - diff --git a/src/classes/Rails/Console/ControllerHelper.html b/src/classes/Rails/Console/ControllerHelper.html index 2a76113f94..429f863611 100644 --- a/src/classes/Rails/Console/ControllerHelper.html +++ b/src/classes/Rails/Console/ControllerHelper.html @@ -64,17 +64,11 @@

    Methods

    Instance Public methods

    -

    - - execute() - -

    +

    execute()

    - -
    -

    This method assumes an ApplicationController exists, and that it extends ActionController::Base.

    -
    - +
    +

    This method assumes an ApplicationController exists, and that it extends ActionController::Base.

    +
    diff --git a/src/classes/Rails/Console/ControllerInstance.html b/src/classes/Rails/Console/ControllerInstance.html index 25ff4815ad..d053e80a3d 100644 --- a/src/classes/Rails/Console/ControllerInstance.html +++ b/src/classes/Rails/Console/ControllerInstance.html @@ -64,17 +64,11 @@

    Methods

    Instance Public methods

    -

    - - execute() - -

    +

    execute()

    - -
    -

    This method assumes an ApplicationController exists, and that it extends ActionController::Base.

    -
    - +
    +

    This method assumes an ApplicationController exists, and that it extends ActionController::Base.

    +
    diff --git a/src/classes/Rails/Console/IRBConsole.html b/src/classes/Rails/Console/IRBConsole.html index 371e5f3a6b..f6204214a7 100644 --- a/src/classes/Rails/Console/IRBConsole.html +++ b/src/classes/Rails/Console/IRBConsole.html @@ -75,17 +75,9 @@

    Methods

    Class Public methods

    -

    - - new(app) - -

    +

    new(app)

    -
    - -
    - @@ -117,17 +109,9 @@

    Instance Public methods

    -

    - - colorized_env() - -

    +

    colorized_env()

    -
    - -
    - @@ -161,17 +145,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -196,17 +172,9 @@

    -

    - - start() - -

    +

    start()

    -
    - -
    - diff --git a/src/classes/Rails/Console/NewSession.html b/src/classes/Rails/Console/NewSession.html index 6ff952f5ed..b773ab32c6 100644 --- a/src/classes/Rails/Console/NewSession.html +++ b/src/classes/Rails/Console/NewSession.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - execute(*) - -

    +

    execute(*)

    -
    - -
    - diff --git a/src/classes/Rails/Console/ReloadHelper.html b/src/classes/Rails/Console/ReloadHelper.html index e6de0bfba2..8091fe0a60 100644 --- a/src/classes/Rails/Console/ReloadHelper.html +++ b/src/classes/Rails/Console/ReloadHelper.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - execute() - -

    +

    execute()

    -
    - -
    - diff --git a/src/classes/Rails/DBConsole.html b/src/classes/Rails/DBConsole.html index f10eff75a4..0a1157b429 100644 --- a/src/classes/Rails/DBConsole.html +++ b/src/classes/Rails/DBConsole.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new(options = {}) - -

    +

    new(options = {})

    -
    - -
    - @@ -123,17 +115,9 @@

    -

    - - start(*args) - -

    +

    start(*args)

    -
    - -
    - @@ -162,17 +146,9 @@

    Instance Public methods

    -

    - - database() - -

    +

    database()

    -
    - -
    - @@ -197,17 +173,9 @@

    -

    - - db_config() - -

    +

    db_config()

    -
    - -
    - @@ -249,17 +217,9 @@

    -

    - - environment() - -

    +

    environment()

    -
    - -
    - @@ -284,17 +244,9 @@

    -

    - - start() - -

    +

    start()

    -
    - -
    - @@ -324,17 +276,9 @@

    Instance Private methods

    -

    - - configurations() - -

    +

    configurations()

    -
    - -
    - diff --git a/src/classes/Rails/Engine.html b/src/classes/Rails/Engine.html index 6b806fed25..d87ded1e86 100644 --- a/src/classes/Rails/Engine.html +++ b/src/classes/Rails/Engine.html @@ -519,17 +519,9 @@

    Attributes

    Class Public methods

    -

    - - endpoint(endpoint = nil) - -

    +

    endpoint(endpoint = nil)

    -
    - -
    - @@ -556,17 +548,11 @@

    -

    - - find(path) - -

    +

    find(path)

    - -
    -

    Finds engine with given path.

    -
    - +
    +

    Finds engine with given path.

    +
    @@ -596,17 +582,9 @@

    -

    - - find_root(from) - -

    +

    find_root(from)

    -
    - -
    - @@ -631,17 +609,9 @@

    -

    - - inherited(base) - -

    +

    inherited(base)

    -
    - -
    - @@ -676,17 +646,9 @@

    -

    - - isolate_namespace(mod) - -

    +

    isolate_namespace(mod)

    -
    - -
    - @@ -745,17 +707,9 @@

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -792,17 +746,11 @@

    Instance Public methods

    -

    - - app() - -

    +

    app()

    - -
    -

    Returns the underlying Rack application for this engine.

    -
    - +
    +

    Returns the underlying Rack application for this engine.

    +
    @@ -833,17 +781,11 @@

    -

    - - call(env) - -

    +

    call(env)

    - -
    -

    Define the Rack API for this engine.

    -
    - +
    +

    Define the Rack API for this engine.

    +
    @@ -869,17 +811,11 @@

    -

    - - config() - -

    +

    config()

    - -
    -

    Define the configuration object for the engine.

    -
    - +
    +

    Define the configuration object for the engine.

    +
    @@ -904,17 +840,9 @@

    -

    - - eager_load!() - -

    +

    eager_load!()

    -
    - -
    - @@ -940,17 +868,11 @@

    -

    - - endpoint() - -

    +

    endpoint()

    - -
    -

    Returns the endpoint for this engine. If none is registered, defaults to an ActionDispatch::Routing::RouteSet.

    -
    - +
    +

    Returns the endpoint for this engine. If none is registered, defaults to an ActionDispatch::Routing::RouteSet.

    +
    @@ -975,17 +897,11 @@

    -

    - - env_config() - -

    +

    env_config()

    - -
    -

    Defines additional Rack env configuration that is added on each call.

    -
    - +
    +

    Defines additional Rack env configuration that is added on each call.

    +
    @@ -1010,17 +926,11 @@

    -

    - - helpers() - -

    +

    helpers()

    - -
    -

    Returns a module with all the helpers defined for the engine.

    -
    - +
    +

    Returns a module with all the helpers defined for the engine.

    +
    @@ -1051,17 +961,11 @@

    -

    - - helpers_paths() - -

    +

    helpers_paths()

    - -
    -

    Returns all registered helpers paths.

    -
    - +
    +

    Returns all registered helpers paths.

    +
    @@ -1086,17 +990,11 @@

    -

    - - load_console(app = self) - -

    +

    load_console(app = self)

    - -
    -

    Load console and invoke the registered hooks. Check Rails::Railtie.console for more info.

    -
    - +
    +

    Load console and invoke the registered hooks. Check Rails::Railtie.console for more info.

    +
    @@ -1122,17 +1020,11 @@

    -

    - - load_generators(app = self) - -

    +

    load_generators(app = self)

    - -
    -

    Load Rails generators and invoke the registered hooks. Check Rails::Railtie.generators for more info.

    -
    - +
    +

    Load Rails generators and invoke the registered hooks. Check Rails::Railtie.generators for more info.

    +
    @@ -1160,17 +1052,11 @@

    -

    - - load_runner(app = self) - -

    +

    load_runner(app = self)

    - -
    -

    Load Rails runner and invoke the registered hooks. Check Rails::Railtie.runner for more info.

    -
    - +
    +

    Load Rails runner and invoke the registered hooks. Check Rails::Railtie.runner for more info.

    +
    @@ -1196,19 +1082,13 @@

    -

    - - load_seed() - -

    +

    load_seed()

    - -
    -

    Load data from db/seeds.rb file. It can be used in to load engines’ seeds, e.g.:

    +
    +

    Load data from db/seeds.rb file. It can be used in to load engines’ seeds, e.g.:

    Blog::Engine.load_seed

    -
    - +
    @@ -1234,17 +1114,11 @@

    -

    - - load_server(app = self) - -

    +

    load_server(app = self)

    - -
    -

    Invoke the server registered hooks. Check Rails::Railtie.server for more info.

    -
    - +
    +

    Invoke the server registered hooks. Check Rails::Railtie.server for more info.

    +
    @@ -1270,17 +1144,11 @@

    -

    - - load_tasks(app = self) - -

    +

    load_tasks(app = self)

    - -
    -

    Load Rake and railties tasks, and invoke the registered hooks. Check Rails::Railtie.rake_tasks for more info.

    -
    - +
    +

    Load Rake and railties tasks, and invoke the registered hooks. Check Rails::Railtie.rake_tasks for more info.

    +
    @@ -1307,17 +1175,9 @@

    -

    - - railties() - -

    +

    railties()

    -
    - -
    - @@ -1342,17 +1202,11 @@

    -

    - - routes(&block) - -

    +

    routes(&block)

    - -
    -

    Defines the routes for this engine. If a block is given to routes, it is appended to the engine.

    -
    - +
    +

    Defines the routes for this engine. If a block is given to routes, it is appended to the engine.

    +
    @@ -1382,17 +1236,9 @@

    Instance Private methods

    -

    - - load_config_initializer(initializer) - -

    +

    load_config_initializer(initializer)

    -
    - -
    - diff --git a/src/classes/Rails/Engine/Configuration.html b/src/classes/Rails/Engine/Configuration.html index e87e367bf9..1df9cb45a3 100644 --- a/src/classes/Rails/Engine/Configuration.html +++ b/src/classes/Rails/Engine/Configuration.html @@ -145,17 +145,9 @@

    Attributes

    Class Public methods

    -

    - - new(root = nil) - -

    +

    new(root = nil)

    -
    - -
    - @@ -194,15 +186,10 @@

    Instance Public methods

    -

    - - generators() - -

    +

    generators()

    - -
    -

    Holds generators configuration:

    +
    +

    Holds generators configuration:

    config.generators do |g|
       g.orm             :data_mapper, migration: true
    @@ -215,8 +202,7 @@ 

    config.generators.colorize_logging = false
     
    -

    - +
    @@ -243,17 +229,9 @@

    -

    - - paths() - -

    +

    paths()

    -
    - -
    - @@ -316,17 +294,9 @@

    -

    - - root=(value) - -

    +

    root=(value)

    -
    - -
    - diff --git a/src/classes/Rails/Engine/Railties.html b/src/classes/Rails/Engine/Railties.html index a5396991fd..6d47b2b1b7 100644 --- a/src/classes/Rails/Engine/Railties.html +++ b/src/classes/Rails/Engine/Railties.html @@ -99,17 +99,9 @@

    Attributes

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -139,17 +131,9 @@

    Instance Public methods

    -

    - - -(others) - -

    +

    -(others)

    -
    - -
    - @@ -174,17 +158,9 @@

    -

    - - each(*args, &block) - -

    +

    each(*args, &block)

    -
    - -
    - diff --git a/src/classes/Rails/Engine/Updater.html b/src/classes/Rails/Engine/Updater.html index b94aa11bd9..ac8e072457 100644 --- a/src/classes/Rails/Engine/Updater.html +++ b/src/classes/Rails/Engine/Updater.html @@ -67,17 +67,9 @@

    Methods

    Class Public methods

    -

    - - generator() - -

    +

    generator()

    -
    - -
    - @@ -103,17 +95,9 @@

    -

    - - run(action) - -

    +

    run(action)

    -
    - -
    - diff --git a/src/classes/Rails/Generators.html b/src/classes/Rails/Generators.html index 6169873145..34e88a03da 100644 --- a/src/classes/Rails/Generators.html +++ b/src/classes/Rails/Generators.html @@ -297,17 +297,11 @@

    Constants

    Class Public methods

    -

    - - api_only!() - -

    +

    api_only!()

    - -
    -

    Configure generators for API only applications. It basically hides everything that is usually browser related, such as assets and session migration generators, and completely disable helpers and assets so generators such as scaffold won’t create them.

    -
    - +
    +

    Configure generators for API only applications. It basically hides everything that is usually browser related, such as assets and session migration generators, and completely disable helpers and assets so generators such as scaffold won’t create them.

    +
    @@ -342,15 +336,10 @@

    -

    - - fallbacks() - -

    +

    fallbacks()

    - -
    -

    Hold configured generators fallbacks. If a plugin developer wants a generator group to fall back to another group in case of missing generators, they can add a fallback.

    +
    +

    Hold configured generators fallbacks. If a plugin developer wants a generator group to fall back to another group in case of missing generators, they can add a fallback.

    For example, shoulda is considered a test_framework and is an extension of test_unit. However, most part of shoulda generators are similar to test_unit ones.

    @@ -358,8 +347,7 @@

    Rails::Generators.fallbacks[:shoulda] = :test_unit
     
    -

    - +
    @@ -384,17 +372,11 @@

    -

    - - help(command = "generate") - -

    +

    help(command = "generate")

    - -
    -

    Show help message with available generators.

    -
    - +
    +

    Show help message with available generators.

    +
    @@ -432,17 +414,11 @@

    -

    - - hidden_namespaces() - -

    +

    hidden_namespaces()

    - -
    -

    Returns an array of generator namespaces that are hidden. Generator namespaces may be hidden for a variety of reasons. Some are aliased such as “rails:migration” and can be invoked with the shorter “migration”.

    -
    - +
    +

    Returns an array of generator namespaces that are hidden. Generator namespaces may be hidden for a variety of reasons. Some are aliased such as “rails:migration” and can be invoked with the shorter “migration”.

    +
    @@ -495,24 +471,17 @@

    -

    - - hide_namespace(*namespaces) - -

    +

    hide_namespace(*namespaces)

    -
    - -
    - -
    - Alias for: hide_namespaces -
    +

    + Alias for: + hide_namespaces. +

    @@ -520,22 +489,16 @@

    -

    - - hide_namespaces(*namespaces) - -

    +

    hide_namespaces(*namespaces)

    -
    - -
    - -
    - Also aliased as: hide_namespace -
    +

    + Also aliased as: + + hide_namespace. +

    @@ -559,17 +522,11 @@

    -

    - - invoke(namespace, args = ARGV, config = {}) - -

    +

    invoke(namespace, args = ARGV, config = {})

    - -
    -

    Receives a namespace, arguments, and the behavior to invoke the generator. It’s used as the default entry point for generate, destroy, and update commands.

    -
    - +
    +

    Receives a namespace, arguments, and the behavior to invoke the generator. It’s used as the default entry point for generate, destroy, and update commands.

    +
    @@ -608,17 +565,9 @@

    -

    - - print_generators() - -

    +

    print_generators()

    -
    - -
    - @@ -643,17 +592,9 @@

    -

    - - public_namespaces() - -

    +

    public_namespaces()

    -
    - -
    - @@ -679,17 +620,9 @@

    -

    - - sorted_groups() - -

    +

    sorted_groups()

    -
    - -
    - @@ -738,17 +671,9 @@

    Class Private methods

    -

    - - command_type() - -

    +

    command_type()

    -
    - -
    - @@ -773,17 +698,9 @@

    -

    - - file_lookup_paths() - -

    +

    file_lookup_paths()

    -
    - -
    - @@ -808,17 +725,9 @@

    -

    - - lookup_paths() - -

    +

    lookup_paths()

    -
    - -
    - @@ -843,17 +752,9 @@

    -

    - - print_list(base, namespaces) - -

    +

    print_list(base, namespaces)

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Actions.html b/src/classes/Rails/Generators/Actions.html index a423d663ab..eb0e21b76b 100644 --- a/src/classes/Rails/Generators/Actions.html +++ b/src/classes/Rails/Generators/Actions.html @@ -146,15 +146,10 @@

    Methods

    Instance Public methods

    -

    - - add_source(source, options = {}, &block) - -

    +

    add_source(source, options = {}, &block)

    - -
    -

    Add the given source to Gemfile

    +
    +

    Add the given source to Gemfile

    If block is given, gem entries in block are wrapped into the source group.

    @@ -164,8 +159,7 @@

    gem "rspec-rails" end -

    - +
    @@ -200,24 +194,17 @@

    -

    - - application(data = nil, options = {}) - -

    +

    application(data = nil, options = {})

    -
    - -
    - -
    - Alias for: environment -
    +

    + Alias for: + environment. +

    @@ -225,15 +212,10 @@

    -

    - - environment(data = nil, options = {}) - -

    +

    environment(data = nil, options = {})

    - -
    -

    Adds configuration code to a Rails runtime environment.

    +
    +

    Adds configuration code to a Rails runtime environment.

    By default, adds code inside the Application class in config/application.rb so that it applies to all environments.

    @@ -275,13 +257,14 @@

    %(config.asset_host = "localhost:3000") end -

    - +
    -
    - Also aliased as: application -
    +

    + Also aliased as: + + application. +

    @@ -317,15 +300,10 @@

    -

    - - gem(*args) - -

    +

    gem(*args)

    - -
    -

    Adds a gem declaration to the Gemfile for the specified gem.

    +
    +

    Adds a gem declaration to the Gemfile for the specified gem.

    gem "rspec", group: :test
     gem "technoweenie-restful-authentication", lib: "restful-authentication", source: "http://gems.github.com/"
    @@ -380,8 +358,7 @@ 

    Options

    # Edge my_gem
     gem "my_gem", git: "https://example.com/my_gem.git", branch: "master"
     
    -
    - +
    @@ -441,22 +418,16 @@

    Options

    -

    - - gem_group(*names, &block) - -

    +

    gem_group(*names, &block)

    - -
    -

    Wraps gem entries inside a group.

    +
    +

    Wraps gem entries inside a group.

    gem_group :development, :test do
       gem "rspec-rails"
     end
     
    -
    - +
    @@ -491,23 +462,17 @@

    -

    - - generate(what, *args) - -

    +

    generate(what, *args)

    - -
    -

    Runs another generator.

    +
    +

    Runs another generator.

    generate "scaffold", "Post title:string body:text"
     generate "scaffold", "Post", "title:string", "body:text"
     

    The first argument is the generator name, and the remaining arguments are joined together and passed to the generator.

    -
    - +
    @@ -537,15 +502,10 @@

    -

    - - git(commands = {}) - -

    +

    git(commands = {})

    - -
    -

    Runs one or more git commands.

    +
    +

    Runs one or more git commands.

    git :init
     # => runs `git init`
    @@ -559,8 +519,7 @@ 

    git add: "good.rb", rm: "bad.cxx" # => runs `git add good.rb; git rm bad.cxx`

    -
    - +
    @@ -591,17 +550,9 @@

    -

    - - github(repo, options = {}, &block) - -

    +

    github(repo, options = {}, &block)

    -
    - -
    - @@ -639,15 +590,10 @@

    -

    - - initializer(filename, data = nil) - -

    +

    initializer(filename, data = nil)

    - -
    -

    Creates an initializer file in config/initializers/. The code can be specified as an argument or as the return value of the block.

    +
    +

    Creates an initializer file in config/initializers/. The code can be specified as an argument or as the return value of the block.

    initializer "api.rb", <<~RUBY
       API_KEY = "123456"
    @@ -657,8 +603,7 @@ 

    %(API_KEY = "123456") end

    -
    - +
    @@ -685,15 +630,10 @@

    -

    - - lib(filename, data = nil) - -

    +

    lib(filename, data = nil)

    - -
    -

    Creates a file in lib/. The contents can be specified as an argument or as the return value of the block.

    +
    +

    Creates a file in lib/. The contents can be specified as an argument or as the return value of the block.

    lib "foreign.rb", <<~RUBY
       # Foreign code is fun
    @@ -703,8 +643,7 @@ 

    "# Foreign code is fun" end

    -
    - +
    @@ -731,15 +670,10 @@

    -

    - - rails_command(command, options = {}) - -

    +

    rails_command(command, options = {})

    - -
    -

    Runs the specified Rails command.

    +
    +

    Runs the specified Rails command.

    rails_command "db:migrate"
     rails_command "db:migrate", env: "production"
    @@ -762,8 +696,7 @@ 

    Options

    Whether to run the command using sudo.

    -
    - +
    @@ -798,15 +731,10 @@

    Options

    -

    - - rake(command, options = {}) - -

    +

    rake(command, options = {})

    - -
    -

    Runs the specified Rake task.

    +
    +

    Runs the specified Rake task.

    rake "db:migrate"
     rake "db:migrate", env: "production"
    @@ -829,8 +757,7 @@ 

    Options

    Whether to run the task using sudo.

    -
    - +
    @@ -855,15 +782,10 @@

    Options

    -

    - - rakefile(filename, data = nil) - -

    +

    rakefile(filename, data = nil)

    - -
    -

    Creates a Rake tasks file in lib/tasks/. The code can be specified as an argument or as the return value of the block.

    +
    +

    Creates a Rake tasks file in lib/tasks/. The code can be specified as an argument or as the return value of the block.

    rakefile "bootstrap.rake", <<~RUBY
       task :bootstrap do
    @@ -883,8 +805,7 @@ 

    RUBY end

    -
    - +
    @@ -911,20 +832,14 @@

    -

    - - readme(path) - -

    +

    readme(path)

    - -
    -

    Reads the given file at the source root and prints it in the console.

    +
    +

    Reads the given file at the source root and prints it in the console.

    readme "README"
     
    -
    - +
    @@ -949,21 +864,15 @@

    -

    - - route(routing_code, namespace: nil) - -

    +

    route(routing_code, namespace: nil)

    - -
    -

    Make an entry in Rails routing file config/routes.rb

    +
    +

    Make an entry in Rails routing file config/routes.rb

    route "root 'welcome#index'"
     route "root 'admin#index'", namespace: :admin
     
    -
    - +
    @@ -1014,15 +923,10 @@

    -

    - - vendor(filename, data = nil) - -

    +

    vendor(filename, data = nil)

    - -
    -

    Creates a file in vendor/. The contents can be specified as an argument or as the return value of the block.

    +
    +

    Creates a file in vendor/. The contents can be specified as an argument or as the return value of the block.

    vendor "foreign.rb", <<~RUBY
       # Foreign code is fun
    @@ -1032,8 +936,7 @@ 

    "# Foreign code is fun" end

    -
    - +
    @@ -1063,17 +966,11 @@

    Instance Private methods

    -

    - - execute_command(executor, command, options = {}) - -

    +

    execute_command(executor, command, options = {})

    - -
    -

    Runs the supplied command using either rake or rails based on the executor parameter provided.

    -
    - +
    +

    Runs the supplied command using either rake or rails based on the executor parameter provided.

    +
    @@ -1107,17 +1004,11 @@

    -

    - - indentation() - -

    +

    indentation()

    - -
    -

    Returns a string corresponding to the current indentation level (i.e. 2 * @indentation spaces). See also with_indentation, which can be used to manage the indentation level.

    -
    - +
    +

    Returns a string corresponding to the current indentation level (i.e. 2 * @indentation spaces). See also with_indentation, which can be used to manage the indentation level.

    +
    @@ -1142,17 +1033,11 @@

    -

    - - log(*args) - -

    +

    log(*args)

    - -
    -

    Define log for backwards compatibility. If just one argument is sent, invoke say, otherwise invoke say_status.

    -
    - +
    +

    Define log for backwards compatibility. If just one argument is sent, invoke say, otherwise invoke say_status.

    +
    @@ -1182,22 +1067,18 @@

    -

    - - optimize_indentation(value, amount = 0) - -

    +

    optimize_indentation(value, amount = 0)

    - -
    -

    Returns optimized string with indentation

    -
    - +
    +

    Returns optimized string with indentation

    +
    -
    - Also aliased as: rebase_indentation -
    +

    + Also aliased as: + + rebase_indentation. +

    @@ -1222,17 +1103,11 @@

    -

    - - quote(value) - -

    +

    quote(value)

    - -
    -

    Always returns value in double quotes.

    -
    - +
    +

    Always returns value in double quotes.

    +
    @@ -1264,17 +1139,11 @@

    -

    - - with_indentation(&block) - -

    +

    with_indentation(&block)

    - -
    -

    Increases the current indentation indentation level for the duration of the given block, and decreases it after the block ends. Call indentation to get an indentation string.

    -
    - +
    +

    Increases the current indentation indentation level for the duration of the given block, and decreases it after the block ends. Call indentation to get an indentation string.

    +
    diff --git a/src/classes/Rails/Generators/ActiveModel.html b/src/classes/Rails/Generators/ActiveModel.html index bcc1d19259..a22c667519 100644 --- a/src/classes/Rails/Generators/ActiveModel.html +++ b/src/classes/Rails/Generators/ActiveModel.html @@ -130,20 +130,14 @@

    Attributes

    Class Public methods

    -

    - - all(klass) - -

    +

    all(klass)

    - -
    -

    Used for:

    +
    +

    Used for:

    • GET index

    -
    - +
    @@ -168,22 +162,16 @@

    -

    - - build(klass, params = nil) - -

    +

    build(klass, params = nil)

    - -
    -

    Used for:

    +
    +

    Used for:

    • GET new

    • POST create

    -
    - +
    @@ -212,15 +200,10 @@

    -

    - - find(klass, params = nil) - -

    +

    find(klass, params = nil)

    - -
    -

    Used for:

    +
    +

    Used for:

    • GET show

    • @@ -230,8 +213,7 @@

    • DELETE destroy

    -
    - +
    @@ -256,17 +238,9 @@

    -

    - - new(name) - -

    +

    new(name)

    -
    - -
    - @@ -295,20 +269,14 @@

    Instance Public methods

    -

    - - destroy() - -

    +

    destroy()

    - -
    -

    Used for:

    +
    +

    Used for:

    • DELETE destroy

    -
    - +
    @@ -333,22 +301,16 @@

    -

    - - errors() - -

    +

    errors()

    - -
    -

    Used for:

    +
    +

    Used for:

    • POST create

    • PATCH / PUT update

    -
    - +
    @@ -373,20 +335,14 @@

    -

    - - save() - -

    +

    save()

    - -
    -

    Used for:

    +
    +

    Used for:

    • POST create

    -
    - +
    @@ -411,20 +367,14 @@

    -

    - - update(params = nil) - -

    +

    update(params = nil)

    - -
    -

    Used for:

    +
    +

    Used for:

    • PATCH / PUT update

    -
    - +
    diff --git a/src/classes/Rails/Generators/AppBase/GemfileEntry.html b/src/classes/Rails/Generators/AppBase/GemfileEntry.html index bd32344ce8..96f4639e21 100644 --- a/src/classes/Rails/Generators/AppBase/GemfileEntry.html +++ b/src/classes/Rails/Generators/AppBase/GemfileEntry.html @@ -83,17 +83,9 @@

    Methods

    Class Public methods

    -

    - - floats(name, comment = nil) - -

    +

    floats(name, comment = nil)

    -
    - -
    - @@ -118,17 +110,9 @@

    -

    - - github(name, github, branch = nil, comment = nil) - -

    +

    github(name, github, branch = nil, comment = nil)

    -
    - -
    - @@ -157,17 +141,9 @@

    -

    - - new(name, version, comment, options = {}, commented_out = false) - -

    +

    new(name, version, comment, options = {}, commented_out = false)

    -
    - -
    - @@ -192,17 +168,9 @@

    -

    - - path(name, path, comment = nil) - -

    +

    path(name, path, comment = nil)

    -
    - -
    - @@ -227,17 +195,9 @@

    -

    - - version(name, version, comment = nil) - -

    +

    version(name, version, comment = nil)

    -
    - -
    - @@ -266,17 +226,9 @@

    Instance Public methods

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/AppGenerator.html b/src/classes/Rails/Generators/AppGenerator.html index 049f02da91..4aebeb6b11 100644 --- a/src/classes/Rails/Generators/AppGenerator.html +++ b/src/classes/Rails/Generators/AppGenerator.html @@ -66,22 +66,16 @@

    Methods

    Instance Private methods

    -

    - - after_bundle(&block) - -

    +

    after_bundle(&block)

    - -
    -

    Registers a callback to be executed after bundle binstubs have run.

    +
    +

    Registers a callback to be executed after bundle binstubs have run.

    after_bundle do
       git add: '.'
     end
     
    -
    - +
    diff --git a/src/classes/Rails/Generators/Base.html b/src/classes/Rails/Generators/Base.html index ddf6468afe..f1fa3af62e 100644 --- a/src/classes/Rails/Generators/Base.html +++ b/src/classes/Rails/Generators/Base.html @@ -175,17 +175,11 @@

    Included Modules

    Class Public methods

    -

    - - add_shebang_option!() - -

    +

    add_shebang_option!()

    - -
    -

    Small macro to add ruby as an option to the generator with proper default value plus an instance helper method called shebang.

    -
    - +
    +

    Small macro to add ruby as an option to the generator with proper default value plus an instance helper method called shebang.

    +
    @@ -224,17 +218,11 @@

    -

    - - banner() - -

    +

    banner()

    - -
    -

    Use Rails default banner.

    -
    - +
    +

    Use Rails default banner.

    +
    @@ -259,17 +247,11 @@

    -

    - - base_name() - -

    +

    base_name()

    - -
    -

    Sets the base_name taking into account the current class namespace.

    -
    - +
    +

    Sets the base_name taking into account the current class namespace.

    +
    @@ -296,17 +278,11 @@

    -

    - - base_root() - -

    +

    base_root()

    - -
    -

    Returns the base root for a common set of generators. This is used to dynamically guess the default source root.

    -
    - +
    +

    Returns the base root for a common set of generators. This is used to dynamically guess the default source root.

    +
    @@ -331,17 +307,11 @@

    -

    - - default_aliases_for_option(name, options) - -

    +

    default_aliases_for_option(name, options)

    - -
    -

    Returns default aliases for the option name given doing a lookup in Rails::Generators.aliases.

    -
    - +
    +

    Returns default aliases for the option name given doing a lookup in Rails::Generators.aliases.

    +
    @@ -366,17 +336,11 @@

    -

    - - default_for_option(config, name, options, default) - -

    +

    default_for_option(config, name, options, default)

    - -
    -

    Returns default for the option name given doing a lookup in config.

    -
    - +
    +

    Returns default for the option name given doing a lookup in config.

    +
    @@ -409,17 +373,9 @@

    -

    - - default_generator_root() - -

    +

    default_generator_root()

    -
    - -
    - @@ -445,17 +401,11 @@

    -

    - - default_source_root() - -

    +

    default_source_root()

    - -
    -

    Returns the default source root for a given generator. This is used internally by Rails to set its generators source root. If you want to customize your source root, you should use source_root.

    -
    - +
    +

    Returns the default source root for a given generator. This is used internally by Rails to set its generators source root. If you want to customize your source root, you should use source_root.

    +
    @@ -483,17 +433,11 @@

    -

    - - default_value_for_option(name, options) - -

    +

    default_value_for_option(name, options)

    - -
    -

    Returns the default value for the option name given doing a lookup in Rails::Generators.options.

    -
    - +
    +

    Returns the default value for the option name given doing a lookup in Rails::Generators.options.

    +
    @@ -518,17 +462,11 @@

    -

    - - desc(description = nil) - -

    +

    desc(description = nil)

    - -
    -

    Tries to get the description from a USAGE file one folder above the source root otherwise uses a default description.

    -
    - +
    +

    Tries to get the description from a USAGE file one folder above the source root otherwise uses a default description.

    +
    @@ -559,17 +497,11 @@

    -

    - - generator_name() - -

    +

    generator_name()

    - -
    -

    Removes the namespaces and get the generator name. For example, Rails::Generators::ModelGenerator will return “model” as generator name.

    -
    - +
    +

    Removes the namespaces and get the generator name. For example, Rails::Generators::ModelGenerator will return “model” as generator name.

    +
    @@ -597,17 +529,11 @@

    -

    - - hide!() - -

    +

    hide!()

    - -
    -

    Convenience method to hide this generator from the available ones when running rails generator command.

    -
    - +
    +

    Convenience method to hide this generator from the available ones when running rails generator command.

    +
    @@ -632,15 +558,10 @@

    -

    - - hook_for(*names, &block) - -

    +

    hook_for(*names, &block)

    - -
    -

    Invoke a generator based on the value supplied by the user to the given option named “name”. A class option is created when this method is invoked and you can set a hash to customize it.

    +
    +

    Invoke a generator based on the value supplied by the user to the given option named “name”. A class option is created when this method is invoked and you can set a hash to customize it.

    Examples

    @@ -744,8 +665,7 @@

    Custom invocations

    instance.invoke controller, [ instance.name.pluralize ] end -
    - +
    @@ -796,17 +716,11 @@

    Custom invocations

    -

    - - namespace(name = nil) - -

    +

    namespace(name = nil)

    - -
    -

    Convenience method to get the namespace from the class name. It’s the same as Thor default except that the Generator at the end of the class is removed.

    -
    - +
    +

    Convenience method to get the namespace from the class name. It’s the same as Thor default except that the Generator at the end of the class is removed.

    +
    @@ -832,20 +746,14 @@

    -

    - - remove_hook_for(*names) - -

    +

    remove_hook_for(*names)

    - -
    -

    Remove a previously added hook.

    +
    +

    Remove a previously added hook.

    remove_hook_for :orm
     
    -
    - +
    @@ -875,17 +783,11 @@

    -

    - - source_root(path = nil) - -

    +

    source_root(path = nil)

    - -
    -

    Returns the source root for this generator using default_source_root as default.

    -
    - +
    +

    Returns the source root for this generator using default_source_root as default.

    +
    @@ -911,17 +813,9 @@

    -

    - - usage_path() - -

    +

    usage_path()

    -
    - -
    - @@ -954,17 +848,11 @@

    Instance Private methods

    -

    - - extract_last_module(nesting) - -

    +

    extract_last_module(nesting)

    - -
    -

    Takes in an array of nested modules and extracts the last module

    -
    - +
    +

    Takes in an array of nested modules and extracts the last module

    +
    @@ -992,17 +880,9 @@

    -

    - - indent(content, multiplier = 2) - -

    +

    indent(content, multiplier = 2)

    -
    - -
    - @@ -1028,17 +908,11 @@

    -

    - - module_namespacing(&block) - -

    +

    module_namespacing(&block)

    - -
    -

    Wrap block with namespace of current application if namespace exists and is not skipped

    -
    - +
    +

    Wrap block with namespace of current application if namespace exists and is not skipped

    +
    @@ -1065,17 +939,9 @@

    -

    - - namespace() - -

    +

    namespace()

    -
    - -
    - @@ -1100,17 +966,9 @@

    -

    - - namespaced?() - -

    +

    namespaced?()

    -
    - -
    - @@ -1135,17 +993,9 @@

    -

    - - namespaced_path() - -

    +

    namespaced_path()

    -
    - -
    - @@ -1170,17 +1020,9 @@

    -

    - - wrap_with_namespace(content) - -

    +

    wrap_with_namespace(content)

    -
    - -
    - diff --git a/src/classes/Rails/Generators/BenchmarkGenerator.html b/src/classes/Rails/Generators/BenchmarkGenerator.html index 8ff1606ef5..24c637d004 100644 --- a/src/classes/Rails/Generators/BenchmarkGenerator.html +++ b/src/classes/Rails/Generators/BenchmarkGenerator.html @@ -84,17 +84,9 @@

    Constants

    Instance Public methods

    -

    - - generate_layout() - -

    +

    generate_layout()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database.html b/src/classes/Rails/Generators/Database.html index e7c4a5999a..c3a8e9f014 100644 --- a/src/classes/Rails/Generators/Database.html +++ b/src/classes/Rails/Generators/Database.html @@ -166,17 +166,9 @@

    Constants

    Class Public methods

    -

    - - all() - -

    +

    all()

    -
    - -
    - @@ -207,17 +199,9 @@

    -

    - - build(database_name) - -

    +

    build(database_name)

    -
    - -
    - @@ -254,17 +238,9 @@

    Instance Public methods

    -

    - - base_package() - -

    +

    base_package()

    -
    - -
    - @@ -289,17 +265,9 @@

    -

    - - build_package() - -

    +

    build_package()

    -
    - -
    - @@ -324,17 +292,9 @@

    -

    - - feature() - -

    +

    feature()

    -
    - -
    - @@ -361,17 +321,9 @@

    -

    - - feature_name() - -

    +

    feature_name()

    -
    - -
    - @@ -396,17 +348,9 @@

    -

    - - gem() - -

    +

    gem()

    -
    - -
    - @@ -431,17 +375,9 @@

    -

    - - host() - -

    +

    host()

    -
    - -
    - @@ -464,17 +400,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -499,17 +427,9 @@

    -

    - - port() - -

    +

    port()

    -
    - -
    - @@ -534,17 +454,9 @@

    -

    - - service() - -

    +

    service()

    -
    - -
    - @@ -569,17 +481,9 @@

    -

    - - socket() - -

    +

    socket()

    -
    - -
    - @@ -602,17 +506,9 @@

    -

    - - template() - -

    +

    template()

    -
    - -
    - @@ -637,17 +533,9 @@

    -

    - - volume() - -

    +

    volume()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/MariaDB.html b/src/classes/Rails/Generators/Database/MariaDB.html index 67672b1e00..37ffdcaa45 100644 --- a/src/classes/Rails/Generators/Database/MariaDB.html +++ b/src/classes/Rails/Generators/Database/MariaDB.html @@ -66,17 +66,9 @@

    Methods

    Instance Public methods

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -101,17 +93,9 @@

    -

    - - port() - -

    +

    port()

    -
    - -
    - @@ -136,17 +120,9 @@

    -

    - - service() - -

    +

    service()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/MySQL.html b/src/classes/Rails/Generators/Database/MySQL.html index 0811ad605b..ac41a76a5c 100644 --- a/src/classes/Rails/Generators/Database/MySQL.html +++ b/src/classes/Rails/Generators/Database/MySQL.html @@ -74,17 +74,9 @@

    Methods

    Instance Public methods

    -

    - - host() - -

    +

    host()

    -
    - -
    - @@ -109,17 +101,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -144,17 +128,9 @@

    -

    - - port() - -

    +

    port()

    -
    - -
    - @@ -179,17 +155,9 @@

    -

    - - service() - -

    +

    service()

    -
    - -
    - @@ -223,17 +191,9 @@

    -

    - - socket() - -

    +

    socket()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/MySQL2.html b/src/classes/Rails/Generators/Database/MySQL2.html index 0bf4fa2f78..c4b057ca3a 100644 --- a/src/classes/Rails/Generators/Database/MySQL2.html +++ b/src/classes/Rails/Generators/Database/MySQL2.html @@ -94,17 +94,9 @@

    Included Modules

    Instance Public methods

    -

    - - base_package() - -

    +

    base_package()

    -
    - -
    - @@ -129,17 +121,9 @@

    -

    - - build_package() - -

    +

    build_package()

    -
    - -
    - @@ -164,17 +148,9 @@

    -

    - - feature_name() - -

    +

    feature_name()

    -
    - -
    - @@ -199,17 +175,9 @@

    -

    - - gem() - -

    +

    gem()

    -
    - -
    - @@ -234,17 +202,9 @@

    -

    - - template() - -

    +

    template()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/Null.html b/src/classes/Rails/Generators/Database/Null.html index 0b20ef20a1..104fa96116 100644 --- a/src/classes/Rails/Generators/Database/Null.html +++ b/src/classes/Rails/Generators/Database/Null.html @@ -92,17 +92,9 @@

    Methods

    Instance Public methods

    -

    - - base_package() - -

    +

    base_package()

    -
    - -
    - @@ -125,17 +117,9 @@

    -

    - - build_package() - -

    +

    build_package()

    -
    - -
    - @@ -158,17 +142,9 @@

    -

    - - feature_name() - -

    +

    feature_name()

    -
    - -
    - @@ -191,17 +167,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -224,17 +192,9 @@

    -

    - - port() - -

    +

    port()

    -
    - -
    - @@ -257,17 +217,9 @@

    -

    - - service() - -

    +

    service()

    -
    - -
    - @@ -290,17 +242,9 @@

    -

    - - template() - -

    +

    template()

    -
    - -
    - @@ -323,17 +267,9 @@

    -

    - - volume() - -

    +

    volume()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/PostgreSQL.html b/src/classes/Rails/Generators/Database/PostgreSQL.html index 964eb915a0..1e7890d000 100644 --- a/src/classes/Rails/Generators/Database/PostgreSQL.html +++ b/src/classes/Rails/Generators/Database/PostgreSQL.html @@ -92,17 +92,9 @@

    Methods

    Instance Public methods

    -

    - - base_package() - -

    +

    base_package()

    -
    - -
    - @@ -127,17 +119,9 @@

    -

    - - build_package() - -

    +

    build_package()

    -
    - -
    - @@ -162,17 +146,9 @@

    -

    - - feature_name() - -

    +

    feature_name()

    -
    - -
    - @@ -197,17 +173,9 @@

    -

    - - gem() - -

    +

    gem()

    -
    - -
    - @@ -232,17 +200,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -267,17 +227,9 @@

    -

    - - port() - -

    +

    port()

    -
    - -
    - @@ -302,17 +254,9 @@

    -

    - - service() - -

    +

    service()

    -
    - -
    - @@ -346,17 +290,9 @@

    -

    - - template() - -

    +

    template()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/SQLite3.html b/src/classes/Rails/Generators/Database/SQLite3.html index 4854cd2c7e..7ed57d7ca6 100644 --- a/src/classes/Rails/Generators/Database/SQLite3.html +++ b/src/classes/Rails/Generators/Database/SQLite3.html @@ -92,17 +92,9 @@

    Methods

    Instance Public methods

    -

    - - base_package() - -

    +

    base_package()

    -
    - -
    - @@ -127,17 +119,9 @@

    -

    - - build_package() - -

    +

    build_package()

    -
    - -
    - @@ -162,17 +146,9 @@

    -

    - - feature_name() - -

    +

    feature_name()

    -
    - -
    - @@ -197,17 +173,9 @@

    -

    - - gem() - -

    +

    gem()

    -
    - -
    - @@ -232,17 +200,9 @@

    -

    - - name() - -

    +

    name()

    -
    - -
    - @@ -267,17 +227,9 @@

    -

    - - port() - -

    +

    port()

    -
    - -
    - @@ -302,17 +254,9 @@

    -

    - - service() - -

    +

    service()

    -
    - -
    - @@ -337,17 +281,9 @@

    -

    - - template() - -

    +

    template()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Database/Trilogy.html b/src/classes/Rails/Generators/Database/Trilogy.html index b6e34ed924..0ec42bb026 100644 --- a/src/classes/Rails/Generators/Database/Trilogy.html +++ b/src/classes/Rails/Generators/Database/Trilogy.html @@ -94,17 +94,9 @@

    Included Modules

    Instance Public methods

    -

    - - base_package() - -

    +

    base_package()

    -
    - -
    - @@ -129,17 +121,9 @@

    -

    - - build_package() - -

    +

    build_package()

    -
    - -
    - @@ -164,17 +148,9 @@

    -

    - - feature_name() - -

    +

    feature_name()

    -
    - -
    - @@ -199,17 +175,9 @@

    -

    - - gem() - -

    +

    gem()

    -
    - -
    - @@ -234,17 +202,9 @@

    -

    - - template() - -

    +

    template()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Migration.html b/src/classes/Rails/Generators/Migration.html index a417f579ba..8adb76f665 100644 --- a/src/classes/Rails/Generators/Migration.html +++ b/src/classes/Rails/Generators/Migration.html @@ -102,17 +102,9 @@

    Attributes

    Instance Public methods

    -

    - - create_migration(destination, data, config = {}, &block) - -

    +

    create_migration(destination, data, config = {}, &block)

    -
    - -
    - @@ -137,22 +129,16 @@

    -

    - - migration_template(source, destination, config = {}) - -

    +

    migration_template(source, destination, config = {})

    - -
    -

    Creates a migration template at the given destination. The difference to the default template method is that the migration number is prepended to the destination file name.

    +
    +

    Creates a migration template at the given destination. The difference to the default template method is that the migration number is prepended to the destination file name.

    The migration number, migration file name, migration class name are available as instance variables in the template to be rendered.

    migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"
     
    -
    - +
    @@ -187,17 +173,9 @@

    -

    - - set_migration_assigns!(destination) - -

    +

    set_migration_assigns!(destination)

    -
    - -
    - diff --git a/src/classes/Rails/Generators/NamedBase.html b/src/classes/Rails/Generators/NamedBase.html index e67ac46580..458580885d 100644 --- a/src/classes/Rails/Generators/NamedBase.html +++ b/src/classes/Rails/Generators/NamedBase.html @@ -195,15 +195,10 @@

    Methods

    Class Public methods

    -

    - - check_class_collision(options = {}) - -

    +

    check_class_collision(options = {})

    - -
    -

    Add a class collisions name to be checked on class initialization. You can supply a hash with a :prefix or :suffix to be tested.

    +
    +

    Add a class collisions name to be checked on class initialization. You can supply a hash with a :prefix or :suffix to be tested.

    Examples

    @@ -211,8 +206,7 @@

    Examples

    If the generator is invoked with class name Admin, it will check for the presence of “AdminDecorator”.

    -
    - +
    @@ -249,17 +243,9 @@

    Examples

    Instance Public methods

    -

    - - js_template(source, destination) - -

    +

    js_template(source, destination)

    -
    - -
    - @@ -284,17 +270,9 @@

    -

    - - template(source, *args, &block) - -

    +

    template(source, *args, &block)

    -
    - -
    - @@ -324,17 +302,11 @@

    Instance Private methods

    -

    - - application_name() - -

    +

    application_name()

    - -
    -

    Tries to retrieve the application name or simply return application.

    -
    - +
    +

    Tries to retrieve the application name or simply return application.

    +
    @@ -363,17 +335,9 @@

    -

    - - attributes_names() - -

    +

    attributes_names()

    -
    - -
    - @@ -402,17 +366,9 @@

    -

    - - class_name() - -

    +

    class_name()

    -
    - -
    - @@ -437,17 +393,9 @@

    -

    - - class_path() - -

    +

    class_path()

    -
    - -
    - @@ -472,17 +420,9 @@

    -

    - - edit_helper(...) - -

    +

    edit_helper(...)

    -
    - -
    - @@ -507,17 +447,9 @@

    -

    - - file_path() - -

    +

    file_path()

    -
    - -
    - @@ -542,17 +474,9 @@

    -

    - - fixture_file_name() - -

    +

    fixture_file_name()

    -
    - -
    - @@ -577,17 +501,9 @@

    -

    - - human_name() - -

    +

    human_name()

    -
    - -
    - @@ -612,17 +528,9 @@

    -

    - - i18n_scope() - -

    +

    i18n_scope()

    -
    - -
    - @@ -647,17 +555,9 @@

    -

    - - index_helper(type: nil) - -

    +

    index_helper(type: nil)

    -
    - -
    - @@ -682,17 +582,9 @@

    -

    - - inside_template() - -

    +

    inside_template()

    -
    - -
    - @@ -720,17 +612,9 @@

    -

    - - inside_template?() - -

    +

    inside_template?()

    -
    - -
    - @@ -755,17 +639,9 @@

    -

    - - model_resource_name(base_name = singular_table_name, prefix: "") - -

    +

    model_resource_name(base_name = singular_table_name, prefix: "")

    -
    - -
    - @@ -795,17 +671,9 @@

    -

    - - mountable_engine?() - -

    +

    mountable_engine?()

    -
    - -
    - @@ -830,17 +698,9 @@

    -

    - - namespaced_class_path() - -

    +

    namespaced_class_path()

    -
    - -
    - @@ -865,17 +725,9 @@

    -

    - - new_helper(type: :url) - -

    +

    new_helper(type: :url)

    -
    - -
    - @@ -900,17 +752,9 @@

    -

    - - plural_file_name() - -

    +

    plural_file_name()

    -
    - -
    - @@ -935,17 +779,9 @@

    -

    - - plural_name() - -

    +

    plural_name()

    -
    - -
    - @@ -970,17 +806,9 @@

    -

    - - plural_route_name() - -

    +

    plural_route_name()

    -
    - -
    - @@ -1009,17 +837,9 @@

    -

    - - plural_table_name() - -

    +

    plural_table_name()

    -
    - -
    - @@ -1044,17 +864,9 @@

    -

    - - pluralize_table_names?() - -

    +

    pluralize_table_names?()

    -
    - -
    - @@ -1079,17 +891,9 @@

    -

    - - redirect_resource_name() - -

    +

    redirect_resource_name()

    -
    - -
    - @@ -1114,17 +918,9 @@

    -

    - - regular_class_path() - -

    +

    regular_class_path()

    -
    - -
    - @@ -1149,17 +945,9 @@

    -

    - - route_url() - -

    +

    route_url()

    -
    - -
    - @@ -1184,17 +972,9 @@

    -

    - - show_helper(arg = "@#{singular_table_name}", type: :url) - -

    +

    show_helper(arg = "@#{singular_table_name}", type: :url)

    -
    - -
    - @@ -1219,17 +999,11 @@

    -

    - - singular_name() - -

    +

    singular_name()

    - -
    -

    FIXME: We are avoiding to use alias because a bug on thor that make this method public and add it to the task list.

    -
    - +
    +

    FIXME: We are avoiding to use alias because a bug on thor that make this method public and add it to the task list.

    +
    @@ -1254,17 +1028,9 @@

    -

    - - singular_route_name() - -

    +

    singular_route_name()

    -
    - -
    - @@ -1293,17 +1059,9 @@

    -

    - - singular_table_name() - -

    +

    singular_table_name()

    -
    - -
    - @@ -1328,17 +1086,9 @@

    -

    - - table_name() - -

    +

    table_name()

    -
    - -
    - @@ -1366,17 +1116,9 @@

    -

    - - uncountable?() - -

    +

    uncountable?()

    -
    - -
    - @@ -1401,17 +1143,9 @@

    -

    - - url_helper_prefix() - -

    +

    url_helper_prefix()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/ScriptGenerator.html b/src/classes/Rails/Generators/ScriptGenerator.html index c98fac0f62..f7cdc97afe 100644 --- a/src/classes/Rails/Generators/ScriptGenerator.html +++ b/src/classes/Rails/Generators/ScriptGenerator.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - generate_script() - -

    +

    generate_script()

    -
    - -
    - diff --git a/src/classes/Rails/Generators/Testing/Assertions.html b/src/classes/Rails/Generators/Testing/Assertions.html index c057b252f4..30b5966514 100644 --- a/src/classes/Rails/Generators/Testing/Assertions.html +++ b/src/classes/Rails/Generators/Testing/Assertions.html @@ -102,15 +102,10 @@

    Methods

    Instance Public methods

    -

    - - assert_class_method(method, content, &block) - -

    +

    assert_class_method(method, content, &block)

    - -
    -

    Asserts the given class method exists in the given content. This method does not detect class methods inside (class << self), only class methods which starts with “self.”. When a block is given, it yields the content of the method.

    +
    +

    Asserts the given class method exists in the given content. This method does not detect class methods inside (class << self), only class methods which starts with “self.”. When a block is given, it yields the content of the method.

    assert_migration "db/migrate/create_products.rb" do |migration|
       assert_class_method :up, migration do |up|
    @@ -118,8 +113,7 @@ 

    end end

    -
    - +
    @@ -144,24 +138,17 @@

    -

    - - assert_directory(relative, *contents) - -

    +

    assert_directory(relative, *contents)

    -
    - -
    - -
    - Alias for: assert_file -
    +

    + Alias for: + assert_file. +

    @@ -169,20 +156,14 @@

    -

    - - assert_field_default_value(attribute_type, value) - -

    +

    assert_field_default_value(attribute_type, value)

    - -
    -

    Asserts the given attribute type gets a proper default value:

    +
    +

    Asserts the given attribute type gets a proper default value:

    assert_field_default_value :string, "MyString"
     
    -
    - +
    @@ -211,20 +192,14 @@

    -

    - - assert_field_type(attribute_type, field_type) - -

    +

    assert_field_type(attribute_type, field_type)

    - -
    -

    Asserts the given attribute type gets translated to a field type properly:

    +
    +

    Asserts the given attribute type gets translated to a field type properly:

    assert_field_type :date, :date_select
     
    -
    - +
    @@ -249,15 +224,10 @@

    -

    - - assert_file(relative, *contents) - -

    +

    assert_file(relative, *contents)

    - -
    -

    Asserts a given file exists. You need to supply an absolute path or a path relative to the configured destination:

    +
    +

    Asserts a given file exists. You need to supply an absolute path or a path relative to the configured destination:

    assert_file "config/environment.rb"
     
    @@ -275,13 +245,14 @@

    end end -

    - +
    -
    - Also aliased as: assert_directory -
    +

    + Also aliased as: + + assert_directory. +

    @@ -318,15 +289,10 @@

    -

    - - assert_initializer(name, *contents, &block) - -

    +

    assert_initializer(name, *contents, &block)

    - -
    -

    Asserts a given initializer exists. You need to supply a path relative to the ‘config/initializers/` directory.

    +
    +

    Asserts a given initializer exists. You need to supply a path relative to the ‘config/initializers/` directory.

    assert_initializer "mail_interceptors.rb"
     
    @@ -342,8 +308,7 @@

    assert_match(/SandboxEmailInterceptor/, initializer) end -

    - +
    @@ -368,15 +333,10 @@

    -

    - - assert_instance_method(method, content) - -

    +

    assert_instance_method(method, content)

    - -
    -

    Asserts the given method exists in the given content. When a block is given, it yields the content of the method.

    +
    +

    Asserts the given method exists in the given content. When a block is given, it yields the content of the method.

    assert_file "app/controllers/products_controller.rb" do |controller|
       assert_instance_method :index, controller do |index|
    @@ -384,13 +344,14 @@ 

    end end

    -
    - +
    -
    - Also aliased as: assert_method -
    +

    + Also aliased as: + + assert_method. +

    @@ -415,24 +376,17 @@

    -

    - - assert_method(method, content) - -

    +

    assert_method(method, content)

    -
    - -
    - -
    - Alias for: assert_instance_method -
    +

    + Alias for: + assert_instance_method. +

    @@ -440,15 +394,10 @@

    -

    - - assert_migration(relative, *contents, &block) - -

    +

    assert_migration(relative, *contents, &block)

    - -
    -

    Asserts a given migration exists. You need to supply an absolute path or a path relative to the configured destination:

    +
    +

    Asserts a given migration exists. You need to supply an absolute path or a path relative to the configured destination:

    assert_migration "db/migrate/create_products.rb"
     
    @@ -459,8 +408,7 @@

    Consequently, assert_migration accepts the same arguments has assert_file.

    -

    - +
    @@ -487,24 +435,17 @@

    -

    - - assert_no_directory(relative) - -

    +

    assert_no_directory(relative)

    -
    - -
    - -
    - Alias for: assert_no_file -
    +

    + Alias for: + assert_no_file. +

    @@ -512,25 +453,21 @@

    -

    - - assert_no_file(relative) - -

    +

    assert_no_file(relative)

    - -
    -

    Asserts a given file does not exist. You need to supply an absolute path or a path relative to the configured destination:

    +
    +

    Asserts a given file does not exist. You need to supply an absolute path or a path relative to the configured destination:

    assert_no_file "config/random.rb"
     
    -
    - +
    -
    - Also aliased as: assert_no_directory -
    +

    + Also aliased as: + + assert_no_directory. +

    @@ -555,20 +492,14 @@

    -

    - - assert_no_migration(relative) - -

    +

    assert_no_migration(relative)

    - -
    -

    Asserts a given migration does not exist. You need to supply an absolute path or a path relative to the configured destination:

    +
    +

    Asserts a given migration does not exist. You need to supply an absolute path or a path relative to the configured destination:

    assert_no_migration "db/migrate/create_products.rb"
     
    -
    - +
    diff --git a/src/classes/Rails/Generators/Testing/Behavior.html b/src/classes/Rails/Generators/Testing/Behavior.html index d839ee2457..638fa8442a 100644 --- a/src/classes/Rails/Generators/Testing/Behavior.html +++ b/src/classes/Rails/Generators/Testing/Behavior.html @@ -83,20 +83,14 @@

    Methods

    Instance Public methods

    -

    - - create_generated_attribute(attribute_type, name = "test", index = nil) - -

    +

    create_generated_attribute(attribute_type, name = "test", index = nil)

    - -
    -

    Create a Rails::Generators::GeneratedAttribute by supplying the attribute type and, optionally, the attribute name:

    +
    +

    Create a Rails::Generators::GeneratedAttribute by supplying the attribute type and, optionally, the attribute name:

    create_generated_attribute(:string, "name")
     
    -
    - +
    @@ -121,17 +115,11 @@

    -

    - - generator(args = default_arguments, options = {}, config = {}) - -

    +

    generator(args = default_arguments, options = {}, config = {})

    - -
    -

    Instantiate the generator.

    -
    - +
    +

    Instantiate the generator.

    +
    @@ -156,15 +144,10 @@

    -

    - - run_generator(args = default_arguments, config = {}) - -

    +

    run_generator(args = default_arguments, config = {})

    - -
    -

    Runs the generator configured for this class. The first argument is an array like command line arguments:

    +
    +

    Runs the generator configured for this class. The first argument is an array like command line arguments:

    class AppGeneratorTest < Rails::Generators::TestCase
       tests AppGenerator
    @@ -179,8 +162,7 @@ 

    You can provide a configuration hash as second argument. This method returns the output printed by the generator.

    -
    - +
    @@ -217,17 +199,11 @@

    Instance Private methods

    -

    - - prepare_destination() - -

    +

    prepare_destination()

    - -
    -

    Clears all files and directories in destination.

    -
    - +
    +

    Clears all files and directories in destination.

    +
    diff --git a/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html b/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html index 4d4e9dd971..0ea32806b0 100644 --- a/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html +++ b/src/classes/Rails/Generators/Testing/Behavior/ClassMethods.html @@ -66,20 +66,14 @@

    Methods

    Instance Public methods

    -

    - - arguments(array) - -

    +

    arguments(array)

    - -
    -

    Sets default arguments on generator invocation. This can be overwritten when invoking it.

    +
    +

    Sets default arguments on generator invocation. This can be overwritten when invoking it.

    arguments %w(app_name --skip-active-record)
     
    -
    - +
    @@ -104,20 +98,14 @@

    -

    - - destination(path) - -

    +

    destination(path)

    - -
    -

    Sets the destination of generator files:

    +
    +

    Sets the destination of generator files:

    destination File.expand_path("../tmp", __dir__)
     
    -
    - +
    @@ -142,20 +130,14 @@

    -

    - - tests(klass) - -

    +

    tests(klass)

    - -
    -

    Sets which generator should be tested:

    +
    +

    Sets which generator should be tested:

    tests AppGenerator
     
    -
    - +
    diff --git a/src/classes/Rails/HealthController.html b/src/classes/Rails/HealthController.html index 4312b12158..8ae898d9e5 100644 --- a/src/classes/Rails/HealthController.html +++ b/src/classes/Rails/HealthController.html @@ -87,17 +87,9 @@

    Methods

    Instance Public methods

    -

    - - show() - -

    +

    show()

    -
    - -
    - diff --git a/src/classes/Rails/Info.html b/src/classes/Rails/Info.html index e04bf157c0..71e201e121 100644 --- a/src/classes/Rails/Info.html +++ b/src/classes/Rails/Info.html @@ -75,24 +75,17 @@

    Methods

    Class Public methods

    -

    - - inspect() - -

    +

    inspect()

    -
    - -
    - -
    - Alias for: to_s -
    +

    + Alias for: + to_s. +

    @@ -100,17 +93,9 @@

    -

    - - property(name, value = nil) - -

    +

    property(name, value = nil)

    -
    - -
    - @@ -137,17 +122,9 @@

    -

    - - to_html() - -

    +

    to_html()

    -
    - -
    - @@ -183,22 +160,16 @@

    -

    - - to_s() - -

    +

    to_s()

    -
    - -
    - -
    - Also aliased as: inspect -
    +

    + Also aliased as: + + inspect. +

    diff --git a/src/classes/Rails/Initializable.html b/src/classes/Rails/Initializable.html index 12ec3c7d03..8f82173717 100644 --- a/src/classes/Rails/Initializable.html +++ b/src/classes/Rails/Initializable.html @@ -84,17 +84,9 @@

    Methods

    Instance Public methods

    -

    - - initializers() - -

    +

    initializers()

    -
    - -
    - @@ -119,17 +111,9 @@

    -

    - - run_initializers(group = :default, *args) - -

    +

    run_initializers(group = :default, *args)

    -
    - -
    - diff --git a/src/classes/Rails/Initializable/ClassMethods.html b/src/classes/Rails/Initializable/ClassMethods.html index 3910285ad5..8270496f96 100644 --- a/src/classes/Rails/Initializable/ClassMethods.html +++ b/src/classes/Rails/Initializable/ClassMethods.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - initializer(name, opts = {}, &blk) - -

    +

    initializer(name, opts = {}, &blk)

    -
    - -
    - @@ -109,17 +101,9 @@

    -

    - - initializers() - -

    +

    initializers()

    -
    - -
    - @@ -144,17 +128,9 @@

    -

    - - initializers_chain() - -

    +

    initializers_chain()

    -
    - -
    - @@ -184,17 +160,9 @@

    -

    - - initializers_for(binding) - -

    +

    initializers_for(binding)

    -
    - -
    - diff --git a/src/classes/Rails/Initializable/Collection.html b/src/classes/Rails/Initializable/Collection.html index 2e0979d1d0..3f84c2f15e 100644 --- a/src/classes/Rails/Initializable/Collection.html +++ b/src/classes/Rails/Initializable/Collection.html @@ -127,17 +127,9 @@

    Included Modules

    Class Public methods

    -

    - - new(initializers = nil) - -

    +

    new(initializers = nil)

    -
    - -
    - @@ -169,17 +161,9 @@

    Instance Public methods

    -

    - - +(other) - -

    +

    +(other)

    -
    - -
    - @@ -204,17 +188,9 @@

    -

    - - <<(initializer) - -

    +

    <<(initializer)

    -
    - -
    - @@ -243,24 +219,17 @@

    -

    - - append(*initializers) - -

    +

    append(*initializers)

    -
    - -
    - -
    - Alias for: push -
    +

    + Alias for: + push. +

    @@ -268,17 +237,9 @@

    -

    - - concat(*initializer_collections) - -

    +

    concat(*initializer_collections)

    -
    - -
    - @@ -306,22 +267,16 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - -
    - Also aliased as: tsort_each_node -
    +

    + Also aliased as: + + tsort_each_node. +

    @@ -345,17 +300,9 @@

    -

    - - has?(name) - -

    +

    has?(name)

    -
    - -
    - @@ -380,17 +327,9 @@

    -

    - - last() - -

    +

    last()

    -
    - -
    - @@ -415,22 +354,16 @@

    -

    - - push(*initializers) - -

    +

    push(*initializers)

    -
    - -
    - -
    - Also aliased as: append -
    +

    + Also aliased as: + + append. +

    @@ -455,17 +388,9 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - @@ -490,17 +415,9 @@

    -

    - - tsort_each_child(initializer, &block) - -

    +

    tsort_each_child(initializer, &block)

    -
    - -
    - @@ -527,24 +444,17 @@

    -

    - - tsort_each_node(&block) - -

    +

    tsort_each_node(&block)

    -
    - -
    - -
    - Alias for: each -
    +

    + Alias for: + each. +

    diff --git a/src/classes/Rails/Initializable/Initializer.html b/src/classes/Rails/Initializable/Initializer.html index 8bc575d2cb..734caf0f29 100644 --- a/src/classes/Rails/Initializable/Initializer.html +++ b/src/classes/Rails/Initializable/Initializer.html @@ -117,17 +117,9 @@

    Attributes

    Class Public methods

    -

    - - new(name, context, before:, after:, group: nil, &block) - -

    +

    new(name, context, before:, after:, group: nil, &block)

    -
    - -
    - @@ -157,17 +149,9 @@

    Instance Public methods

    -

    - - belongs_to?(group) - -

    +

    belongs_to?(group)

    -
    - -
    - @@ -192,17 +176,9 @@

    -

    - - bind(context) - -

    +

    bind(context)

    -
    - -
    - @@ -228,17 +204,9 @@

    -

    - - context_class() - -

    +

    context_class()

    -
    - -
    - @@ -263,17 +231,9 @@

    -

    - - run(*args) - -

    +

    run(*args)

    -
    - -
    - diff --git a/src/classes/Rails/Paths/Path.html b/src/classes/Rails/Paths/Path.html index d28805079b..0ee907e052 100644 --- a/src/classes/Rails/Paths/Path.html +++ b/src/classes/Rails/Paths/Path.html @@ -147,17 +147,9 @@

    Attributes

    Class Public methods

    -

    - - new(root, current, paths, options = {}) - -

    +

    new(root, current, paths, options = {})

    -
    - -
    - @@ -195,22 +187,16 @@

    Instance Public methods

    -

    - - <<(path) - -

    +

    <<(path)

    -
    - -
    - -
    - Also aliased as: push -
    +

    + Also aliased as: + + push. +

    @@ -234,17 +220,9 @@

    -

    - - children() - -

    +

    children()

    -
    - -
    - @@ -272,17 +250,9 @@

    -

    - - concat(paths) - -

    +

    concat(paths)

    -
    - -
    - @@ -307,17 +277,9 @@

    -

    - - each(&block) - -

    +

    each(&block)

    -
    - -
    - @@ -342,17 +304,11 @@

    -

    - - existent() - -

    +

    existent()

    - -
    -

    Returns all expanded paths but only if they exist in the filesystem.

    -
    - +
    +

    Returns all expanded paths but only if they exist in the filesystem.

    +
    @@ -384,17 +340,9 @@

    -

    - - existent_directories() - -

    +

    existent_directories()

    -
    - -
    - @@ -419,22 +367,18 @@

    -

    - - expanded() - -

    +

    expanded()

    - -
    -

    Expands all paths against the root and return all unique values.

    -
    - +
    +

    Expands all paths against the root and return all unique values.

    +
    -
    - Also aliased as: to_a -
    +

    + Also aliased as: + + to_a. +

    @@ -472,17 +416,9 @@

    -

    - - first() - -

    +

    first()

    -
    - -
    - @@ -507,17 +443,9 @@

    -

    - - last() - -

    +

    last()

    -
    - -
    - @@ -542,17 +470,9 @@

    -

    - - paths() - -

    +

    paths()

    -
    - -
    - @@ -581,24 +501,17 @@

    -

    - - push(path) - -

    +

    push(path)

    -
    - -
    - -
    - Alias for: << -
    +

    + Alias for: + <<. +

    @@ -606,24 +519,17 @@

    -

    - - to_a() - -

    +

    to_a()

    -
    - -
    - -
    - Alias for: expanded -
    +

    + Alias for: + expanded. +

    @@ -631,17 +537,9 @@

    -

    - - to_ary() - -

    +

    to_ary()

    -
    - -
    - @@ -666,17 +564,9 @@

    -

    - - unshift(*paths) - -

    +

    unshift(*paths)

    -
    - -
    - diff --git a/src/classes/Rails/Paths/Root.html b/src/classes/Rails/Paths/Root.html index 6669478725..a04c78c226 100644 --- a/src/classes/Rails/Paths/Root.html +++ b/src/classes/Rails/Paths/Root.html @@ -166,17 +166,9 @@

    Attributes

    Class Public methods

    -

    - - new(path) - -

    +

    new(path)

    -
    - -
    - @@ -206,17 +198,9 @@

    Instance Public methods

    -

    - - [](path) - -

    +

    [](path)

    -
    - -
    - @@ -241,17 +225,9 @@

    -

    - - []=(path, value) - -

    +

    []=(path, value)

    -
    - -
    - @@ -277,17 +253,9 @@

    -

    - - add(path, options = {}) - -

    +

    add(path, options = {})

    -
    - -
    - @@ -313,17 +281,9 @@

    -

    - - all_paths() - -

    +

    all_paths()

    -
    - -
    - @@ -348,17 +308,9 @@

    -

    - - autoload_once() - -

    +

    autoload_once()

    -
    - -
    - @@ -383,17 +335,9 @@

    -

    - - autoload_paths() - -

    +

    autoload_paths()

    -
    - -
    - @@ -418,17 +362,9 @@

    -

    - - eager_load() - -

    +

    eager_load()

    -
    - -
    - @@ -453,17 +389,9 @@

    -

    - - keys() - -

    +

    keys()

    -
    - -
    - @@ -488,17 +416,9 @@

    -

    - - load_paths() - -

    +

    load_paths()

    -
    - -
    - @@ -523,17 +443,9 @@

    -

    - - values() - -

    +

    values()

    -
    - -
    - @@ -558,17 +470,9 @@

    -

    - - values_at(*list) - -

    +

    values_at(*list)

    -
    - -
    - diff --git a/src/classes/Rails/PluginBuilder.html b/src/classes/Rails/PluginBuilder.html index 872624d326..cfc8aa044a 100644 --- a/src/classes/Rails/PluginBuilder.html +++ b/src/classes/Rails/PluginBuilder.html @@ -161,17 +161,9 @@

    Constants

    Instance Public methods

    -

    - - app() - -

    +

    app()

    -
    - -
    - @@ -221,17 +213,9 @@

    -

    - - bin() - -

    +

    bin()

    -
    - -
    - @@ -260,17 +244,9 @@

    -

    - - cifiles() - -

    +

    cifiles()

    -
    - -
    - @@ -297,17 +273,9 @@

    -

    - - config() - -

    +

    config()

    -
    - -
    - @@ -332,17 +300,9 @@

    -

    - - gemfile() - -

    +

    gemfile()

    -
    - -
    - @@ -367,17 +327,9 @@

    -

    - - gemfile_entry() - -

    +

    gemfile_entry()

    -
    - -
    - @@ -408,17 +360,9 @@

    -

    - - gemspec() - -

    +

    gemspec()

    -
    - -
    - @@ -443,17 +387,9 @@

    -

    - - generate_test_dummy(force = false) - -

    +

    generate_test_dummy(force = false)

    -
    - -
    - @@ -493,17 +429,9 @@

    -

    - - gitignore() - -

    +

    gitignore()

    -
    - -
    - @@ -528,17 +456,9 @@

    -

    - - lib() - -

    +

    lib()

    -
    - -
    - @@ -571,17 +491,9 @@

    -

    - - license() - -

    +

    license()

    -
    - -
    - @@ -606,17 +518,9 @@

    -

    - - rakefile() - -

    +

    rakefile()

    -
    - -
    - @@ -641,17 +545,9 @@

    -

    - - readme() - -

    +

    readme()

    -
    - -
    - @@ -676,17 +572,9 @@

    -

    - - rubocop() - -

    +

    rubocop()

    -
    - -
    - @@ -711,17 +599,9 @@

    -

    - - stylesheets() - -

    +

    stylesheets()

    -
    - -
    - @@ -751,17 +631,9 @@

    -

    - - test() - -

    +

    test()

    -
    - -
    - @@ -801,17 +673,9 @@

    -

    - - test_dummy_assets() - -

    +

    test_dummy_assets()

    -
    - -
    - @@ -836,17 +700,9 @@

    -

    - - test_dummy_clean() - -

    +

    test_dummy_clean()

    -
    - -
    - @@ -880,17 +736,9 @@

    -

    - - test_dummy_config() - -

    +

    test_dummy_config()

    -
    - -
    - @@ -926,17 +774,9 @@

    -

    - - version_control() - -

    +

    version_control()

    -
    - -
    - diff --git a/src/classes/Rails/Rack/Logger.html b/src/classes/Rails/Rack/Logger.html index 7ffad55ef8..11ef0f591f 100644 --- a/src/classes/Rails/Rack/Logger.html +++ b/src/classes/Rails/Rack/Logger.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - new(app, taggers = nil) - -

    +

    new(app, taggers = nil)

    -
    - -
    - @@ -127,17 +119,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - @@ -173,17 +157,9 @@

    Instance Private methods

    -

    - - call_app(request, env) - -

    +

    call_app(request, env)

    -
    - -
    - @@ -226,17 +202,9 @@

    -

    - - compute_tags(request) - -

    +

    compute_tags(request)

    -
    - -
    - @@ -270,17 +238,11 @@

    -

    - - started_request_message(request) - -

    +

    started_request_message(request)

    - -
    -

    Started GET “/session/new” for 127.0.0.1 at 2012-09-26 14:51:42 -0700

    -
    - +
    +

    Started GET “/session/new” for 127.0.0.1 at 2012-09-26 14:51:42 -0700

    +
    diff --git a/src/classes/Rails/Rack/SilenceRequest.html b/src/classes/Rails/Rack/SilenceRequest.html index 2069dadbf1..19bddf2401 100644 --- a/src/classes/Rails/Rack/SilenceRequest.html +++ b/src/classes/Rails/Rack/SilenceRequest.html @@ -81,17 +81,9 @@

    Methods

    Class Public methods

    -

    - - new(app, path:) - -

    +

    new(app, path:)

    -
    - -
    - @@ -120,17 +112,9 @@

    Instance Public methods

    -

    - - call(env) - -

    +

    call(env)

    -
    - -
    - diff --git a/src/classes/Rails/Railtie.html b/src/classes/Rails/Railtie.html index f9dfc5d95f..88a4f894f5 100644 --- a/src/classes/Rails/Railtie.html +++ b/src/classes/Rails/Railtie.html @@ -294,17 +294,9 @@

    Attributes

    Class Public methods

    -

    - - abstract_railtie?() - -

    +

    abstract_railtie?()

    -
    - -
    - @@ -329,17 +321,11 @@

    -

    - - configure(&block) - -

    +

    configure(&block)

    - -
    -

    Allows you to configure the railtie. This is the same method seen in Railtie::Configurable, but this module is no longer required for all subclasses of Railtie so we provide the class method here.

    -
    - +
    +

    Allows you to configure the railtie. This is the same method seen in Railtie::Configurable, but this module is no longer required for all subclasses of Railtie so we provide the class method here.

    +
    @@ -364,17 +350,9 @@

    -

    - - console(&blk) - -

    +

    console(&blk)

    -
    - -
    - @@ -399,17 +377,9 @@

    -

    - - generators(&blk) - -

    +

    generators(&blk)

    -
    - -
    - @@ -434,17 +404,9 @@

    -

    - - inherited(subclass) - -

    +

    inherited(subclass)

    -
    - -
    - @@ -470,17 +432,11 @@

    -

    - - instance() - -

    +

    instance()

    - -
    -

    Since Rails::Railtie cannot be instantiated, any methods that call instance are intended to be called only on subclasses of a Railtie.

    -
    - +
    +

    Since Rails::Railtie cannot be instantiated, any methods that call instance are intended to be called only on subclasses of a Railtie.

    +
    @@ -505,17 +461,9 @@

    -

    - - railtie_name(name = nil) - -

    +

    railtie_name(name = nil)

    -
    - -
    - @@ -541,17 +489,9 @@

    -

    - - rake_tasks(&blk) - -

    +

    rake_tasks(&blk)

    -
    - -
    - @@ -576,17 +516,9 @@

    -

    - - runner(&blk) - -

    +

    runner(&blk)

    -
    - -
    - @@ -611,17 +543,9 @@

    -

    - - server(&blk) - -

    +

    server(&blk)

    -
    - -
    - @@ -646,17 +570,9 @@

    -

    - - subclasses() - -

    +

    subclasses()

    -
    - -
    - @@ -684,17 +600,9 @@

    Class Protected methods

    -

    - - increment_load_index() - -

    +

    increment_load_index()

    -
    - -
    - @@ -724,17 +632,11 @@

    Instance Public methods

    -

    - - config() - -

    +

    config()

    - -
    -

    This is used to create the config object on Railties, an instance of Railtie::Configuration, that is used by Railties and Application to store related configuration.

    -
    - +
    +

    This is used to create the config object on Railties, an instance of Railtie::Configuration, that is used by Railties and Application to store related configuration.

    +
    diff --git a/src/classes/Rails/Railtie/Configurable/ClassMethods.html b/src/classes/Rails/Railtie/Configurable/ClassMethods.html index 59ba6b1db3..8200d805e6 100644 --- a/src/classes/Rails/Railtie/Configurable/ClassMethods.html +++ b/src/classes/Rails/Railtie/Configurable/ClassMethods.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - configure(&block) - -

    +

    configure(&block)

    -
    - -
    - @@ -105,17 +97,9 @@

    -

    - - inherited(base) - -

    +

    inherited(base)

    -
    - -
    - @@ -140,17 +124,9 @@

    -

    - - instance() - -

    +

    instance()

    -
    - -
    - @@ -175,17 +151,9 @@

    -

    - - respond_to?(*args) - -

    +

    respond_to?(*args)

    -
    - -
    - diff --git a/src/classes/Rails/Railtie/Configuration.html b/src/classes/Rails/Railtie/Configuration.html index 53801ca399..29fbd1e9c3 100644 --- a/src/classes/Rails/Railtie/Configuration.html +++ b/src/classes/Rails/Railtie/Configuration.html @@ -115,17 +115,9 @@

    Methods

    Class Public methods

    -

    - - new() - -

    +

    new()

    -
    - -
    - @@ -154,17 +146,11 @@

    Instance Public methods

    -

    - - after_initialize(&block) - -

    +

    after_initialize(&block)

    - -
    -

    Last configurable block to run. Called after frameworks initialize.

    -
    - +
    +

    Last configurable block to run. Called after frameworks initialize.

    +
    @@ -189,17 +175,11 @@

    -

    - - after_routes_loaded(&block) - -

    +

    after_routes_loaded(&block)

    - -
    -

    Called after application routes have been loaded.

    -
    - +
    +

    Called after application routes have been loaded.

    +
    @@ -224,19 +204,13 @@

    -

    - - app_generators() - -

    +

    app_generators()

    - -
    -

    This allows you to modify application’s generators from Railties.

    +
    +

    This allows you to modify application’s generators from Railties.

    Values set on app_generators will become defaults for application, unless application overwrites them.

    -
    - +
    @@ -263,19 +237,13 @@

    -

    - - app_middleware() - -

    +

    app_middleware()

    - -
    -

    This allows you to modify the application’s middlewares from Engines.

    +
    +

    This allows you to modify the application’s middlewares from Engines.

    All operations you run on the app_middleware will be replayed on the application once it is defined and the default_middlewares are created

    -
    - +
    @@ -300,17 +268,11 @@

    -

    - - before_configuration(&block) - -

    +

    before_configuration(&block)

    - -
    -

    First configurable block to run. Called before any initializers are run.

    -
    - +
    +

    First configurable block to run. Called before any initializers are run.

    +
    @@ -335,17 +297,11 @@

    -

    - - before_eager_load(&block) - -

    +

    before_eager_load(&block)

    - -
    -

    Third configurable block to run. Does not run if config.eager_load set to false.

    -
    - +
    +

    Third configurable block to run. Does not run if config.eager_load set to false.

    +
    @@ -370,17 +326,11 @@

    -

    - - before_initialize(&block) - -

    +

    before_initialize(&block)

    - -
    -

    Second configurable block to run. Called before frameworks initialize.

    -
    - +
    +

    Second configurable block to run. Called before frameworks initialize.

    +
    @@ -405,17 +355,11 @@

    -

    - - eager_load_namespaces() - -

    +

    eager_load_namespaces()

    - -
    -

    All namespaces that are eager loaded

    -
    - +
    +

    All namespaces that are eager loaded

    +
    @@ -440,17 +384,9 @@

    -

    - - respond_to?(name, include_private = false) - -

    +

    respond_to?(name, include_private = false)

    -
    - -
    - @@ -475,17 +411,11 @@

    -

    - - to_prepare(&blk) - -

    +

    to_prepare(&blk)

    - -
    -

    Defines generic callbacks to run before after_initialize. Useful for Rails::Railtie subclasses.

    -
    - +
    +

    Defines generic callbacks to run before after_initialize. Useful for Rails::Railtie subclasses.

    +
    @@ -510,17 +440,11 @@

    -

    - - to_prepare_blocks() - -

    +

    to_prepare_blocks()

    - -
    -

    Array of callbacks defined by to_prepare.

    -
    - +
    +

    Array of callbacks defined by to_prepare.

    +
    @@ -545,17 +469,11 @@

    -

    - - watchable_dirs() - -

    +

    watchable_dirs()

    - -
    -

    Add directories that should be watched for change. The key of the hashes should be directories and the values should be an array of extensions to match in each directory.

    -
    - +
    +

    Add directories that should be watched for change. The key of the hashes should be directories and the values should be an array of extensions to match in each directory.

    +
    @@ -580,17 +498,11 @@

    -

    - - watchable_files() - -

    +

    watchable_files()

    - -
    -

    Add files that should be watched for change.

    -
    - +
    +

    Add files that should be watched for change.

    +
    diff --git a/src/classes/Rails/Server.html b/src/classes/Rails/Server.html index c6f75cca23..66da6c33f5 100644 --- a/src/classes/Rails/Server.html +++ b/src/classes/Rails/Server.html @@ -100,17 +100,9 @@

    Methods

    Class Public methods

    -

    - - new(options = nil) - -

    +

    new(options = nil)

    -
    - -
    - @@ -141,17 +133,9 @@

    Instance Public methods

    -

    - - default_options() - -

    +

    default_options()

    -
    - -
    - @@ -176,17 +160,9 @@

    -

    - - middleware() - -

    +

    middleware()

    -
    - -
    - @@ -211,17 +187,9 @@

    -

    - - opt_parser() - -

    +

    opt_parser()

    -
    - -
    - @@ -246,17 +214,9 @@

    -

    - - served_url() - -

    +

    served_url()

    -
    - -
    - @@ -281,17 +241,9 @@

    -

    - - set_environment() - -

    +

    set_environment()

    -
    - -
    - @@ -316,17 +268,9 @@

    -

    - - start(after_stop_callback = nil) - -

    +

    start(after_stop_callback = nil)

    -
    - -
    - diff --git a/src/classes/Rails/Server/Options.html b/src/classes/Rails/Server/Options.html index 5edbe80825..e21f9aa340 100644 --- a/src/classes/Rails/Server/Options.html +++ b/src/classes/Rails/Server/Options.html @@ -64,17 +64,9 @@

    Methods

    Instance Public methods

    -

    - - parse!(args) - -

    +

    parse!(args)

    -
    - -
    - diff --git a/src/classes/Rails/SourceAnnotationExtractor.html b/src/classes/Rails/SourceAnnotationExtractor.html index 3e19fe73b5..aa6a8692f6 100644 --- a/src/classes/Rails/SourceAnnotationExtractor.html +++ b/src/classes/Rails/SourceAnnotationExtractor.html @@ -120,15 +120,10 @@

    Attributes

    Class Public methods

    -

    - - enumerate(tag = nil, options = {}) - -

    +

    enumerate(tag = nil, options = {})

    - -
    -

    Prints all annotations with tag tag under the root directories app, config, db, lib, and test (recursively).

    +
    +

    Prints all annotations with tag tag under the root directories app, config, db, lib, and test (recursively).

    If tag is nil, annotations with either default or registered tags are printed.

    @@ -142,8 +137,7 @@

    See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account.

    This class method is the single entry point for the rails notes command.

    -

    - +
    @@ -171,17 +165,9 @@

    -

    - - new(tag) - -

    +

    new(tag)

    -
    - -
    - @@ -210,17 +196,11 @@

    Instance Public methods

    -

    - - display(results, options = {}) - -

    +

    display(results, options = {})

    - -
    -

    Prints the mapping from filenames to annotations in results ordered by filename. The options hash is passed to each annotation’s to_s.

    -
    - +
    +

    Prints the mapping from filenames to annotations in results ordered by filename. The options hash is passed to each annotation’s to_s.

    +
    @@ -252,17 +232,11 @@

    -

    - - find(dirs) - -

    +

    find(dirs)

    - -
    -

    Returns a hash that maps filenames under dirs (recursively) to arrays with their annotations.

    -
    - +
    +

    Returns a hash that maps filenames under dirs (recursively) to arrays with their annotations.

    +
    @@ -287,17 +261,11 @@

    -

    - - find_in(dir) - -

    +

    find_in(dir)

    - -
    -

    Returns a hash that maps filenames under dir (recursively) to arrays with their annotations. Files with extensions registered in Rails::SourceAnnotationExtractor::Annotation.extensions are taken into account. Only files with annotations are included.

    -
    - +
    +

    Returns a hash that maps filenames under dir (recursively) to arrays with their annotations. Files with extensions registered in Rails::SourceAnnotationExtractor::Annotation.extensions are taken into account. Only files with annotations are included.

    +
    diff --git a/src/classes/Rails/SourceAnnotationExtractor/Annotation.html b/src/classes/Rails/SourceAnnotationExtractor/Annotation.html index 0bd74f4f8f..c3a404a2b0 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/Annotation.html +++ b/src/classes/Rails/SourceAnnotationExtractor/Annotation.html @@ -87,17 +87,9 @@

    Methods

    Class Public methods

    -

    - - directories() - -

    +

    directories()

    -
    - -
    - @@ -122,17 +114,9 @@

    -

    - - extensions() - -

    +

    extensions()

    -
    - -
    - @@ -157,20 +141,14 @@

    -

    - - register_directories(*dirs) - -

    +

    register_directories(*dirs)

    - -
    -

    Registers additional directories to be included

    +
    +

    Registers additional directories to be included

    Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another")
     
    -
    - +
    @@ -195,20 +173,14 @@

    -

    - - register_extensions(*exts, &block) - -

    +

    register_extensions(*exts, &block)

    - -
    -

    Registers new Annotations File Extensions

    +
    +

    Registers new Annotations File Extensions

    Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
     
    -
    - +
    @@ -233,20 +205,14 @@

    -

    - - register_tags(*additional_tags) - -

    +

    register_tags(*additional_tags)

    - -
    -

    Registers additional tags

    +
    +

    Registers additional tags

    Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME")
     
    -
    - +
    @@ -271,17 +237,9 @@

    -

    - - tags() - -

    +

    tags()

    -
    - -
    - @@ -310,22 +268,16 @@

    Instance Public methods

    -

    - - to_s(options = {}) - -

    +

    to_s(options = {})

    - -
    -

    Returns a representation of the annotation that looks like this:

    +
    +

    Returns a representation of the annotation that looks like this:

    [126] [TODO] This algorithm is simple and clearly correct, make it faster.
     

    If options has a flag :tag the tag is shown as in the example above. Otherwise the string contains just line and text.

    -
    - +
    diff --git a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html index 81a7d6155e..0b3782b046 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html +++ b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor.html @@ -83,17 +83,9 @@

    Methods

    Instance Public methods

    -

    - - annotations(file) - -

    +

    annotations(file)

    -
    - -
    - diff --git a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html index 021c956d9f..3d73547a5c 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html +++ b/src/classes/Rails/SourceAnnotationExtractor/ParserExtractor/Parser.html @@ -89,17 +89,9 @@

    Attributes

    Class Public methods

    -

    - - new(source, pattern:) - -

    +

    new(source, pattern:)

    -
    - -
    - @@ -130,17 +122,9 @@

    Instance Public methods

    -

    - - on_comment(value) - -

    +

    on_comment(value)

    -
    - -
    - diff --git a/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html b/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html index 1e91c00fd0..5f919d26d4 100644 --- a/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html +++ b/src/classes/Rails/SourceAnnotationExtractor/PatternExtractor.html @@ -70,17 +70,9 @@

    Methods

    Instance Public methods

    -

    - - annotations(file) - -

    +

    annotations(file)

    -
    - -
    - diff --git a/src/classes/Range.html b/src/classes/Range.html index 499f6a3185..693fb5849d 100644 --- a/src/classes/Range.html +++ b/src/classes/Range.html @@ -82,17 +82,9 @@

    Methods

    Instance Public methods

    -

    - - _empty_range?(b, e, excl) - -

    +

    _empty_range?(b, e, excl)

    -
    - -
    - @@ -120,26 +112,22 @@

    -

    - - overlap?(other) - -

    +

    overlap?(other)

    - -
    -

    Compare two ranges and see if they overlap each other

    +
    +

    Compare two ranges and see if they overlap each other

    (1..5).overlap?(4..6) # => true
     (1..5).overlap?(7..9) # => false
     
    -
    - +
    -
    - Also aliased as: overlaps? -
    +

    + Also aliased as: + + overlaps?. +

    @@ -181,24 +169,17 @@

    -

    - - overlaps?(other) - -

    +

    overlaps?(other)

    -
    - -
    - -
    - Alias for: overlap? -
    +

    + Alias for: + overlap?. +

    @@ -206,22 +187,16 @@

    -

    - - sole() - -

    +

    sole()

    - -
    -

    Returns the sole item in the range. If there are no items, or more than one item, raises Enumerable::SoleItemExpectedError.

    +
    +

    Returns the sole item in the range. If there are no items, or more than one item, raises Enumerable::SoleItemExpectedError.

    (1..1).sole   # => 1
     (2..1).sole   # => Enumerable::SoleItemExpectedError: no item found
     (..1).sole    # => Enumerable::SoleItemExpectedError: infinite range cannot represent a sole item
     
    -
    - +
    diff --git a/src/classes/Regexp.html b/src/classes/Regexp.html index 3c6654fe9d..011ee3472c 100644 --- a/src/classes/Regexp.html +++ b/src/classes/Regexp.html @@ -66,15 +66,10 @@

    Methods

    Instance Public methods

    -

    - - multiline?() - -

    +

    multiline?()

    - -
    -

    Returns true if the regexp has the multiline flag set.

    +
    +

    Returns true if the regexp has the multiline flag set.

    (/./).multiline?  # => false
     (/./m).multiline? # => true
    @@ -82,8 +77,7 @@ 

    Regexp.new(".").multiline? # => false Regexp.new(".", Regexp::MULTILINE).multiline? # => true

    -
    - +
    diff --git a/src/classes/SecureRandom.html b/src/classes/SecureRandom.html index 9fb94d6b4f..70ef5cf94b 100644 --- a/src/classes/SecureRandom.html +++ b/src/classes/SecureRandom.html @@ -81,17 +81,9 @@

    Constants

    Class Public methods

    -

    - - base36(n = 16) - -

    +

    base36(n = 16)

    -
    - -
    - @@ -116,17 +108,9 @@

    -

    - - base58(n = 16) - -

    +

    base58(n = 16)

    -
    - -
    - diff --git a/src/classes/Singleton.html b/src/classes/Singleton.html index b961906440..3633fb0c6a 100644 --- a/src/classes/Singleton.html +++ b/src/classes/Singleton.html @@ -58,20 +58,14 @@

    Methods

    Instance Public methods

    -

    - - duplicable?() - -

    +

    duplicable?()

    - -
    -

    Singleton instances are not duplicable:

    +
    +

    Singleton instances are not duplicable:

    Class.new.include(Singleton).instance.dup # TypeError (can't dup instance of singleton
     
    -
    - +
    diff --git a/src/classes/String.html b/src/classes/String.html index d4beb623c9..947feeff24 100644 --- a/src/classes/String.html +++ b/src/classes/String.html @@ -299,17 +299,11 @@

    Constants

    Instance Public methods

    -

    - - acts_like_string?() - -

    +

    acts_like_string?()

    - -
    -

    Enables more predictable duck-typing on String-like classes. See Object#acts_like?.

    -
    - +
    +

    Enables more predictable duck-typing on String-like classes. See Object#acts_like?.

    +
    @@ -334,15 +328,10 @@

    -

    - - at(position) - -

    +

    at(position)

    - -
    -

    If you pass a single integer, returns a substring of one character at that position. The first character of the string is at position 0, the next at position 1, and so on. If a range is supplied, a substring containing characters at offsets given by the range is returned. In both cases, if an offset is negative, it is counted from the end of the string. Returns nil if the initial offset falls outside the string. Returns an empty string if the beginning of the range is greater than the end of the string.

    +
    +

    If you pass a single integer, returns a substring of one character at that position. The first character of the string is at position 0, the next at position 1, and so on. If a range is supplied, a substring containing characters at offsets given by the range is returned. In both cases, if an offset is negative, it is counted from the end of the string. Returns nil if the initial offset falls outside the string. Returns an empty string if the beginning of the range is greater than the end of the string.

    str = "hello"
     str.at(0)      # => "h"
    @@ -361,8 +350,7 @@ 

    str.at("lo") # => "lo" str.at("ol") # => nil

    -
    - +
    @@ -387,15 +375,10 @@

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    A string is blank if it’s empty or contains whitespaces only:

    +
    +

    A string is blank if it’s empty or contains whitespaces only:

    ''.blank?       # => true
     '   '.blank?    # => true
    @@ -409,8 +392,7 @@ 

    @return [true, false]

    -
    - +
    @@ -443,24 +425,17 @@

    -

    - - camelcase(first_letter = :upper) - -

    +

    camelcase(first_letter = :upper)

    -
    - -
    - -
    - Alias for: camelize -
    +

    + Alias for: + camelize. +

    @@ -468,15 +443,10 @@

    -

    - - camelize(first_letter = :upper) - -

    +

    camelize(first_letter = :upper)

    - -
    -

    By default, camelize converts strings to UpperCamelCase. If the argument to camelize is set to :lower then camelize produces lowerCamelCase.

    +
    +

    By default, camelize converts strings to UpperCamelCase. If the argument to camelize is set to :lower then camelize produces lowerCamelCase.

    camelize will also convert ‘/’ to ‘::’ which is useful for converting paths to namespaces.

    @@ -487,13 +457,14 @@

    See ActiveSupport::Inflector.camelize.

    -

    - +
    -
    - Also aliased as: camelcase -
    +

    + Also aliased as: + + camelcase. +

    @@ -524,23 +495,17 @@

    -

    - - classify() - -

    +

    classify()

    - -
    -

    Creates a class name from a plural table name like Rails does for table names to models. Note that this returns a string and not a class. (To convert to an actual class follow classify with constantize.)

    +
    +

    Creates a class name from a plural table name like Rails does for table names to models. Note that this returns a string and not a class. (To convert to an actual class follow classify with constantize.)

    'ham_and_eggs'.classify # => "HamAndEgg"
     'posts'.classify        # => "Post"
     

    See ActiveSupport::Inflector.classify.

    -
    - +
    @@ -565,15 +530,10 @@

    -

    - - constantize() - -

    +

    constantize()

    - -
    -

    constantize tries to find a declared constant with the name specified in the string. It raises a NameError when the name is not in CamelCase or is not initialized.

    +
    +

    constantize tries to find a declared constant with the name specified in the string. It raises a NameError when the name is not in CamelCase or is not initialized.

    'Module'.constantize  # => Module
     'Class'.constantize   # => Class
    @@ -581,8 +541,7 @@ 

    See ActiveSupport::Inflector.constantize.

    -
    - +
    @@ -607,22 +566,16 @@

    -

    - - dasherize() - -

    +

    dasherize()

    - -
    -

    Replaces underscores with dashes in the string.

    +
    +

    Replaces underscores with dashes in the string.

    'puni_puni'.dasherize # => "puni-puni"
     

    See ActiveSupport::Inflector.dasherize.

    -
    - +
    @@ -647,15 +600,10 @@

    -

    - - deconstantize() - -

    +

    deconstantize()

    - -
    -

    Removes the rightmost segment from the constant expression in the string.

    +
    +

    Removes the rightmost segment from the constant expression in the string.

    'Net::HTTP'.deconstantize   # => "Net"
     '::Net::HTTP'.deconstantize # => "::Net"
    @@ -667,8 +615,7 @@ 

    See ActiveSupport::Inflector.deconstantize.

    See also demodulize.

    -

    - +
    @@ -693,15 +640,10 @@

    -

    - - demodulize() - -

    +

    demodulize()

    - -
    -

    Removes the module part from the constant expression in the string.

    +
    +

    Removes the module part from the constant expression in the string.

    'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections"
     'Inflections'.demodulize                           # => "Inflections"
    @@ -712,8 +654,7 @@ 

    See ActiveSupport::Inflector.demodulize.

    See also deconstantize.

    -

    - +
    @@ -738,15 +679,10 @@

    -

    - - downcase_first() - -

    +

    downcase_first()

    - -
    -

    Converts the first character to lowercase.

    +
    +

    Converts the first character to lowercase.

    'If they enjoyed The Matrix'.downcase_first # => "if they enjoyed The Matrix"
     'I'.downcase_first                          # => "i"
    @@ -754,8 +690,7 @@ 

    See ActiveSupport::Inflector.downcase_first.

    -
    - +
    @@ -780,22 +715,16 @@

    -

    - - exclude?(string) - -

    +

    exclude?(string)

    - -
    -

    The inverse of String#include?. Returns true if the string does not include the other string.

    +
    +

    The inverse of String#include?. Returns true if the string does not include the other string.

    "hello".exclude? "lo" # => false
     "hello".exclude? "ol" # => true
     "hello".exclude? ?h   # => false
     
    -
    - +
    @@ -820,15 +749,10 @@

    -

    - - first(limit = 1) - -

    +

    first(limit = 1)

    - -
    -

    Returns the first character. If a limit is supplied, returns a substring from the beginning of the string until it reaches the limit value. If the given limit is greater than or equal to the string length, returns a copy of self.

    +
    +

    Returns the first character. If a limit is supplied, returns a substring from the beginning of the string until it reaches the limit value. If the given limit is greater than or equal to the string length, returns a copy of self.

    str = "hello"
     str.first    # => "h"
    @@ -837,8 +761,7 @@ 

    str.first(0) # => "" str.first(6) # => "hello"

    -
    - +
    @@ -863,15 +786,10 @@

    -

    - - foreign_key(separate_class_name_and_id_with_underscore = true) - -

    +

    foreign_key(separate_class_name_and_id_with_underscore = true)

    - -
    -

    Creates a foreign key name from a class name. separate_class_name_and_id_with_underscore sets whether the method should put ‘_’ between the name and ‘id’.

    +
    +

    Creates a foreign key name from a class name. separate_class_name_and_id_with_underscore sets whether the method should put ‘_’ between the name and ‘id’.

    'Message'.foreign_key        # => "message_id"
     'Message'.foreign_key(false) # => "messageid"
    @@ -879,8 +797,7 @@ 

    See ActiveSupport::Inflector.foreign_key.

    -
    - +
    @@ -905,15 +822,10 @@

    -

    - - from(position) - -

    +

    from(position)

    - -
    -

    Returns a substring from the given position to the end of the string. If the position is negative, it is counted from the end of the string.

    +
    +

    Returns a substring from the given position to the end of the string. If the position is negative, it is counted from the end of the string.

    str = "hello"
     str.from(0)  # => "hello"
    @@ -927,8 +839,7 @@ 

    str.from(0).to(-1) # => "hello" str.from(1).to(-2) # => "ell"

    -
    - +
    @@ -953,17 +864,11 @@

    -

    - - html_safe() - -

    +

    html_safe()

    - -
    -

    Marks a string as trusted safe. It will be inserted into HTML with no additional escaping performed. It is your responsibility to ensure that the string contains no malicious content. This method is equivalent to the raw helper in views. It is recommended that you use sanitize instead of this method. It should never be called on user input.

    -
    - +
    +

    Marks a string as trusted safe. It will be inserted into HTML with no additional escaping performed. It is your responsibility to ensure that the string contains no malicious content. This method is equivalent to the raw helper in views. It is recommended that you use sanitize instead of this method. It should never be called on user input.

    +
    @@ -988,15 +893,10 @@

    -

    - - humanize(capitalize: true, keep_id_suffix: false) - -

    +

    humanize(capitalize: true, keep_id_suffix: false)

    - -
    -

    Capitalizes the first word, turns underscores into spaces, and (by default) strips a trailing ‘_id’ if present. Like titleize, this is meant for creating pretty output.

    +
    +

    Capitalizes the first word, turns underscores into spaces, and (by default) strips a trailing ‘_id’ if present. Like titleize, this is meant for creating pretty output.

    The capitalization of the first word can be turned off by setting the optional parameter capitalize to false. By default, this parameter is true.

    @@ -1010,8 +910,7 @@

    See ActiveSupport::Inflector.humanize.

    -

    - +
    @@ -1036,17 +935,11 @@

    -

    - - in_time_zone(zone = ::Time.zone) - -

    +

    in_time_zone(zone = ::Time.zone)

    - -
    -

    Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default is set, otherwise converts String to a Time via String#to_time

    -
    - +
    +

    Converts String to a TimeWithZone in the current zone if Time.zone or Time.zone_default is set, otherwise converts String to a Time via String#to_time

    +
    @@ -1075,15 +968,10 @@

    -

    - - indent(amount, indent_string = nil, indent_empty_lines = false) - -

    +

    indent(amount, indent_string = nil, indent_empty_lines = false)

    - -
    -

    Indents the lines in the receiver:

    +
    +

    Indents the lines in the receiver:

    <<EOS.indent(2)
     def some_method
    @@ -1110,8 +998,7 @@ 

    "foo\n\nbar".indent(2)            # => "  foo\n\n  bar"
     "foo\n\nbar".indent(2, nil, true) # => "  foo\n  \n  bar"
     
    -

    - +
    @@ -1136,19 +1023,13 @@

    -

    - - indent!(amount, indent_string = nil, indent_empty_lines = false) - -

    +

    indent!(amount, indent_string = nil, indent_empty_lines = false)

    - -
    -

    Same as indent, except it indents the receiver in-place.

    +
    +

    Same as indent, except it indents the receiver in-place.

    Returns the indented string, or nil if there was nothing to indent.

    -
    - +
    @@ -1175,22 +1056,16 @@

    -

    - - inquiry() - -

    +

    inquiry()

    - -
    -

    Wraps the current string in the ActiveSupport::StringInquirer class, which gives you a prettier way to test for equality.

    +
    +

    Wraps the current string in the ActiveSupport::StringInquirer class, which gives you a prettier way to test for equality.

    env = 'production'.inquiry
     env.production?  # => true
     env.development? # => false
     
    -
    - +
    @@ -1215,15 +1090,10 @@

    -

    - - is_utf8?() - -

    +

    is_utf8?()

    - -
    -

    Returns true if string has utf_8 encoding.

    +
    +

    Returns true if string has utf_8 encoding.

    utf_8_str = "some string".encode "UTF-8"
     iso_str = "some string".encode "ISO-8859-1"
    @@ -1231,8 +1101,7 @@ 

    utf_8_str.is_utf8? # => true iso_str.is_utf8? # => false

    -
    - +
    @@ -1264,15 +1133,10 @@

    -

    - - last(limit = 1) - -

    +

    last(limit = 1)

    - -
    -

    Returns the last character of the string. If a limit is supplied, returns a substring from the end of the string until it reaches the limit value (counting backwards). If the given limit is greater than or equal to the string length, returns a copy of self.

    +
    +

    Returns the last character of the string. If a limit is supplied, returns a substring from the end of the string until it reaches the limit value (counting backwards). If the given limit is greater than or equal to the string length, returns a copy of self.

    str = "hello"
     str.last    # => "o"
    @@ -1281,8 +1145,7 @@ 

    str.last(0) # => "" str.last(6) # => "hello"

    -
    - +
    @@ -1307,15 +1170,10 @@

    -

    - - mb_chars() - -

    +

    mb_chars()

    - -
    -

    Multibyte proxy

    +
    +

    Multibyte proxy

    mb_chars is a multibyte safe proxy for string methods.

    @@ -1343,8 +1201,7 @@

    Interoperabi

    The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between String and Char work like expected. The bang! methods change the internal string representation in the Chars object. Interoperability problems can be resolved easily with a to_s call.

    For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For information about how to change the default Multibyte behavior see ActiveSupport::Multibyte.

    -

    - +
    @@ -1378,15 +1235,10 @@

    Interoperabi

    -

    - - parameterize(separator: "-", preserve_case: false, locale: nil) - -

    +

    parameterize(separator: "-", preserve_case: false, locale: nil)

    - -
    -

    Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.

    +
    +

    Replaces special characters in a string so that it may be used as part of a ‘pretty’ URL.

    If the optional parameter locale is specified, the word will be parameterized as a word of that language. By default, this parameter is set to nil and it will use the configured I18n.locale.

    @@ -1419,8 +1271,7 @@

    See ActiveSupport::Inflector.parameterize.

    -

    - +
    @@ -1445,15 +1296,10 @@

    -

    - - pluralize(count = nil, locale = :en) - -

    +

    pluralize(count = nil, locale = :en)

    - -
    -

    Returns the plural form of the word in the string.

    +
    +

    Returns the plural form of the word in the string.

    If the optional parameter count is specified, the singular form will be returned if count == 1. For any other value of count the plural will be returned.

    @@ -1472,8 +1318,7 @@

    See ActiveSupport::Inflector.pluralize.

    -

    - +
    @@ -1503,23 +1348,17 @@

    -

    - - remove(*patterns) - -

    +

    remove(*patterns)

    - -
    -

    Returns a new string with all occurrences of the patterns removed.

    +
    +

    Returns a new string with all occurrences of the patterns removed.

    str = "foo bar test"
     str.remove(" test")                 # => "foo bar"
     str.remove(" test", /bar/)          # => "foo "
     str                                 # => "foo bar test"
     
    -
    - +
    @@ -1544,22 +1383,16 @@

    -

    - - remove!(*patterns) - -

    +

    remove!(*patterns)

    - -
    -

    Alters the string by removing all occurrences of the patterns.

    +
    +

    Alters the string by removing all occurrences of the patterns.

    str = "foo bar test"
     str.remove!(" test", /bar/)         # => "foo "
     str                                 # => "foo "
     
    -
    - +
    @@ -1588,15 +1421,10 @@

    -

    - - safe_constantize() - -

    +

    safe_constantize()

    - -
    -

    safe_constantize tries to find a declared constant with the name specified in the string. It returns nil when the name is not in CamelCase or is not initialized.

    +
    +

    safe_constantize tries to find a declared constant with the name specified in the string. It returns nil when the name is not in CamelCase or is not initialized.

    'Module'.safe_constantize  # => Module
     'Class'.safe_constantize   # => Class
    @@ -1604,8 +1432,7 @@ 

    See ActiveSupport::Inflector.safe_constantize.

    -
    - +
    @@ -1630,15 +1457,10 @@

    -

    - - singularize(locale = :en) - -

    +

    singularize(locale = :en)

    - -
    -

    The reverse of pluralize, returns the singular form of a word in a string.

    +
    +

    The reverse of pluralize, returns the singular form of a word in a string.

    If the optional parameter locale is specified, the word will be singularized as a word of that language. By default, this parameter is set to :en. You must define your own inflection rules for languages other than English.

    @@ -1652,8 +1474,7 @@

    See ActiveSupport::Inflector.singularize.

    -

    - +
    @@ -1678,15 +1499,10 @@

    -

    - - squish() - -

    +

    squish()

    - -
    -

    Returns the string, first removing all whitespace on both ends of the string, and then changing remaining consecutive whitespace groups into one space each.

    +
    +

    Returns the string, first removing all whitespace on both ends of the string, and then changing remaining consecutive whitespace groups into one space each.

    Note that it handles both ASCII and Unicode whitespace.

    @@ -1694,8 +1510,7 @@

    string }.squish # => "Multi-line string" " foo bar \n \t boo".squish # => "foo bar boo" -

    - +
    @@ -1720,22 +1535,16 @@

    -

    - - squish!() - -

    +

    squish!()

    - -
    -

    Performs a destructive squish. See String#squish.

    +
    +

    Performs a destructive squish. See String#squish.

    str = " foo   bar    \n   \t   boo"
     str.squish!                         # => "foo bar boo"
     str                                 # => "foo bar boo"
     
    -
    - +
    @@ -1762,15 +1571,10 @@

    -

    - - strip_heredoc() - -

    +

    strip_heredoc()

    - -
    -

    Strips indentation in heredocs.

    +
    +

    Strips indentation in heredocs.

    For example in

    @@ -1788,8 +1592,7 @@

    the user would see the usage message aligned against the left margin.

    Technically, it looks for the least indented non-empty line in the whole string, and removes that amount of leading whitespace.

    -

    - +
    @@ -1816,15 +1619,10 @@

    -

    - - tableize() - -

    +

    tableize()

    - -
    -

    Creates the name of a table like Rails does for models to table names. This method uses the pluralize method on the last word in the string.

    +
    +

    Creates the name of a table like Rails does for models to table names. This method uses the pluralize method on the last word in the string.

    'RawScaledScorer'.tableize # => "raw_scaled_scorers"
     'ham_and_egg'.tableize     # => "ham_and_eggs"
    @@ -1832,8 +1630,7 @@ 

    See ActiveSupport::Inflector.tableize.

    -
    - +
    @@ -1858,24 +1655,17 @@

    -

    - - titlecase(keep_id_suffix: false) - -

    +

    titlecase(keep_id_suffix: false)

    -
    - -
    - -
    - Alias for: titleize -
    +

    + Alias for: + titleize. +

    @@ -1883,15 +1673,10 @@

    -

    - - titleize(keep_id_suffix: false) - -

    +

    titleize(keep_id_suffix: false)

    - -
    -

    Capitalizes all the words and replaces some characters in the string to create a nicer looking title. titleize is meant for creating pretty output. It is not used in the Rails internals.

    +
    +

    Capitalizes all the words and replaces some characters in the string to create a nicer looking title. titleize is meant for creating pretty output. It is not used in the Rails internals.

    The trailing ‘_id’,‘Id’.. can be kept and capitalized by setting the optional parameter keep_id_suffix to true. By default, this parameter is false.

    @@ -1901,13 +1686,14 @@

    See ActiveSupport::Inflector.titleize.

    -

    - +
    -
    - Also aliased as: titlecase -
    +

    + Also aliased as: + + titlecase. +

    @@ -1931,15 +1717,10 @@

    -

    - - to(position) - -

    +

    to(position)

    - -
    -

    Returns a substring from the beginning of the string to the given position. If the position is negative, it is counted from the end of the string.

    +
    +

    Returns a substring from the beginning of the string to the given position. If the position is negative, it is counted from the end of the string.

    str = "hello"
     str.to(0)  # => "h"
    @@ -1953,8 +1734,7 @@ 

    str.from(0).to(-1) # => "hello" str.from(1).to(-2) # => "ell"

    -
    - +
    @@ -1980,23 +1760,17 @@

    -

    - - to_date() - -

    +

    to_date()

    - -
    -

    Converts a string to a Date value.

    +
    +

    Converts a string to a Date value.

    "1-1-2012".to_date   # => Sun, 01 Jan 2012
     "01/01/2012".to_date # => Sun, 01 Jan 2012
     "2012-12-13".to_date # => Thu, 13 Dec 2012
     "12/13/2012".to_date # => ArgumentError: invalid date
     
    -
    - +
    @@ -2021,23 +1795,17 @@

    -

    - - to_datetime() - -

    +

    to_datetime()

    - -
    -

    Converts a string to a DateTime value.

    +
    +

    Converts a string to a DateTime value.

    "1-1-2012".to_datetime            # => Sun, 01 Jan 2012 00:00:00 +0000
     "01/01/2012 23:59:59".to_datetime # => Sun, 01 Jan 2012 23:59:59 +0000
     "2012-12-13 12:50".to_datetime    # => Thu, 13 Dec 2012 12:50:00 +0000
     "12/13/2012".to_datetime          # => ArgumentError: invalid date
     
    -
    - +
    @@ -2062,15 +1830,10 @@

    -

    - - to_time(form = :local) - -

    +

    to_time(form = :local)

    - -
    -

    Converts a string to a Time value. The form can be either :utc or :local (default :local).

    +
    +

    Converts a string to a Time value. The form can be either :utc or :local (default :local).

    The time is parsed using Time.parse method. If form is :local, then the time is in the system timezone. If the date part is missing then the current date is used and if the time part is missing then it is assumed to be 00:00:00.

    @@ -2082,8 +1845,7 @@

    "12/13/2012".to_time # => ArgumentError: argument out of range "1604326192".to_time # => ArgumentError: argument out of range -

    - +
    @@ -2123,15 +1885,10 @@

    -

    - - truncate(truncate_to, options = {}) - -

    +

    truncate(truncate_to, options = {})

    - -
    -

    Truncates a given text to length truncate_to if text is longer than truncate_to:

    +
    +

    Truncates a given text to length truncate_to if text is longer than truncate_to:

    'Once upon a time in a world far far away'.truncate(27)
     # => "Once upon a time in a wo..."
    @@ -2154,8 +1911,7 @@ 

    'And they found that many people were sleeping better.'.truncate(4, omission: '... (continued)') # => "... (continued)"

    -
    - +
    @@ -2191,15 +1947,10 @@

    -

    - - truncate_bytes(truncate_to, omission: "…") - -

    +

    truncate_bytes(truncate_to, omission: "…")

    - -
    -

    Truncates text to at most truncate_to bytes in length without breaking string encoding by splitting multibyte characters or breaking grapheme clusters (“perceptual characters”) by truncating at combining characters.

    +
    +

    Truncates text to at most truncate_to bytes in length without breaking string encoding by splitting multibyte characters or breaking grapheme clusters (“perceptual characters”) by truncating at combining characters.

    >> "🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪🔪".size
     # => 20
    @@ -2212,8 +1963,7 @@ 

    The truncated text ends with the :omission string, defaulting to “…”, for a total length not exceeding truncate_to.

    Raises ArgumentError when the bytesize of :omission exceeds truncate_to.

    -

    - +
    @@ -2261,15 +2011,10 @@

    -

    - - truncate_words(words_count, options = {}) - -

    +

    truncate_words(words_count, options = {})

    - -
    -

    Truncates a given text after a given number of words (words_count):

    +
    +

    Truncates a given text after a given number of words (words_count):

    'Once upon a time in a world far far away'.truncate_words(4)
     # => "Once upon a time..."
    @@ -2286,8 +2031,7 @@ 

    'And they found that many people were sleeping better.'.truncate_words(5, omission: '... (continued)')
     # => "And they found that many... (continued)"
     
    -

    - +
    @@ -2318,15 +2062,10 @@

    -

    - - underscore() - -

    +

    underscore()

    - -
    -

    The reverse of camelize. Makes an underscored, lowercase form from the expression in the string.

    +
    +

    The reverse of camelize. Makes an underscored, lowercase form from the expression in the string.

    underscore will also change ‘::’ to ‘/’ to convert namespaces to paths.

    @@ -2335,8 +2074,7 @@

    See ActiveSupport::Inflector.underscore.

    -

    - +
    @@ -2361,15 +2099,10 @@

    -

    - - upcase_first() - -

    +

    upcase_first()

    - -
    -

    Converts the first character to uppercase.

    +
    +

    Converts the first character to uppercase.

    'what a Lovely Day'.upcase_first # => "What a Lovely Day"
     'w'.upcase_first                 # => "W"
    @@ -2377,8 +2110,7 @@ 

    See ActiveSupport::Inflector.upcase_first.

    -
    - +
    diff --git a/src/classes/Time.html b/src/classes/Time.html index 373a654877..1973a99864 100644 --- a/src/classes/Time.html +++ b/src/classes/Time.html @@ -404,17 +404,11 @@

    Attributes

    Class Public methods

    -

    - - ===(other) - -

    +

    ===(other)

    - -
    -

    Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances

    -
    - +
    +

    Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances

    +
    @@ -439,28 +433,23 @@

    -

    - - at(time_or_number, *args) - -

    +

    at(time_or_number, *args)

    -
    - -
    - -
    - Also aliased as: at_without_coercion -
    +

    + Also aliased as: + + at_without_coercion. +

    -
    - Alias for: at_with_coercion -
    +

    + Alias for: + at_with_coercion. +

    @@ -468,22 +457,18 @@

    -

    - - at_with_coercion(time_or_number, *args) - -

    +

    at_with_coercion(time_or_number, *args)

    - -
    -

    Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime instances can be used when called with a single argument

    -
    - +
    +

    Layers additional behavior on Time.at so that ActiveSupport::TimeWithZone and DateTime instances can be used when called with a single argument

    +
    -
    - Also aliased as: at -
    +

    + Also aliased as: + + at. +

    @@ -517,24 +502,17 @@

    -

    - - at_without_coercion(time_or_number, *args) - -

    +

    at_without_coercion(time_or_number, *args)

    -
    - -
    - -
    - Alias for: at -
    +

    + Alias for: + at. +

    @@ -542,17 +520,11 @@

    -

    - - current() - -

    +

    current()

    - -
    -

    Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now.

    -
    - +
    +

    Returns Time.zone.now when Time.zone or config.time_zone are set, otherwise just returns Time.now.

    +
    @@ -577,17 +549,11 @@

    -

    - - days_in_month(month, year = current.year) - -

    +

    days_in_month(month, year = current.year)

    - -
    -

    Returns the number of days in the given month. If no year is specified, it will use the current year.

    -
    - +
    +

    Returns the number of days in the given month. If no year is specified, it will use the current year.

    +
    @@ -616,17 +582,11 @@

    -

    - - days_in_year(year = current.year) - -

    +

    days_in_year(year = current.year)

    - -
    -

    Returns the number of days in the given year. If no year is specified, it will use the current year.

    -
    - +
    +

    Returns the number of days in the given year. If no year is specified, it will use the current year.

    +
    @@ -651,21 +611,15 @@

    -

    - - find_zone(time_zone) - -

    +

    find_zone(time_zone)

    - -
    -

    Returns a TimeZone instance matching the time zone provided. Accepts the time zone in any format supported by Time.zone=. Returns nil for invalid time zones.

    +
    +

    Returns a TimeZone instance matching the time zone provided. Accepts the time zone in any format supported by Time.zone=. Returns nil for invalid time zones.

    Time.find_zone "America/New_York" # => #<ActiveSupport::TimeZone @name="America/New_York" ...>
     Time.find_zone "NOT-A-TIMEZONE"   # => nil
     
    -
    - +
    @@ -690,15 +644,10 @@

    -

    - - find_zone!(time_zone) - -

    +

    find_zone!(time_zone)

    - -
    -

    Returns a TimeZone instance matching the time zone provided. Accepts the time zone in any format supported by Time.zone=. Raises an ArgumentError for invalid time zones.

    +
    +

    Returns a TimeZone instance matching the time zone provided. Accepts the time zone in any format supported by Time.zone=. Raises an ArgumentError for invalid time zones.

    Time.find_zone! "America/New_York" # => #<ActiveSupport::TimeZone @name="America/New_York" ...>
     Time.find_zone! "EST"              # => #<ActiveSupport::TimeZone @name="EST" ...>
    @@ -707,8 +656,7 @@ 

    Time.find_zone! false # => false Time.find_zone! "NOT-A-TIMEZONE" # => ArgumentError: Invalid Timezone: NOT-A-TIMEZONE

    -
    - +
    @@ -735,15 +683,10 @@

    -

    - - rfc3339(str) - -

    +

    rfc3339(str)

    - -
    -

    Creates a Time instance from an RFC 3339 string.

    +
    +

    Creates a Time instance from an RFC 3339 string.

    Time.rfc3339('1999-12-31T14:00:00-10:00') # => 2000-01-01 00:00:00 -1000
     
    @@ -752,8 +695,7 @@

    Time.rfc3339('1999-12-31') # => ArgumentError: invalid date
     
    -

    - +
    @@ -790,15 +732,10 @@

    -

    - - use_zone(time_zone) - -

    +

    use_zone(time_zone)

    - -
    -

    Allows override of Time.zone locally inside supplied block; resets Time.zone to existing value when done.

    +
    +

    Allows override of Time.zone locally inside supplied block; resets Time.zone to existing value when done.

    class ApplicationController < ActionController::Base
       around_action :set_time_zone
    @@ -811,8 +748,7 @@ 

    NOTE: This won’t affect any ActiveSupport::TimeWithZone objects that have already been created, e.g. any model timestamp attributes that have been read before the block will remain in the application’s default timezone.

    -
    - +
    @@ -843,17 +779,11 @@

    -

    - - zone() - -

    +

    zone()

    - -
    -

    Returns the TimeZone for the current request, if this has been set (via Time.zone=). If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone.

    -
    - +
    +

    Returns the TimeZone for the current request, if this has been set (via Time.zone=). If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone.

    +
    @@ -878,15 +808,10 @@

    -

    - - zone=(time_zone) - -

    +

    zone=(time_zone)

    - -
    -

    Sets Time.zone to a TimeZone object for the current request/thread.

    +
    +

    Sets Time.zone to a TimeZone object for the current request/thread.

    This method accepts any of the following:

    • @@ -913,8 +838,7 @@

      end end -

    - +
    @@ -943,28 +867,23 @@

    Instance Public methods

    -

    - - -(other) - -

    +

    -(other)

    -
    - -
    - - +

    + Also aliased as: + + minus_without_duration, minus_without_coercion. +

    -
    - Alias for: minus_with_coercion -
    +

    + Alias for: + minus_with_coercion. +

    @@ -972,28 +891,23 @@

    -

    - - <=>(other) - -

    +

    <=>(other)

    -
    - -
    - -
    - Also aliased as: compare_without_coercion -
    +

    + Also aliased as: + + compare_without_coercion. +

    -
    - Alias for: compare_with_coercion -
    +

    + Alias for: + compare_with_coercion. +

    @@ -1001,17 +915,11 @@

    -

    - - acts_like_time?() - -

    +

    acts_like_time?()

    - -
    -

    Duck-types as a Time-like class. See Object#acts_like?.

    -
    - +
    +

    Duck-types as a Time-like class. See Object#acts_like?.

    +
    @@ -1036,15 +944,10 @@

    -

    - - advance(options) - -

    +

    advance(options)

    - -
    -

    Uses Date to provide precise Time calculations for years, months, and days according to the proleptic Gregorian calendar. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.

    +
    +

    Uses Date to provide precise Time calculations for years, months, and days according to the proleptic Gregorian calendar. The options parameter takes a hash with any of these keys: :years, :months, :weeks, :days, :hours, :minutes, :seconds.

    Time.new(2015, 8, 1, 14, 35, 0).advance(seconds: 1) # => 2015-08-01 14:35:01 -0700
     Time.new(2015, 8, 1, 14, 35, 0).advance(minutes: 1) # => 2015-08-01 14:36:00 -0700
    @@ -1054,8 +957,7 @@ 

    Just like Date#advance, increments are applied in order of time units from largest to smallest. This order can affect the result around the end of a month.

    -
    - +
    @@ -1101,17 +1003,11 @@

    -

    - - ago(seconds) - -

    +

    ago(seconds)

    - -
    -

    Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension

    -
    - +
    +

    Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension

    +
    @@ -1136,24 +1032,17 @@

    -

    - - at_beginning_of_day() - -

    +

    at_beginning_of_day()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -1161,24 +1050,17 @@

    -

    - - at_beginning_of_hour() - -

    +

    at_beginning_of_hour()

    -
    - -
    - -
    - Alias for: beginning_of_hour -
    +

    + Alias for: + beginning_of_hour. +

    @@ -1186,24 +1068,17 @@

    -

    - - at_beginning_of_minute() - -

    +

    at_beginning_of_minute()

    -
    - -
    - -
    - Alias for: beginning_of_minute -
    +

    + Alias for: + beginning_of_minute. +

    @@ -1211,24 +1086,17 @@

    -

    - - at_end_of_day() - -

    +

    at_end_of_day()

    -
    - -
    - -
    - Alias for: end_of_day -
    +

    + Alias for: + end_of_day. +

    @@ -1236,24 +1104,17 @@

    -

    - - at_end_of_hour() - -

    +

    at_end_of_hour()

    -
    - -
    - -
    - Alias for: end_of_hour -
    +

    + Alias for: + end_of_hour. +

    @@ -1261,24 +1122,17 @@

    -

    - - at_end_of_minute() - -

    +

    at_end_of_minute()

    -
    - -
    - -
    - Alias for: end_of_minute -
    +

    + Alias for: + end_of_minute. +

    @@ -1286,24 +1140,17 @@

    -

    - - at_midday() - -

    +

    at_midday()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1311,24 +1158,17 @@

    -

    - - at_middle_of_day() - -

    +

    at_middle_of_day()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1336,24 +1176,17 @@

    -

    - - at_midnight() - -

    +

    at_midnight()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -1361,24 +1194,17 @@

    -

    - - at_noon() - -

    +

    at_noon()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1386,22 +1212,18 @@

    -

    - - beginning_of_day() - -

    +

    beginning_of_day()

    - -
    -

    Returns a new Time representing the start of the day (0:00)

    -
    - +
    +

    Returns a new Time representing the start of the day (0:00)

    +
    -
    - Also aliased as: midnight, at_midnight, at_beginning_of_day -
    +

    + Also aliased as: + + midnight, at_midnight, at_beginning_of_day. +

    @@ -1425,22 +1247,18 @@

    -

    - - beginning_of_hour() - -

    +

    beginning_of_hour()

    - -
    -

    Returns a new Time representing the start of the hour (x:00)

    -
    - +
    +

    Returns a new Time representing the start of the hour (x:00)

    +
    -
    - Also aliased as: at_beginning_of_hour -
    +

    + Also aliased as: + + at_beginning_of_hour. +

    @@ -1464,22 +1282,18 @@

    -

    - - beginning_of_minute() - -

    +

    beginning_of_minute()

    - -
    -

    Returns a new Time representing the start of the minute (x:xx:00)

    -
    - +
    +

    Returns a new Time representing the start of the minute (x:xx:00)

    +
    -
    - Also aliased as: at_beginning_of_minute -
    +

    + Also aliased as: + + at_beginning_of_minute. +

    @@ -1503,22 +1317,16 @@

    -

    - - change(options) - -

    +

    change(options)

    - -
    -

    Returns a new Time where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec, :usec, :nsec) reset cascadingly, so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour and minute is passed, then sec, usec, and nsec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :usec, :nsec, :offset. Pass either :usec or :nsec, not both.

    +
    +

    Returns a new Time where one or more of the elements have been changed according to the options parameter. The time options (:hour, :min, :sec, :usec, :nsec) reset cascadingly, so if only the hour is passed, then minute, sec, usec, and nsec is set to 0. If the hour and minute is passed, then sec, usec, and nsec is set to 0. The options parameter takes a hash with any of these keys: :year, :month, :day, :hour, :min, :sec, :usec, :nsec, :offset. Pass either :usec or :nsec, not both.

    Time.new(2012, 8, 29, 22, 35, 0).change(day: 1)              # => Time.new(2012, 8, 1, 22, 35, 0)
     Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, day: 1)  # => Time.new(1981, 8, 1, 22, 35, 0)
     Time.new(2012, 8, 29, 22, 35, 0).change(year: 1981, hour: 0) # => Time.new(1981, 8, 29, 0, 0, 0)
     
    -
    - +
    @@ -1595,22 +1403,18 @@

    -

    - - compare_with_coercion(other) - -

    +

    compare_with_coercion(other)

    - -
    -

    Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared with a Time

    -
    - +
    +

    Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared with a Time

    +
    -
    - Also aliased as: <=> -
    +

    + Also aliased as: + + <=>. +

    @@ -1646,24 +1450,17 @@

    -

    - - compare_without_coercion(other) - -

    +

    compare_without_coercion(other)

    -
    - -
    - -
    - Alias for: <=> -
    +

    + Alias for: + <=>. +

    @@ -1671,22 +1468,18 @@

    -

    - - end_of_day() - -

    +

    end_of_day()

    - -
    -

    Returns a new Time representing the end of the day, 23:59:59.999999

    -
    - +
    +

    Returns a new Time representing the end of the day, 23:59:59.999999

    +
    -
    - Also aliased as: at_end_of_day -
    +

    + Also aliased as: + + at_end_of_day. +

    @@ -1715,22 +1508,18 @@

    -

    - - end_of_hour() - -

    +

    end_of_hour()

    - -
    -

    Returns a new Time representing the end of the hour, x:59:59.999999

    -
    - +
    +

    Returns a new Time representing the end of the hour, x:59:59.999999

    +
    -
    - Also aliased as: at_end_of_hour -
    +

    + Also aliased as: + + at_end_of_hour. +

    @@ -1758,22 +1547,18 @@

    -

    - - end_of_minute() - -

    +

    end_of_minute()

    - -
    -

    Returns a new Time representing the end of the minute, x:xx:59.999999

    -
    - +
    +

    Returns a new Time representing the end of the minute, x:xx:59.999999

    +
    -
    - Also aliased as: at_end_of_minute -
    +

    + Also aliased as: + + at_end_of_minute. +

    @@ -1800,28 +1585,23 @@

    -

    - - eql?(other) - -

    +

    eql?(other)

    -
    - -
    - -
    - Also aliased as: eql_without_coercion -
    +

    + Also aliased as: + + eql_without_coercion. +

    -
    - Alias for: eql_with_coercion -
    +

    + Alias for: + eql_with_coercion. +

    @@ -1829,22 +1609,18 @@

    -

    - - eql_with_coercion(other) - -

    +

    eql_with_coercion(other)

    - -
    -

    Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances can be eql? to an equivalent Time

    -
    - +
    +

    Layers additional behavior on Time#eql? so that ActiveSupport::TimeWithZone instances can be eql? to an equivalent Time

    +
    -
    - Also aliased as: eql? -
    +

    + Also aliased as: + + eql?. +

    @@ -1870,24 +1646,17 @@

    -

    - - eql_without_coercion(other) - -

    +

    eql_without_coercion(other)

    -
    - -
    - -
    - Alias for: eql? -
    +

    + Alias for: + eql?. +

    @@ -1895,21 +1664,15 @@

    -

    - - formatted_offset(colon = true, alternate_utc_string = nil) - -

    +

    formatted_offset(colon = true, alternate_utc_string = nil)

    - -
    -

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    +
    +

    Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC.

    Time.local(2000).formatted_offset        # => "-06:00"
     Time.local(2000).formatted_offset(false) # => "-0600"
     
    -
    - +
    @@ -1934,24 +1697,17 @@

    -

    - - in(seconds) - -

    +

    in(seconds)

    -
    - -
    - -
    - Alias for: since -
    +

    + Alias for: + since. +

    @@ -1959,24 +1715,17 @@

    -

    - - midday() - -

    +

    midday()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -1984,22 +1733,18 @@

    -

    - - middle_of_day() - -

    +

    middle_of_day()

    - -
    -

    Returns a new Time representing the middle of the day (12:00)

    -
    - +
    +

    Returns a new Time representing the middle of the day (12:00)

    +
    -
    - Also aliased as: midday, noon, at_midday, at_noon, at_middle_of_day -
    +

    + Also aliased as: + + midday, noon, at_midday, at_noon, at_middle_of_day. +

    @@ -2023,24 +1768,17 @@

    -

    - - midnight() - -

    +

    midnight()

    -
    - -
    - -
    - Alias for: beginning_of_day -
    +

    + Alias for: + beginning_of_day. +

    @@ -2048,22 +1786,18 @@

    -

    - - minus_with_coercion(other) - -

    +

    minus_with_coercion(other)

    - -
    -

    Time#- can also be used to determine the number of seconds between two Time instances. We’re layering on additional behavior so that ActiveSupport::TimeWithZone instances are coerced into values that Time#- will recognize

    -
    - +
    +

    Time#- can also be used to determine the number of seconds between two Time instances. We’re layering on additional behavior so that ActiveSupport::TimeWithZone instances are coerced into values that Time#- will recognize

    +
    -
    - Also aliased as: - -
    +

    + Also aliased as: + + -. +

    @@ -2088,24 +1822,17 @@

    -

    - - minus_without_coercion(other) - -

    +

    minus_without_coercion(other)

    -
    - -
    - -
    - Alias for: - -
    +

    + Alias for: + -. +

    @@ -2113,24 +1840,17 @@

    -

    - - minus_without_duration(other) - -

    +

    minus_without_duration(other)

    -
    - -
    - -
    - Alias for: - -
    +

    + Alias for: + -. +

    @@ -2138,17 +1858,11 @@

    -

    - - next_day(days = 1) - -

    +

    next_day(days = 1)

    - -
    -

    Returns a new time the specified number of days in the future.

    -
    - +
    +

    Returns a new time the specified number of days in the future.

    +
    @@ -2173,17 +1887,11 @@

    -

    - - next_month(months = 1) - -

    +

    next_month(months = 1)

    - -
    -

    Returns a new time the specified number of months in the future.

    -
    - +
    +

    Returns a new time the specified number of months in the future.

    +
    @@ -2208,17 +1916,11 @@

    -

    - - next_year(years = 1) - -

    +

    next_year(years = 1)

    - -
    -

    Returns a new time the specified number of years in the future.

    -
    - +
    +

    Returns a new time the specified number of years in the future.

    +
    @@ -2243,24 +1945,17 @@

    -

    - - noon() - -

    +

    noon()

    -
    - -
    - -
    - Alias for: middle_of_day -
    +

    + Alias for: + middle_of_day. +

    @@ -2268,17 +1963,11 @@

    -

    - - prev_day(days = 1) - -

    +

    prev_day(days = 1)

    - -
    -

    Returns a new time the specified number of days ago.

    -
    - +
    +

    Returns a new time the specified number of days ago.

    +
    @@ -2303,17 +1992,11 @@

    -

    - - prev_month(months = 1) - -

    +

    prev_month(months = 1)

    - -
    -

    Returns a new time the specified number of months ago.

    -
    - +
    +

    Returns a new time the specified number of months ago.

    +
    @@ -2338,17 +2021,11 @@

    -

    - - prev_year(years = 1) - -

    +

    prev_year(years = 1)

    - -
    -

    Returns a new time the specified number of years ago.

    -
    - +
    +

    Returns a new time the specified number of years ago.

    +
    @@ -2373,20 +2050,14 @@

    -

    - - sec_fraction() - -

    +

    sec_fraction()

    - -
    -

    Returns the fraction of a second as a Rational

    +
    +

    Returns the fraction of a second as a Rational

    Time.new(2012, 8, 29, 0, 0, 0.5).sec_fraction # => (1/2)
     
    -
    - +
    @@ -2411,22 +2082,16 @@

    -

    - - seconds_since_midnight() - -

    +

    seconds_since_midnight()

    - -
    -

    Returns the number of seconds since 00:00:00.

    +
    +

    Returns the number of seconds since 00:00:00.

    Time.new(2012, 8, 29,  0,  0,  0).seconds_since_midnight # => 0.0
     Time.new(2012, 8, 29, 12, 34, 56).seconds_since_midnight # => 45296.0
     Time.new(2012, 8, 29, 23, 59, 59).seconds_since_midnight # => 86399.0
     
    -
    - +
    @@ -2451,22 +2116,16 @@

    -

    - - seconds_until_end_of_day() - -

    +

    seconds_until_end_of_day()

    - -
    -

    Returns the number of seconds until 23:59:59.

    +
    +

    Returns the number of seconds until 23:59:59.

    Time.new(2012, 8, 29,  0,  0,  0).seconds_until_end_of_day # => 86399
     Time.new(2012, 8, 29, 12, 34, 56).seconds_until_end_of_day # => 41103
     Time.new(2012, 8, 29, 23, 59, 59).seconds_until_end_of_day # => 0
     
    -
    - +
    @@ -2491,22 +2150,18 @@

    -

    - - since(seconds) - -

    +

    since(seconds)

    - -
    -

    Returns a new Time representing the time a number of seconds since the instance time

    -
    - +
    +

    Returns a new Time representing the time a number of seconds since the instance time

    +
    -
    - Also aliased as: in -
    +

    + Also aliased as: + + in. +

    @@ -2530,24 +2185,17 @@

    -

    - - to_formatted_s(format = :default) - -

    +

    to_formatted_s(format = :default)

    -
    - -
    - -
    - Alias for: to_fs -
    +

    + Alias for: + to_fs. +

    @@ -2555,15 +2203,10 @@

    -

    - - to_fs(format = :default) - -

    +

    to_fs(format = :default)

    - -
    -

    Converts to a formatted string. See DATE_FORMATS for built-in formats.

    +
    +

    Converts to a formatted string. See DATE_FORMATS for built-in formats.

    This method is aliased to to_formatted_s.

    @@ -2590,13 +2233,14 @@

    Adding your Time::DATE_FORMATS[:month_and_year] = '%B %Y' Time::DATE_FORMATS[:short_ordinal] = ->(time) { time.strftime("%B #{time.day.ordinalize}") } -

    - +
    -
    - Also aliased as: to_formatted_s -
    +

    + Also aliased as: + + to_formatted_s. +

    @@ -2624,17 +2268,11 @@

    Adding your

    -

    - - to_time() - -

    +

    to_time()

    - -
    -

    Return self.

    -
    - +
    +

    Return self.

    +
    diff --git a/src/classes/TrueClass.html b/src/classes/TrueClass.html index 26df2ef3fe..2c66b7d84b 100644 --- a/src/classes/TrueClass.html +++ b/src/classes/TrueClass.html @@ -72,22 +72,16 @@

    Methods

    Instance Public methods

    -

    - - blank?() - -

    +

    blank?()

    - -
    -

    true is not blank:

    +
    +

    true is not blank:

    true.blank? # => false
     

    @return [false]

    -
    - +
    @@ -112,17 +106,11 @@

    -

    - - to_param() - -

    +

    to_param()

    - -
    -

    Returns self.

    -
    - +
    +

    Returns self.

    +
    diff --git a/src/classes/UnboundMethod.html b/src/classes/UnboundMethod.html index c4bd30e47d..200e023030 100644 --- a/src/classes/UnboundMethod.html +++ b/src/classes/UnboundMethod.html @@ -64,21 +64,15 @@

    Methods

    Instance Public methods

    -

    - - duplicable?() - -

    +

    duplicable?()

    - -
    -

    Unbound methods are not duplicable:

    +
    +

    Unbound methods are not duplicable:

    method(:puts).unbind.duplicable? # => false
     method(:puts).unbind.dup         # => TypeError: allocator undefined for UnboundMethod
     
    -
    - +