| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
The right command for doing that is Client.exists?id:[1,2,3]
Exists does not work like find method, in find method you can do Person.find(1, 2, 6) or Person.find([7, 17]) but not Person.exists?(1,2,3) or Person.exists?([1,2,3])
|
| |
| |
| | |
In the example of join models, there are five models but in the explanation only consider Category, Post, Comment and Guest.
|
|/
|
|
| |
Explain that `pluck` differs from `select` in that it does not construct `ActiveRecord` objects and thus model-level overrides are unavailable.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
actionview/README.rdoc
activerecord/lib/active_record/migration.rb
guides/source/development_dependencies_install.md
guides/source/getting_started.md
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing
changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9.
Seems to be a code merge done by mistake.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
order on the old ones
The previous behavior added a major backward incompatibility since it
impossible to have a upgrade path without major changes on the
application code.
We are taking the most conservative path to be consistent with the idea
of having a smoother upgrade on Rails 4.
We are reverting the behavior for what was in Rails 3.x and,
if needed, we will implement a new API to prepend the order clauses in
Rails 4.1.
|
|
|
|
| |
To share a certain logic across other examples, let's add a sample SQL
code generated by the given Ruby code
|
|
|
|
|
|
|
|
| |
This reverts commit f573df32d43c413a5098721ba6151ff190c23c6c.
The original idea of this documentation was to showcase the feature
where you can remove some only queries attributes with a single
key-value pair.
|
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
| |
querying guide
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/layout.html.erb
|
| | |
|
|/ |
|
|\
| |
| |
| |
| | |
Conflicts:
guides/source/upgrading_ruby_on_rails.md
|
| | |
|
| | |
|
|/
|
| |
http://edgeguides.rubyonrails.org/active_record_querying.html#merging-of-scopes
|
|
|
|
| |
the guide accordingly
|
|
|
|
| |
/cc @fxn
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
activerecord/test/cases/adapter_test.rb
guides/source/testing.md
[ci skip]
|
| |
| |
| |
| |
| | |
where.like and where.not_like were removed in 8d02afeaee, but the
guide was not updated.
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our
Relation API is close to SQL terms I renamed `#uniq` to `#distinct`.
There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue
to work. I also updated the documentation to promote the use of `#distinct`.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
relations. Specific where values can be unscoped, and the unscope method
still works when relations are merged or combined.
|
|\ |
|
| |
| |
| |
| | |
Fix missing `ORDER BY id ASC` for Client.first(2);
Uppercase the little y in the SQL equivalent of the Client.last(2).
|
|/
|
|
|
|
|
|
|
|
| |
We discussed that the auto explain feature is rarely used.
This PR removes only the automatic explain. You can still display
the explain output for any given relation using `ActiveRecord::Relation#explain`.
As a side-effect this should also fix the connection problem during
asset compilation (#9385). The auto explain initializer in the `ActiveRecord::Railtie`
forced a connection.
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
There's no reason for guides to reference old behaviors. They should
be current as of the versions of Rails that they ship with, and including
older information just clutters thing.
I discussed this change with @fxn and he agrees.
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
Relation.where with no args can be chained with not, like, and not_like
Conflicts:
activerecord/CHANGELOG.md
activerecord/lib/active_record/relation/query_methods.rb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
examples:
Model.where.not field: nil
#=> "SELECT * FROM models WHERE field IS NOT NULL
Model.where.like name: 'Jeremy%'
#=> "SELECT * FROM models WHERE name LIKE 'Jeremy%'
this feature was originally suggested by Jeremy Kemper https://github.com/rails/rails/pull/5950#issuecomment-5591330
Closes #5950
|
| |
| |
| |
| |
| | |
We have three or four different introduction sentences to the guides.
After this commit, we use the same one everywhere.
|
| |
| |
| |
| | |
Talked with @fxn about this. Bullet points should have periods at the ends.
|