diff --git a/Rakefile b/Rakefile index 7065d7b4ed..3b1c403106 100644 --- a/Rakefile +++ b/Rakefile @@ -53,6 +53,7 @@ end def switch_rails(version) cd 'rails' do + sh 'git fetch' sh 'git reset --hard' sh "git switch refs/tags/v#{version} -C v#{version}" end diff --git a/_config.yml b/_config.yml index 1936801e71..20618391b8 100644 --- a/_config.yml +++ b/_config.yml @@ -2,11 +2,13 @@ title: RailsDoc(β) description: Ruby on Rails API Documentation. url: https://railsdoc.github.io source: src -default_rails_version: '7.1.3' +default_rails_version: "7.2.0.beta2" rails_versions: + "7.2": + specific_version: "7.2.0.beta2" + latest: true "7.1": specific_version: "7.1.3" - latest: true "7.0": specific_version: "7.0.8" "6.1": diff --git a/rails b/rails index 36c1591bcb..b752c38e81 160000 --- a/rails +++ b/rails @@ -1 +1 @@ -Subproject commit 36c1591bcb5e0ee3084759c7f42a706fe5bb7ca7 +Subproject commit b752c38e81a310c1aaca78c7cdd1784009ea189a diff --git a/src/classes/AbstractController.html b/src/classes/AbstractController.html index 4caac17ce2..9b29e71050 100644 --- a/src/classes/AbstractController.html +++ b/src/classes/AbstractController.html @@ -5,7 +5,7 @@
+ +
+

+ + proxy_association() + +

+ + +
+

Returns the association object for the collection.

+ +
class Person < ActiveRecord::Base
+  has_many :pets
+end
+
+person.pets.proxy_association
+# => #<ActiveRecord::Associations::HasManyAssociation owner="#<Person:0x00>">
+
+ +

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.

+
+ + + + + + + + +
+ + 📝 Source code + + +
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 944
+      def proxy_association
+        @association
+      end
+ + 🔎 See on GitHub
@@ -1874,13 +1925,13 @@

📝 Source code -
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1072
+              
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1085
       def reload
         proxy_association.reload(true)
         reset_scope
       end
- 🔎 See on GitHub + 🔎 See on GitHub @@ -1936,7 +1987,7 @@

@association.replace(other_array) end

- 🔎 See on GitHub + 🔎 See on GitHub @@ -1982,14 +2033,14 @@

📝 Source code -
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1093
+              
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 1106
       def reset
         proxy_association.reset
         proxy_association.reset_scope
         reset_scope
       end
- 🔎 See on GitHub + 🔎 See on GitHub @@ -2019,12 +2070,12 @@

📝 Source code -
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 936
+              
# File activerecord/lib/active_record/associations/collection_proxy.rb, line 949
       def scope
         @scope ||= @association.scope
       end
- 🔎 See on GitHub + 🔎 See on GitHub @@ -2050,7 +2101,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub

@@ -2074,7 +2125,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub

@@ -2141,7 +2192,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub @@ -2195,7 +2246,7 @@

@association.size end - 🔎 See on GitHub + 🔎 See on GitHub @@ -2255,7 +2306,7 @@

super end - 🔎 See on GitHub + 🔎 See on GitHub @@ -2290,7 +2341,7 @@

@association.target end - 🔎 See on GitHub + 🔎 See on GitHub @@ -2316,7 +2367,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub @@ -2340,7 +2391,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub diff --git a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html b/src/classes/ActiveRecord/Associations/NestedError.html similarity index 54% rename from src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html rename to src/classes/ActiveRecord/Associations/NestedError.html index 3e9ed99ec5..256e4e89ca 100644 --- a/src/classes/AbstractController/Helpers/DeprecatedMissingHelperError.html +++ b/src/classes/ActiveRecord/Associations/NestedError.html @@ -1,26 +1,26 @@ --- -title: AbstractController::Helpers::DeprecatedMissingHelperError +title: ActiveRecord::Associations::NestedError layout: default ---
@@ -65,7 +65,7 @@

Class Public methods

- new(error, path) + new(association, inner_error)

@@ -86,20 +86,15 @@

📝 Source code -
# File actionpack/lib/abstract_controller/helpers.rb, line 28
-      def initialize(error, path)
-        @error = error
-        @path  = "helpers/#{path}.rb"
-        set_backtrace error.backtrace
-
-        if /^#{path}(\.rb)?$/.match?(error.path)
-          super("Missing helper file helpers/%s.rb" % path)
-        else
-          raise error
-        end
+              
# File activerecord/lib/active_record/associations/nested_error.rb, line 8
+      def initialize(association, inner_error)
+        @base = association.owner
+        @association = association
+        @inner_error = inner_error
+        super(@base, inner_error, { attribute: compute_attribute(inner_error) })
       end
- 🔎 See on GitHub + 🔎 See on GitHub diff --git a/src/classes/ActiveRecord/AsynchronousQueryInsideTransactionError.html b/src/classes/ActiveRecord/AsynchronousQueryInsideTransactionError.html index 0b03db8c03..9f97b120f6 100644 --- a/src/classes/ActiveRecord/AsynchronousQueryInsideTransactionError.html +++ b/src/classes/ActiveRecord/AsynchronousQueryInsideTransactionError.html @@ -5,7 +5,7 @@
- 🔎 See on GitHub + 🔎 See on GitHub diff --git a/src/classes/ActiveRecord/AttributeMethods.html b/src/classes/ActiveRecord/AttributeMethods.html index 96f02b7cb3..f8d421b9a1 100644 --- a/src/classes/ActiveRecord/AttributeMethods.html +++ b/src/classes/ActiveRecord/AttributeMethods.html @@ -5,7 +5,7 @@
@@ -339,7 +339,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub

@@ -363,7 +363,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub

@@ -387,7 +387,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub

@@ -411,7 +411,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub @@ -435,7 +435,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub @@ -459,7 +459,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub @@ -483,7 +483,7 @@

- 🔎 See on GitHub + 🔎 See on GitHub diff --git a/src/classes/ActiveRecord/Coders.html b/src/classes/ActiveRecord/Coders.html index ffdae9ff2d..166d2d3bc0 100644 --- a/src/classes/ActiveRecord/Coders.html +++ b/src/classes/ActiveRecord/Coders.html @@ -5,7 +5,7 @@