- 22 6月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
fixes #10669 While joining_values special treatment is given to string values. By flattening the array it ensures that string values are detected as strings and not arrays.
-
- 29 5月, 2013 1 次提交
-
-
由 John Gesimondo 提交于
pass block directly to grep
-
- 28 5月, 2013 1 次提交
-
-
由 Yves Senn 提交于
-
- 03 5月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 23 4月, 2013 1 次提交
-
-
由 Fyodor 提交于
-
- 11 4月, 2013 1 次提交
-
-
由 Neeraj Singh 提交于
-
- 03 4月, 2013 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 22 3月, 2013 1 次提交
-
-
由 Carson McDonald 提交于
[ci skip]
-
- 20 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 15 3月, 2013 1 次提交
-
-
由 Yves Senn 提交于
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`.
-
- 05 3月, 2013 1 次提交
-
-
由 Ernie Miller 提交于
-
- 04 3月, 2013 3 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
由 Carlos Antonio da Silva 提交于
-
由 wangjohn 提交于
relations. Specific where values can be unscoped, and the unscope method still works when relations are merged or combined.
-
- 26 2月, 2013 1 次提交
-
-
由 Yves Senn 提交于
Fixes #9275. When `#order` is called with a Symbol this patch will prepend the quoted_table_name. Before the postgresql adapter failed to build queries containg a join and an order with a symbol. This expansion happens for all adapters.
-
- 25 2月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
Taking the wise advice of @carlosantoniodasilva
-
- 21 2月, 2013 3 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 wangjohn 提交于
The function is now called has_arguments? so that it's easier to tell that it's just checking to see if the args are blank or not.
-
- 20 2月, 2013 2 次提交
-
-
由 wangjohn 提交于
for query methods in a where_clause. Also, modified the CHANGELOG entry because it had false information and added tests.
-
由 John J Wang 提交于
-
- 08 2月, 2013 3 次提交
-
-
由 Maurizio De Santis 提交于
-
由 Maurizio De Santis 提交于
-
由 Maurizio De Santis 提交于
-
- 25 1月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 09 12月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
* Fix example queries * Remove doc entries of where.like/not_like. * Remove :chain from where.not related docs. To me that's an implementation detail and we don't expect people to use where(:chain).not.
-
- 08 12月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
The real win with these chain methods is where.not, that takes care of different scenarios in a graceful way, for instance when the given value is nil. where("author.id != ?", author_to_ignore.id) where.not("author.id", author_to_ignore.id) Both where.like and where.not_like compared to the SQL versions doesn't seem to give us that much: Post.where("title LIKE 'ruby on%'") Post.where.like(title: 'ruby on%'") Post.where("title NOT LIKE 'ruby on%'") Post.where.not_like(title: 'ruby on%'") Thus Rails is adding where.not, but not where.like/not_like and others.
-
由 claudiob 提交于
This commit stems from https://github.com/rails/rails/pull/8332#issuecomment-11127957 Since the formats in which conditions can be passed to `not` differ from the formats in which conditions can be passed to `like` and `not_like`, then I think it's worth adding rdoc and tests to show this behavior
-
- 07 12月, 2012 3 次提交
-
-
由 Carlos Antonio da Silva 提交于
Arel::Nodes::In inherits from Arel::Nodes::Equality, so the case statement was always using the Equality operator for both scenarios, resulting in a not equal query instead.
-
由 claudiob 提交于
This commit updates the rdoc of AR#where to match the changes applied in https://github.com/rails/rails/commit/6ba0f97 that is: * `where(nil)` has the same effect of `where('')`: a no op * `where` (no args) has the same effect of `where(:chain)`: to create a WhereChain
-
由 Carlos Antonio da Silva 提交于
Consider this scenario: if params[:foo] conditions = { foo: true } end foos = Foo.where(conditions).order(:id) When params[:foo] is nil, this would call: foos = Foo.where(nil).order(:id) In this scenario, we want Foo.where(conditions) to be the same as calling Foo.all, otherwise we'd get a "NoMethodError order for WhereChain". Related to #8332.
-
- 30 11月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
These are for internal use only and cannot be relied on as part of the public API. See discussion on 8c2c6051.
-
由 Akira Matsuda 提交于
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
-
- 10 11月, 2012 1 次提交
-
-
由 AvnerCohen 提交于
-
- 05 11月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 29 10月, 2012 1 次提交
-
-
由 Juanjo Bazán 提交于
-
- 16 10月, 2012 1 次提交
-
-
由 Aaron Patterson 提交于
allocations
-
- 13 10月, 2012 2 次提交
-
-
由 Aaron Patterson 提交于
Before: Calculating ------------------------------------- ar 87 i/100ms ------------------------------------------------- ar 823.4 (±11.8%) i/s - 4089 in 5.070234s After: Calculating ------------------------------------- ar 88 i/100ms ------------------------------------------------- ar 894.1 (±3.9%) i/s - 4488 in 5.028161s Same test as 3a6dfca7
-
由 Yves Senn 提交于
-
- 12 10月, 2012 1 次提交
-
-
由 Tima Maslyuchenko 提交于
-