Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | `sanitize_sql_like` escapes `escape_character` not only backslash. | Yves Senn | 2014-04-16 | 2 | -5/+7 |
| | | | | | | * This is a follow up to: fe4b0eee05f59831e1468ed50f55fbad0ce11e1d * The originating PR is #14222 * It should fix the build | ||||
* | SQL Like escaping helper method. [Rob Gilson & Yves Senn] | Rob Gilson | 2014-04-16 | 3 | -0/+48 |
| | | | | | | | | | Closes #14222. This is a follow up to #6104 This does not have the backwards compatibility issues brought up in implementation to break. | ||||
* | Add CHANGELOG entry for #14766 [ci skip] | Rafael Mendonça França | 2014-04-15 | 1 | -0/+6 |
| | |||||
* | Merge pull request #14765 from byroot/refactor-counter-cache-create-and-destroy | Rafael Mendonça França | 2014-04-15 | 3 | -34/+44 |
|\ | | | | | Refactor counter cache create and destroy | ||||
| * | Hide BelongsToAssociation#increment_counters and #decrement_counters | Jean Boussier | 2014-04-15 | 2 | -3/+2 |
| | | |||||
| * | Restore the destroy_by_association check in post destroy counter cache | Jean Boussier | 2014-04-15 | 1 | -2/+9 |
| | | |||||
| * | Set _after_create_counter_called flag to make update counter cache work | Jean Boussier | 2014-04-15 | 1 | -1/+6 |
| | | |||||
| * | Use inheritance chain instead of callbacks to increment counter caches after ↵ | Jean Boussier | 2014-04-14 | 2 | -20/+4 |
| | | | | | | | | destroy | ||||
| * | Use inheritance chain instead of callbacks to increment counter caches after ↵ | Jean Boussier | 2014-04-14 | 3 | -16/+31 |
| | | | | | | | | create | ||||
* | | Changed change_column in PG schema_statements.rb to make sure that the ↵ | Eric Chahin | 2014-04-15 | 3 | -2/+30 |
| | | | | | | | | uuid_generate function was not being quoted. | ||||
* | | Merge pull request #14762 from dwo/master | Arthur Nogueira Neves | 2014-04-15 | 1 | -1/+1 |
|\ \ | | | | | | | use YAML.load_file in database tasks example | ||||
| * | | use YAML.load_file in database tasks example | Robin Tweedie | 2014-04-15 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | rather than YAML.load(File.read(path)). YAML.load_file is also used in guides/rails_guides/helper.rb since 2011, the only other precedent I could find. | ||||
* | | | Make sure the column_name is different from 'all'. | Lauro Caetano | 2014-04-14 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 968c581ea34b5236af14805e6a77913b1cb36238 have fixed the EagerLoadTest, but not in the correct way. The problem was when `empty?` or `size` was called on relation. It was triggering `count(:all)`, which was passing `:all` as the column name to `count` on Calculations. On the other hand, the method `calculate` on Calculations was calling `construct_relation_for_association_calculations` instead of `perform_calculation`, because `has_include?` was returning `true` since `column_name` was present. To prevent calling the wrong method to perform the calculation, we have to check if the `column_name` is present and if it is different from `:all` (which is now used to correctly do `count` with `select`). More information here: https://github.com/rails/rails/commit/968c581ea34b5236af14805e6a77913b1cb36238#commitcomment-6006135 | ||||
* | | | The Association Relation should use `empty?` and `size` from Relation. | Lauro Caetano | 2014-04-14 | 2 | -8/+11 |
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 968c581ea34b5236af14805e6a77913b1cb36238 have introduced this bug #14744 on Association Relation when the method `empty?` or `size` was called. Example: # Given an author that does have 3 posts, but none of them with the # title 'Some Title' Author.last.posts.where(title: 'Some Title').size # => 3 It was occurring, because the Association Relation had implemented these methods based on `@association`, this way giving wrong results. To fix it, was necessary to remove the methods `empty?` and `size` from Association Relation. It just have to use these methods from Relation. Example: # Given an author that does have 3 posts, but none of them with the # title 'Some Title' Author.last.posts.where(title: 'Some Title').size # => 0 # Now it will return the correct value. Fixes #14744. | ||||
* | | Remove outdated comment | Rafael Mendonça França | 2014-04-14 | 1 | -1/+0 |
| | | |||||
* | | Merge pull request #14729 from akshay-vishnoi/doc_changes | Richard Schneeman | 2014-04-14 | 1 | -4/+4 |
|\ \ | |/ |/| | [ci skip] Improve doc, fix grammatical issue | ||||
| * | [ci skip] Improve doc, fix grammatical issue | Akshay Vishnoi | 2014-04-13 | 1 | -4/+4 |
| | | |||||
* | | Merge pull request #14735 from byroot/idempotent-counter-caches | Aaron Patterson | 2014-04-14 | 3 | -4/+47 |
|\ \ | | | | | | | Idempotent counter caches, fix concurrency issues with counter caches | ||||
| * | | Make counter cache decrementation on destroy idempotent | Jean Boussier | 2014-04-13 | 2 | -4/+26 |
| | | | |||||
| * | | Write the failing test case for concurrent counter cache | Jean Boussier | 2014-04-13 | 1 | -0/+21 |
| | | | |||||
* | | | docs, double meaning of `serialize` argument. Closes #14284. | Yves Senn | 2014-04-14 | 1 | -5/+16 |
| | | | | | | | | | | | | | | | | | | | | | | | | The second argument to serialize has double meaning: * `class_name` of the Type to serialize * `coder` to use then serializing. The new variable name and the docs better describe that behavior. | ||||
* | | | Just call read_attribute, no need to use `send`. | Lauro Caetano | 2014-04-14 | 2 | -7/+7 |
| | | | | | | | | | | | | Follow up to af549a1ad6692d7e2c756750651f0e1b293f5185 | ||||
* | | | again, read_attribute is public, so just call it | Aaron Patterson | 2014-04-13 | 1 | -1/+1 |
| | | | |||||
* | | | read_attribute is public, so we should just call it | Aaron Patterson | 2014-04-13 | 1 | -1/+1 |
|/ / | |||||
* | | Merge pull request #14592 from ↵ | Rafael Mendonça França | 2014-04-13 | 4 | -0/+54 |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | laurocaetano/equality_between_relation_and_collection_proxy The comparison between `Relation` and `CollectionProxy` should be consistent. Conflicts: activerecord/CHANGELOG.md | ||||
| * | | Ensure that the comparison between 'CollectionProxy' and ↵ | Lauro Caetano | 2014-04-12 | 1 | -0/+9 |
| | | | | | | | | | | | | 'AssociationRelation' is consistent. | ||||
| * | | Make the comparison between 'Relation' and 'AssociationRelation' | Lauro Caetano | 2014-04-12 | 3 | -1/+14 |
| | | | | | | | | | | | | consistent. | ||||
| * | | The comparison between `Relation` and `CollectionProxy` should be consistent. | Lauro Caetano | 2014-04-11 | 3 | -0/+32 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: author.posts == Post.where(author_id: author.id) # => true Post.where(author_id: author.id) == author.posts # => true Fixes #13506 | ||||
* | | | Add a changelog entry for #14546 [ci skip] | Robin Dupret | 2014-04-13 | 1 | -0/+14 |
| |/ |/| | |||||
* | | don't bother with an offset if the offset is zero | Aaron Patterson | 2014-04-12 | 1 | -6/+9 |
| | | | | | | | | | | we're guaranteed to pass a numeric value for offset, so if it's zero, just don't add an offset to the query | ||||
* | | only add the offset and index when we need to | Aaron Patterson | 2014-04-12 | 1 | -8/+9 |
| | | |||||
* | | remove branching logic from calls to find_nth | Aaron Patterson | 2014-04-12 | 1 | -6/+10 |
| | | |||||
* | | please use Ruby, not ActiveSupport | Aaron Patterson | 2014-04-11 | 1 | -1/+1 |
|/ | |||||
* | Use assert_not | Rafael Mendonça França | 2014-04-11 | 1 | -1/+1 |
| | |||||
* | New CHANGELOG entries are in to top of file | Rafael Mendonça França | 2014-04-11 | 1 | -7/+7 |
| | |||||
* | :scissors: | Rafael Mendonça França | 2014-04-11 | 3 | -7/+7 |
| | |||||
* | Merge pull request #14711 from ↵ | Rafael Mendonça França | 2014-04-11 | 5 | -3/+35 |
|\ | | | | | | | | | | | swoker/activerecord_fix_aggregate_methods_with_select Activerecord fix aggregate methods with select | ||||
| * | fix exception on polymorphic associations with predicates | Simon Woker | 2014-04-11 | 2 | -0/+16 |
| | | |||||
| * | Fix error for aggregate methods with select, see issue #13648 | Simon Woker | 2014-04-10 | 3 | -3/+19 |
| | | |||||
* | | PostgreSQL, warn once per connection per missing OID. Closes #14275. | Yves Senn | 2014-04-11 | 3 | -2/+19 |
| | | | | | | | | [Yves Senn & Matthew Draper] | ||||
* | | PostgreSQL, adapter automatically reloads it's type map. Closes #14678. | Yves Senn | 2014-04-11 | 8 | -16/+57 |
| | | | | | | | | [Yves Senn & Matthew Draper] | ||||
* | | docs, make association `autosave: true` examples runnable. Closes #14700 | Yves Senn | 2014-04-11 | 1 | -6/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] The examples are written in a way you expect them to be executable. However one snippet assumed there to be two comments when only one was created above. The defined models did not extend `ActiveRecord::Base` The example used `comments.last.mark_for_destruction`. This does no longer load the whole collection but just the last record. It is then refetcht on subsequent calls to `last`. This breaks the example. | ||||
* | | Merge pull request #12829 from iantropov/issue_insert_via_hmt_scope_3548 | Rafael Mendonça França | 2014-04-10 | 6 | -4/+32 |
|\ \ | | | | | | | | | | | | | | | | | | | Fix insertion of records for hmt association with scope Conflicts: activerecord/CHANGELOG.md | ||||
| * | | Fix insertion of records for hmt association with scope, fix #3548 | Ivan Antropov | 2013-11-17 | 6 | -4/+32 |
| | | | |||||
* | | | Remove warning of unused variable | Rafael Mendonça França | 2014-04-10 | 1 | -1/+1 |
| | | | |||||
* | | | No need to call send | Rafael Mendonça França | 2014-04-10 | 1 | -1/+1 |
| | | | |||||
* | | | Merge branch 'master' into rm-uuid-fixtures | Rafael Mendonça França | 2014-04-10 | 36 | -115/+266 |
|\ \ \ | | |/ | |/| | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md activesupport/CHANGELOG.md | ||||
| * | | Only call uniq on the conditional that actually needs it | Carlos Antonio da Silva | 2014-04-09 | 1 | -1/+1 |
| | | | |||||
| * | | Remove extra collect call | Carlos Antonio da Silva | 2014-04-09 | 1 | -1/+1 |
| | | | |||||
| * | | Make sure the reflection test is passing a String to the reflection | Lauro Caetano | 2014-04-09 | 1 | -1/+1 |
| | | | | | | | | | | | | cache. |