Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Remove not used require and some useless test comments | Carlos Antonio da Silva | 2012-11-17 | 1 | -2/+0 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-11-17 | 1 | -1/+1 | |
|\ | | | | | | | | | Conflicts: actionpack/lib/action_dispatch/routing/redirection.rb | |||||
| * | 1.9 Syntax related changes | AvnerCohen | 2012-11-10 | 1 | -1/+1 | |
| | | ||||||
* | | arel columns can be used for grouping so that "weird" column names are usable | Aaron Patterson | 2012-11-15 | 1 | -0/+4 | |
| | | ||||||
* | | stop hardcoding FrontBase adapter conditionals | Aaron Patterson | 2012-11-15 | 1 | -1/+1 | |
| | | ||||||
* | | stop passing *args to generate aliases | Aaron Patterson | 2012-11-15 | 1 | -4/+2 | |
| | | ||||||
* | | create fewer relation objects | Aaron Patterson | 2012-11-15 | 1 | -3/+6 | |
| | | ||||||
* | | `#pluck` can be used on a relation with `select` clause. | Yves Senn | 2012-11-12 | 1 | -1/+3 | |
|/ | | | | Closes #7551 | |||||
* | use columns hash to look up the column for the count field | Aaron Patterson | 2012-10-17 | 1 | -1/+1 | |
| | ||||||
* | ActiveRecord: sum expression returns string '0' for no records, fixed | Tim Macfarlane | 2012-10-15 | 1 | -1/+1 | |
| | ||||||
* | Fix pluck when columns/tables are reserved words. | Ian Lesperance | 2012-09-05 | 1 | -1/+1 | |
| | ||||||
* | load active_support/core_ext/object/blank in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 | |
| | ||||||
* | Ensure Arel columns are typecasted properly when grouping with calculation | Carlos Antonio da Silva | 2012-06-25 | 1 | -6/+6 | |
| | | | | Fix build issue with postgresql. | |||||
* | Stop assuming strings for grouped calculations | Ernie Miller | 2012-06-24 | 1 | -6/+17 | |
| | | | | | | | | | | | | | | | Execute_grouped_calculation is one of those places where ActiveRecord forgets that it has ARel underpinnings, and assumes that the values provided to group_values are strings. This artificially hobbles otherwise functional code. This patch stops assuming that incoming values respond to to_sym, stops using string interpolation for table aliases on objects that support aliasing, and stops unnecessarily joining group_values on the relation. Additionally, it calls to_sql, if available, on objects sent to column_alias_for, in order to get a more reasonable alias string than a non-string's default to_str method. | |||||
* | Add changelog entry and guide updates for pluck with multiple columns | Carlos Antonio da Silva | 2012-06-22 | 1 | -0/+1 | |
| | ||||||
* | Refactor pluck with multiple columns | Carlos Antonio da Silva | 2012-06-22 | 1 | -26/+13 | |
| | | | | | | | | | | | | Ensure it works with mix of symbols and strings, and with a select clause possibly containing more than one column. Also remove support for pluck with an array of columns, in favor of passing the list of attributes: Model.pluck(:a, :b) See comments: https://github.com/rails/rails/pull/6500#issuecomment-6030292 | |||||
* | ActiveRecord#pluck now accepts multiple columns | jeroeningen | 2012-06-22 | 1 | -15/+35 | |
| | ||||||
* | Extract conditional to a method to avoid duplication | Rafael Mendonça França | 2012-06-19 | 1 | -15/+19 | |
| | | | | Also use if/else block to not use short circuit return | |||||
* | handle joins/includes correctly for pluck and calculation. | Andrey Deryabin | 2012-06-19 | 1 | -1/+6 | |
| | | | | Fix #5990 | |||||
* | Fix wrong example for count method with block [ci skip] | Carlos Antonio da Silva | 2012-05-31 | 1 | -1/+1 | |
| | | | | Thanks @splattael. | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-05-30 | 1 | -1/+1 | |
|\ | ||||||
| * | "a sql" -> "an SQL" per API documentation guidelines | Mark Rushakoff | 2012-05-27 | 1 | -1/+1 | |
| | | ||||||
* | | Yield only one argument instead of splatting. | Carlos Antonio da Silva | 2012-05-28 | 1 | -2/+2 | |
| | | | | | | | | Add Changelog entry. Closes #4003 | |||||
* | | Allow blocks for count with ActiveRecord::Relation. Document and test that ↵ | chrisfinne | 2012-05-28 | 1 | -3/+14 | |
|/ | | | | sum allows blocks | |||||
* | assuming there is only one column, we can simplify the type cast loop | Aaron Patterson | 2012-05-16 | 1 | -7/+6 | |
| | ||||||
* | MySQL returns "SUM(DISTINCT(credit_limit))" as the column name unless | Aaron Patterson | 2012-05-16 | 1 | -4/+11 | |
| | | | | | an alias is provided. Without the alias, the column cannot be found and properly typecast. | |||||
* | Fixes issue where SQL fragments prevented type casting based on column type. | Erich Menge | 2012-05-16 | 1 | -8/+3 | |
| | ||||||
* | Expand and improve #pluck docs | Jeremy Kemper | 2012-05-15 | 1 | -6/+27 | |
| | ||||||
* | Restore support for Model.pluck('sql fragment') | Jeremy Kemper | 2012-05-15 | 1 | -1/+2 | |
| | ||||||
* | Lowercase. | Ben Pickles | 2012-05-01 | 1 | -1/+1 | |
| | ||||||
* | Add ActiveRecord::Base#ids | twinturbo | 2012-04-30 | 1 | -0/+10 | |
| | ||||||
* | extract deprecated #calculate code | Jon Leighton | 2012-04-13 | 1 | -83/+25 | |
| | ||||||
* | use a hash to store relation values | Jon Leighton | 2012-04-13 | 1 | -5/+5 | |
| | ||||||
* | Missing generated query for pluck method. | Juanjo Bazán | 2012-03-27 | 1 | -1/+1 | |
| | | | (and changed the use of true for a more database agnostic example). | |||||
* | Merge pull request #4984 from raghunadhd/change_orderhash | Vijay Dev | 2012-03-03 | 1 | -1/+1 | |
|\ | | | | | Refactored code | |||||
| * | Refactored code | Raghunadh | 2012-02-10 | 1 | -1/+1 | |
| | | ||||||
* | | use bind values for join columns | Aaron Patterson | 2012-02-27 | 1 | -3/+4 | |
| | | ||||||
* | | typecast columns based on the returned types | Aaron Patterson | 2012-02-09 | 1 | -2/+14 | |
|/ | ||||||
* | AR::Relation#pluck: improve to work with joins | Bogdan Gusiev | 2012-02-08 | 1 | -0/+3 | |
| | ||||||
* | rewrites a couple of alternations in regexps as character classes | Xavier Noria | 2012-01-30 | 1 | -1/+1 | |
| | | | | | Character classes are the specific regexp construct to express alternation of individual characters. | |||||
* | Delete unnecessary line that was necessary before I changed the code and it ↵ | Jon Leighton | 2011-12-22 | 1 | -1/+0 | |
| | | | | became no longer necessary. | |||||
* | Make ActiveRecord::Relation#pluck work with serialized attributes | Jon Leighton | 2011-12-22 | 1 | -4/+4 | |
| | ||||||
* | ActiveRecord::Relation#pluck method | Bogdan Gusiev | 2011-11-30 | 1 | -0/+17 | |
| | ||||||
* | Make it the responsibility of the connection to hold onto an ARel visitor ↵ | Jon Leighton | 2011-08-08 | 1 | -2/+2 | |
| | | | | for generating SQL. This improves the code architecture generally, and solves some problems with marshalling. Adapter authors please take note: you now need to define an Adapter.visitor_for method, but it degrades gracefully with a deprecation warning for now. | |||||
* | Fixed failing query when performing calculation with having based on select. | Dmitriy Kiriyenko | 2011-07-27 | 1 | -0/+1 | |
| | ||||||
* | Fixed AR::Relation#sum compatibility with Array#sum | Bogdan Gusiev | 2011-07-05 | 1 | -2/+6 | |
| | | | | | In order make Relation behavior closer to Array Made Relation#sum to accept block and delegate it to Array#sum | |||||
* | Apply the default scope earlier when doing calculations. Fixes #1682. | Jon Leighton | 2011-06-23 | 1 | -5/+11 | |
| | ||||||
* | Ensure that calculations properly override the select value even if it's set ↵ | Jon Leighton | 2011-05-31 | 1 | -2/+2 | |
| | | | | in the default scope. Fixes #1395. | |||||
* | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 1 | -4/+4 | |
| | ||||||
* | Bug fixes: | Fadzril Muhamad & Joseph Palermo | 2011-05-12 | 1 | -5/+4 | |
| | | | | | | - If doing a count on a relation that has an :include and a :join, it does a distinct even though it should not. - When doing a count on a relation that has an :include, it always falls back to a old style left join when performing the count. Looks like it was broken here: https://github.com/rails/rails/commit/b9599502c9e738a5a1513e75d08f8d40ed408265 |