| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- Earlier(line number 862) it is said to add <%= link_to 'New post', new_post_path %> on posts index page before table tag. But when posts index page html is shown, "New Post" link is missing.
So aaded "New Post" link in this commit
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[ci skip]
This is a follow up to #12609 and integrates #12158.
Thanks @aspiers.
Closes #12158.
|
| |/
|/| |
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Conflicts:
activesupport/lib/active_support/core_ext/hash/deep_merge.rb
activesupport/lib/active_support/core_ext/hash/keys.rb
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
---
Revert "syntax error joining/including models"
This reverts commit ac35f72f30c47298a20a90c8c537db888b463bbb.
---
Revert "syntax error joining tables"
This reverts commit c365986b48c3e8bc8c7f3fa6a8521616ed5dc138.
---
Comments:
https://github.com/rails/docrails/commit/c365986b48c3e8bc8c7f3fa6a8521616ed5dc138#commitcomment-4630684
|
| | |
| | |
| | | |
syntax error joining/including models
|
| | |
| | |
| | | |
syntax error joining tables
|
| | |
| | |
| | | |
Code style adherence
|
| | | |
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
[ci skip] Enumerable.instance_methods &
Rails::Configuration::MiddlewareStackProxy.instance_methods # =>
[:as_json]
MiddlewareStackProxy does not share any notable methods with Enumerable.
|
| | | |
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | |
| | |
| | |
| | | |
[ci skip]
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I'm pretty confused about the addition of this method. The documentation
says that it was intended to allow the removal of values from the
default scope (in contrast to #except). However it behaves exactly the
same as except: https://gist.github.com/jonleighton/7537008 (other than
having a slightly enhanced syntax).
The removal of the default scope is allowed by
94924dc32baf78f13e289172534c2e71c9c8cade, which was not a change we
could make until 4.1 due to the need to deprecate things. However after
that change #unscope still gives us nothing that #except doesn't already
give us.
However there *is* a desire to be able to unscope stuff in a way that
persists across merges, which would allow associations to be defined
which unscope stuff from the default scope of the associated model. E.g.
has_many :comments, -> { unscope where: :trashed }
So that's what this change implements. I've also corrected the
documentation. I removed the guide references to #except as I think
unscope really supercedes #except now.
While we're here, there's also a potential desire to be able to write
this:
has_many :comments, -> { unscoped }
However, it doesn't make sense and would not be straightforward to
implement. While with #unscope we're specifying exactly what we want to
be removed from the relation, with "unscoped" we're just saying that we
want it to not have some things which were added earlier on by the
default scope. However in the case of an association, we surely don't
want *all* conditions to be removed, otherwise the above would just
become "SELECT * FROM comments" with no foreign key constraint.
To make the above work, we'd have to somehow tag the relation values
which get added when evaluating the default scope in order to
differentiate them from other relation values. Which is way too much
complexity and therefore not worth it when most use cases can be
satisfied with unscope.
Closes #10643, #11061.
|
| |
| |
| |
| | |
Cache::Store does not have a default value for :namespace. If it ever did, I can't find it in the git history.
|
| |
| |
| |
| | |
Grammatical tense correction: "There exists two" => "There exist two".
Plurality correction: "can be reused inside others resources" => "can be reused inside other resources".
|
| |
| |
| |
| |
| |
| | |
In order to simplify profiling loading of initializers,
added instument for tracking load config initializer event from
`config/initializers`
|
| | |
|
|\ \
| | |
| | | |
[ci skip] Update gem versions for 3.2 and 3.1. Also change some words.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix #10847: allow to pass a block to `cattr_reader`.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Example:
class A
cattr_reader(:defr) { 'default_reader_value' }
end
A.defr # => 'default_reader_value'
|
|/ /
| |
| | |
[ci skip]
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
As of Rails 4.0 `remove_column` is no longer an alias for `remove_columns`.
The type is actually valid and used when issuing a rollback (new `change` method).
This reverts commit 9c9d4948e428a226a19aa92c17fa6ac5833c2fb8.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Update security.md [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | | |
Hi Guys
I was reading through this guide last night and noticed a small mistake, would be great if you could update it.
I changed the word 'building' to 'build' in line 20.
"Web application frameworks are made to help developers building web applications"
|
| | |
| | |
| | |
| | |
| | | |
Product model name was pluralized in example in migrations guide.
[ci skip]
|
|/ /
| |
| |
| |
| |
| | |
instead of 'rake test' as shortcut, use 'rake'.
Closes #12780 [ci skip]
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Update workaround for "Outside the Scope of Strong Parameters"
|
| |
| |
| | |
Add .try to prevent undefined method error for NilClass.
|
| |
| |
| | |
The previous example of how to permit a hash of unknown keys used .tap, but had the side effect of logging an "Unpermitted parameters" message despite being a successful workaround. The proposed workaround is ever so slightly better, imo, because it won't result in an "Unpermitted parameters" message being logged.
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
see here 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|