| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Now that `Controller#status=` just delegates to the response object,
we don't need to set the response on the controller and the response.
We can just set it in one place.
|
|
|
|
| |
we always have a response object, so there is no reason to test it
|
|
|
|
| |
these ivars don't exist anymore, so we can remove them from the list
|
|
|
|
|
| |
since the controller always has a request on it, we can just ask the
request for the content type.
|
|
|
|
|
|
| |
The controller instance always has an instance of a response object. We
should store the status code on the response object so that it's only
store in one place.
|
|
|
|
|
| |
We always have a response object in controller instances, so we can
remove this conditional
|
|
|
|
|
| |
controller instances always have a response object, so we don't need to
test to see if there is one, just always call to_a on the response.
|
|\
| |
| | |
Removed duplicate requires
|
| | |
|
|\ \
| | |
| | | |
Use `ActiveRecord::Migration#connection` instead of `@connection`
|
| | |
| | |
| | |
| | |
| | | |
`ActiveRecord::Migration` has `connetion` method so replace to use
`connection` method to get `@connection` as much as possible
|
|\ \ \
| | | |
| | | | |
Fix the unused variable warning
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes the following warning.
```ruby
warning: assigned but unused variable - index_definition
```
|
|\ \ \
| |_|/
|/| | |
Fixed to_datetime docs [ci skip]
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Controllers should always have a request and response when responding.
Since we make this The Rule(tm), then controllers don't need to be
somewhere in limbo between "asking a response object for a rack
response" or "I, myself contain a rack response". This duality leads to
conditionals spread through the codebase that we can delete:
* https://github.com/rails/rails/blob/85a78d9358aa728298cd020cdc842b55c16f9549/actionpack/lib/action_controller/metal.rb#L221-L223
|
| | |
|
| | |
|
| |
| |
| |
| | |
collect the body and make assert against the collected body
|
| |
| |
| |
| |
| |
| | |
we don't need an instance to figure out what type of response to
allocate. Later we'll pull this up the stack and pass the response
object down
|
| |
| |
| |
| | |
This saves a lambda and request allocation on each request.
|
| |
| |
| |
| |
| | |
controllers should always go through the `action` class method so that
their middleware is respected.
|
| |
| |
| |
| |
| | |
now the caller can just treat it like a regular controller even though
it will return a 404
|
|\ \
| | |
| | | |
Removed mocha from Active Record Part 1
|
| | | |
|
|\ \ \
| | | |
| | | | |
Get rid of mocha tests in actionpack - part 2
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Initial implementation of ActiveJob AsyncAdapter.
|
| | | | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Added docs for TimeWithZone [ci skip]
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
discard xml Serialization documentation that is no longer available […
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove unused requires
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
They are already required in `actionpack/lib/action_dispatch.rb` (L25-L26)
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Remove more unused block arguments
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Make `assert_index` private
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This `protected` keyword looks like some leftover, since
we are not using explicit receiver, this should go under `private`
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Trim out least needed controllers from AP test suite
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Make `change_column_default` to work
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This is fix of #20018 which removes `change_column_default` from
array, so `CommandRecorder#method_missing` catches
`change_column_default` and @delegate's method is called.
This PR
* fix this bug
* define `ReversibleAndIrreversibleMethods` const making clear
which this array means to prevent these miss
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
remove unused require ‘set’
|
| | | | | | | | | |
|
| | | | | | | | | |
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* Fixtures are loaded for all the tests by default (not only model and
controller tests).
* Fix a few typos and improve the markup at some levels.
* Wrap changes to 80 chars
[ci skip]
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | | |
vrybas/rdoc-fix-typo-belongs-to-inverse-of-class-name
RDoc: fix wrong model name `:inverse_of` with `:belongs_to` [ci skip]
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
There's a typo in ActiveRecord associations RDocs.
Wrong `Taggable` model name, instead of `Tagging` in example of using
option `:inverse_of` with `:belongs_to` association.
Commit where typo was introduced:
https://github.com/rails/rails/commit/91fd6510563f84ee473bb217bc63ed598abe3f24#diff-39001423802a8470dba9c931e66e101eR11
First it appears in `activerecord/CHANGELOG` in example of `:inverse_of`
usage:
```ruby
class Post < ActiveRecord::Base
has_many :taggings
has_many :tags, :through => :taggings
end
class Tagging < ActiveRecord::Base
belongs_to :post
belongs_to :tag, :inverse_of => :tagging # :inverse_of must be set!
end
class Tag < ActiveRecord::Base
has_many :taggings
has_many :posts, :through => :taggings
end
post = Post.first
tag = post.tags.build :name => "ruby"
!> tag.save # will save a Taggable linking to the post
```
The last line should be
```ruby
tag.save # will save a Tagging linking to the post
```
The same typo appears in
`activerecord/lib/active_record/associations.rb`.
The association name is given as `:inverse_of => :taggings`, but class
name is `Taggable`.
```ruby
# @post = Post.first
# @tag = @post.tags.build :name => "ruby"
# @tag.save
#
!> # The last line ought to save the through record (a <tt>Taggable</tt>). This will only work if the
# <tt>:inverse_of</tt> is set:
#
!> # class Taggable < ActiveRecord::Base
# belongs_to :post
!> # belongs_to :tag, :inverse_of => :taggings
# end
```
This PR fixes model name.
|