remove unneeded test model for ActiveModel test cases.
Remove @state.parent assignment on commit

This piece of code was introduced on
67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
Get request should not write to database note added. [skip ci]
Merge pull request #16329 from deependersingla/master

GET request should not write to database note added. [ci skip]
:nail_care: from #16329 [ci skip]
eval_block should be private
only ask for the routes module once

we can cache the module on the stack, then reuse it
pass the module to define_named_route_methods

after this, we can disconnect @module from the instance
helpers should be a Set so it doesn't grow unbounded

since helpers is a set, we can be confident about when to remove methods
from the module.
ask the named routes collection if the route is defined

we should not be accessing internals to figure out if a method is
defined.
oops! :bomb:

use helpers.include? so we don't get any false positives
Merge pull request #16335 from arthurnn/rm_parent_state_trasaction

Remove @state.parent assignment on commit
Add implicit receiver support to `Object#with_options`
Merge pull request #16339 from rwz/with_options_implicit

Add implicit receiver support to `Object#with_options`
Merge pull request #15959 from aditya-kapoor/remove-unneeded-cases

remove unneeded test model for ActiveModel test cases.
fix nested `has many :through` associations on unpersisted instances

If we have
```
class Post < ActiveRecord::Base
  has_many :books, through: :author
  has_many :subscriptions, through: :books
end

class Author < ActiveRecord::Base
  has_one :post
  has_many :books
  has_many :subscriptions, through: :books
end

class Book < ActiveRecord::Base
  belongs_to :author
  has_many :subscriptions
end

class Subscription < ActiveRecord::Base
  belongs_to :book
end
```

then if `post` is not persisted, e.g `post = Post.new`, then
`post.subscriptions` will be empty no matter what.

In contrast if `post` is persisted,
e.g if `post = Post.create!` then `post.subscriptions` works as
expected.

This property could be considered even more unusual since
associations in general, work on records that are not persisted.

e.g if
```
class Post < ActiveRecord::Base
  has_many :subscriptions, through: :author
end
```

then `post.subscriptions` works as expected in all of the
above cases.