| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
vngrs/remove_already_defined_methods_in_rack_request
Remove already defined methods in super class of ActionDispatch::Request class
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
These methods had defined in 2004 by dhh in initial commit and `ActionDispatch::Request`
class has been inherited from `Rack::Request` class in 2009 by josh.
In 2014 these methods and more of them defined in `Rack::Request` class
so we don't need them anymore in rails codebase.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove use of mocha from Active Model
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Avoid E constant clashing with Minitest defined version.
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Minitest sets an E constant to an empty string to save GC time.
This clashes with autoloading tests which define an E constant.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add Enumerable#pluck.
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
Allows fetching the same values from arrays as from ActiveRecord associations.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Fix the shadowing warning for `reflection`
|
|/ / / / / / |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is a usability change to fix a quirk from our definition of partial
writes. By default, we only persist changed attributes. When creating a
new record, this is assumed that the default values came from the
database. However, if the user provided a default, it will not be
persisted, since we didn't see it as "changed". Since this is a very
specific case, I wanted to isolate it with the other quirks that come
from user provided default values. The number of edge cases which are
presenting themselves are starting to make me wonder if we should just
remove the ability to assign a default, in favor of overriding
`initialize`. For the time being, this is required for the attributes
API to not have confusing behavior.
We had to delete one test, since this actually changes the meaning of
`.changed?` on Active Record models. It now specifically means
`changed_from_database?`. While I think this will make the attributes
API more ergonomic to use, it is a subtle change in definition (though
not a backwards incompatible one). We should probably figure out the
right place to document this. (Feel free to open a PR doing that if
you're reading this).
/cc @rafaelfranca @kirs @senny
This is an alternate implementation of #19921.
Close #19921.
[Sean Griffin & Kir Shatrov]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is a variant implementation of the changes proposed in #19914.
Unlike that PR, the change in behavior is isolated in its own class.
This is to prevent wonky behavior if a Proc is assigned outside of the
default, and it is a natural place to place the behavior required by #19921
as well.
Close #19914.
[Sean Griffin & Kir Shatrov]
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
config.static_index configures directory Index "index.html" filename
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Set `config.static_index` to serve a static directory index file not
named `index`. For example, to serve `main.html` instead of `index.html`
for directory requests, set `config.static_index` to `"main"`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove unused package tasks
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
We are using `all:build` now.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
removed erroneous line. Corrected presence validation example.
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Addresses #20343.
Removes erroneous line of code in the sample codeblock.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
[ci skip] Fix block parameter of assert_no_difference
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Deprecate `:nothing` option for render method
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
`head` method works similar to `render` method with `:nothing` option
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Give credit to extra contributor for Base.reload fix
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Properly append preload / includes args on Merger
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Couldn't find other way to get the association name from a given class
other than looping through `reflect_on_all_associations` reflections ..
Noticed this one while looking at this example:
```ruby
class Product < ActiveRecord::Base
has_many :variants
has_many :translations
end
class Translation < ActiveRecord::Base
belongs_to :product
end
class Variant < ActiveRecord::Base
belongs_to :product
end
class BugTest < Minitest::Test
def test_merge_stuff
product = Product.create! name: 'huhu'
variant = Variant.create! product_id: product.id
Translation.create! locale: 'en', product_id: product.id
product_relation = Product.all
.preload(:translations)
.joins(:translations)
.merge(Translation.where(locale: 'en'))
.where(name: 'huhu')
assert_equal variant, Variant.joins(:product).merge(product_relation).first
end
end
```
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Remove custom `lines` and use `/tools/line_statistics`
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
SQLite3: Add collation support for string and text columns
|
| | | | | | | | |
|
| | | | | | | | |
|
|/ / / / / / / |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add application/vnd.api+json alias to the JSON MIME Type.
|
| | |/ / / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Allow the use of symbols or strings to specify enum values in test fixtures
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Currently, values for columns backing Active Record enums must be
specified as integers in test fixtures:
awdr:
title: "Agile Web Development with Rails"
status: 2
rfr:
title: "Ruby for Rails"
status: <%= Book.statuses[:proposed] %>
This is potentially confusing, since enum values are typically
specified as symbols or strings in application code. To resolve the
confusion, this change permits the use of symbols or strings to specify
enum values:
awdr:
status: :published
It is compatible with fixtures that specify enum values as integers.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Cause ActiveRecord::Base::reload to also ignore the QueryCache.
|
| | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| |_|/ / / / / / /
|/| | | | | | | | |
If specify `strict: :default` explicitly, do not set sql_mode.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Related with #17370.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Changed mysqldump to include sprocs and functions
|
| | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
Fix rake method definition leaking onto Object
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
add framework_test
add another test
|
| | | | | | | | | | | |
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
This is a leftover of #19867
|
|\ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
[PoC] Stop shadowing parameters named `action`
|
| | | | | | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \ \ \
| | | | | | | | | | | | |
| | | | | | | | | | | | | |
Remove redundant 'Rails' from Rails::AppRailsLoader constant
|
| | | | | | | | | | | | | |
|