Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add nodoc to relation methods | Oscar Del Ben | 2012-07-06 | 1 | -24/+22 |
| | |||||
* | Add order docs | Oscar Del Ben | 2012-07-05 | 1 | -0/+10 |
| | |||||
* | Add group documentation | Oscar Del Ben | 2012-07-05 | 1 | -0/+12 |
| | |||||
* | Add documentation for includes | Oscar Del Ben | 2012-07-05 | 1 | -0/+11 |
| | |||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-06-30 | 1 | -5/+7 |
|\ | | | | | | | | | Conflicts: activemodel/lib/active_model/errors.rb | ||||
| * | update AR::FinderMethods#exists?(false) example [ci skip] | Francesco Rodriguez | 2012-06-28 | 1 | -5/+7 |
| | | |||||
* | | fixing typo in from documentation | Subba Rao Pasupuleti | 2012-06-28 | 1 | -2/+2 |
| | | |||||
* | | Use args.flatten! in query methods when applicable | Carlos Antonio da Silva | 2012-06-25 | 1 | -7/+12 |
| | | | | | | | | | | Try to use more destructive methods on *args when applicable, to avoid creating new objects. | ||||
* | | Merge pull request #6544 from flexoid/issue-6431 | Piotr Sarnacki | 2012-06-25 | 1 | -6/+6 |
|\ \ | | | | | | | exists?(false) returns false | ||||
| * | | exists?(false) returns false | Egor Lynko | 2012-06-25 | 1 | -6/+6 |
| | | | | | | | | | | | | `FinderMethods#exists?` finder method now returns *false* with the *false* argument | ||||
* | | | 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. | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-06-22 | 1 | -3/+15 |
|\ | |||||
| * | fixes a few mistakes in api docs [ci skip] | Vijay Dev | 2012-06-22 | 1 | -4/+2 |
| | | |||||
| * | Add documentation for ActiveRecord::QueryMethods#reverse_order [ci skip] | Florent Guilleux | 2012-06-16 | 1 | -0/+3 |
| | | |||||
| * | Add documentation for ActiveRecord::QueryMethods#offset [ci skip] | Ulises Cabanillas | 2012-06-16 | 1 | -0/+7 |
| | | |||||
| * | Add documentation for ActiveRecord::QueryMethods#limit [ci skip] | Florent Guilleux | 2012-06-16 | 1 | -3/+7 |
| | | |||||
* | | 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 |
| | | |||||
* | | disallow mutating a relation once loaded | Jon Leighton | 2012-06-22 | 1 | -18/+20 |
| | | |||||
* | | 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 | ||||
* | | Removing composed_of from ActiveRecord. | Steve Klabnik | 2012-06-18 | 1 | -2/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. Closes #1436 Closes #2084 Closes #3807 | ||||
* | | Documentation for where and where! methods on relations. | David Paschich | 2012-06-18 | 1 | -0/+92 |
|/ | | | | Based on examples seen in the Rails test suite. [ci skip] | ||||
* | Address ORA-00911 errors because of the heading underscore. | Yasuo Honda | 2012-06-11 | 1 | -1/+1 |
| | |||||
* | Fix that #exists? raises ThrowResult when called with an empty limited | Ben Woosley | 2012-06-10 | 1 | -0/+2 |
| | | | | | | | | | reflection. ActiveRecord::FinderMethods#construct_limited_ids_condition will raise ThrowResult if the limited reflection comes back empty. The other callers of #construct_limited_ids_condition handle this exception (more specifically, the callers of construct_relation_for*), but #exists? didn't until now. | ||||
* | Add test to column alias in `exists?` SQL. | Rafael Mendonça França | 2012-06-10 | 1 | -1/+1 |
| | | | | | | | | This behavior was added in be4ecdcc87984e9421ff5d5c90d33f475e0fbc01. Closes #1139. Fixes #2553, #1141, #1623 and #2062. | ||||
* | Minimal change to query generation of exists? that makes SQLServer and ↵ | iaddict | 2012-06-10 | 1 | -1/+1 |
| | | | | | | | others happy that do not work without a column alias. Conflicts: activerecord/lib/active_record/relation/finder_methods.rb | ||||
* | Fix #6635. We should call Scoping methods, before calling Array methods. | kennyj | 2012-06-10 | 1 | -5/+5 |
| | |||||
* | Remove conditional committed by accident | Santiago Pastorino | 2012-06-09 | 1 | -1/+1 |
| | |||||
* | Use each_with_object instead of each here | Santiago Pastorino | 2012-06-09 | 1 | -1/+1 |
| | |||||
* | modulize AR::NullRelation | Akira Matsuda | 2012-06-01 | 1 | -1/+1 |
| | | | | now we can invoke previously added scope extension methods | ||||
* | Merge branch 'master-sec' | Aaron Patterson | 2012-05-31 | 1 | -1/+1 |
|\ | | | | | | | | | | | * master-sec: Strip [nil] from parameters hash. Thanks to Ben Murphy for reporting this! predicate builder should not recurse for determining where columns. Thanks to Ben Murphy for reporting this | ||||
| * | predicate builder should not recurse for determining where columns. | Aaron Patterson | 2012-05-30 | 1 | -1/+1 |
| | | | | | | | | | | | | Thanks to Ben Murphy for reporting this CVE-2012-2661 | ||||
* | | 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 | 3 | -22/+32 |
|\ \ | |||||
| * | | copy edit the batches docs [ci skip] | Vijay Dev | 2012-05-30 | 1 | -9/+7 |
| | | | |||||
| * | | Adds to Batch processing documentation [ci skip] | Alvaro Pereyra | 2012-05-28 | 1 | -9/+20 |
| | | | |||||
| * | | fix typo and remove 'examples' noise [ci skip] | Francesco Rodriguez | 2012-05-28 | 1 | -18/+6 |
| | | | |||||
| * | | Updates examples for FinderMethods [ci skip] | Alvaro Pereyra | 2012-05-28 | 1 | -2/+14 |
| | | | |||||
| * | | Merge branch 'master' of github.com:lifo/docrails | Alvaro Pereyra | 2012-05-28 | 4 | -1/+9 |
| |\ \ | |||||
| | * | | "a sql" -> "an SQL" per API documentation guidelines | Mark Rushakoff | 2012-05-27 | 1 | -1/+1 |
| | |/ | |||||
| * | | Adds examples to FinderMethods#first [ci skip] | Alvaro Pereyra | 2012-05-28 | 1 | -0/+1 |
| | | | |||||
| * | | Remove blank trailing comments | Henrik Hodne | 2012-05-20 | 4 | -8/+0 |
| |/ | | | | | | | | | | | | | For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilà! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed. | ||||
* | | 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 | ||||
* | Relation#from to accept other Relation objects | Radoslav Stankov | 2012-05-17 | 2 | -6/+31 |
| | | | | Record.from("(#{sub_query.to_sql})") -> Record.from(sub_query) Record.from("(#{sub_query.to_sql}) a") -> Record.from(sub_query, :a) | ||||
* | 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. |