| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following Rails code failed (with a `KeyError` exception) under
test:
```ruby
class ApplicationController < ActionController::Base
def user_strategy
# At this point:
# ```ruby
# session == {
# "user_strategy"=>"email",
# "user_identifying_value"=>"hello@world.com"
# }
# ```
if session.key?(:user_strategy)
session.fetch(:user_strategy)
end
end
end
```
When I checked the session's keys (`session.keys`), I got an array of
strings. If I accessed `session[:user_strategy]` I got the expected
`'email'` value. However if I used `session.fetch(:user_strategy)` I
got a `KeyError` exception.
This appears to be a Rails 4.2.4 regression (as the code works under
Rails 4.2.3).
Closes #21383
|
|\
| |
| | |
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.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
[ci skip] Fix #21364 error in documentation about ActiveRecord::Enum
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
add missing test for action regexp for routing
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Remove unused block arguments
|
|/ / / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Remove unused block arguments
|
|/ / / / / / / / |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We have `caller_locations`, so we don't need to parse the strings in the
callstack.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We don't want to directly access the env hash
|