| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Some are loaded from Base which is loaded when a model inherits from it
and some others are used in rake tasks
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
On reflection, it seems like a bit of a weird method to have on
ActiveRecord::Base, and it shouldn't be needed most of the time anyway.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This was requested by DHH to allow creating of one's own custom
association macros.
For example:
module Commentable
def has_many_comments(extra)
has_many :comments, -> { where(:foo).merge(extra) }
end
end
class Post < ActiveRecord::Base
extend Commentable
has_many_comments -> { where(:bar) }
end
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove single character body in head(:no_content) response
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
single check.
Rails includes a single character body to a head(:no_content) response to work around an old Safari bug where headers were ignored if no body sent.
This patch brings the behavior slightly closer to spec if :no_content/204 is explicity requested via a head only response.
Status comparison done on symbolic and numeric values
Not returning any content when responding with head and limited to a status code that explicitly states no content will be returned - 100..199, 204, 205, 304.
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix for digest authentication bug - issue #2301 in rails/rails
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is a private place to put those AS features that are used
by every component. Nowadays we cherry-pick individual files
wherever they are used, but that it is not worth the effort
for stuff that is going to be loaded for sure sooner or later,
like blank?, autoload, concern, etc.
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Improve error handling when using partial name with hyphen. #7079
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since b6ab4417720e03f1551abda2f1e4bd0a392dd04e the single quotes are
being escaped in the templates.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
zero and the new value is not a string.
Before this commit this was the behavior
r = Review.find_by_issue(0)
r.issue
=> 0
r.changes
=> {}
r.issue = 0
=> 0
r.changed?
=> true
r.changes
=> {"issue"=>[0,0]}
Fixes #7237
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This can be used to get a Relation from an association.
Previously we had a #scoped method, but we're deprecating that for
AR::Base, so it doesn't make sense to have it here.
This was requested by DHH, to facilitate code like this:
Project.scope.order('created_at DESC').page(current_page).tagged_with(@tag).limit(5).scoping do
@topics = @project.topics.scope
@todolists = @project.todolists.scope
@attachments = @project.attachments.scope
@documents = @project.documents.scope
end
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This makes it easier to see what the documentation refers to.
It also means that we are not doing unnecessary work for delegations
that have no args / splats / block / etc.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This doesn't change the exernal behavior, but it moves some code around
to where I think it properly belongs.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This method explicitly loads the records and then returns `self`.
Rather than deciding between "do I want an array or a relation?",
most people are actually asking themselves "do I want to eager load
or lazy load?" Therefore, this method provides a way to explicitly
eager-load without having to switch from a `Relation` to an array.
Example:
@posts = Post.where(published: true).load
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 3803fcce26b837c0117f7d278b83c366dc4ed370.
Conflicts:
activerecord/CHANGELOG.md
It will be deprecated only in 4.0, and removed properly in 4.1.
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
freerobby/no_password_requirement_if_validations_skipped
has_secure_password should not raise a 'digest missing' error if the calling class has specified for validations to be skipped.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
class has specified for validations to be skipped.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change AR's CHANGELOG, because it is related to e35c67ae0f920011a2440210041e96659a8de985
[ci skip]
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | | |
e35c67ae0f920011a2440210041e96659a8de985
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
The use_schema_cache_dump configuration moved to ActiveRecord.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Extract dependency check logic that raises ArgumentError in case of an
invalid :dependent option given to an association.
Closes #7054
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Move the logic for validation check to the same method, and cache
dependent option in a variable to reuse inside the dependency
configuration methods instead of relying on the options hash.
|
| | |/ / / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
Restoring documentation for env_config
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Updated scaffold_controller generator docs #7146
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It was just a copy of the controller generator documentation which was
misleading. It doesn't accept arguments for views. This seems more
descriptive as well.
Respect 80 char limit. #7147
Made a nicer paragraph #7147
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Follow code conventions in metal/live
|
| | | | | | | |
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | | |
https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content
Closes #7215
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
small fix typo in collection proxy
|
|/ / / / / / |
|