Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Include fixtures to prevent foreign key violation. | Zuhao Wan | 2014-07-09 | 1 | -0/+2 |
| | |||||
* | Merge pull request #16093 from ↵ | Rafael Mendonça França | 2014-07-08 | 1 | -0/+1 |
|\ | | | | | | | | | zuhao/refactor_activerecord_nested_through_associations_test Warm up cache to prevent assertion failure. | ||||
| * | Warm up cache to prevent assertion failure. | Zuhao Wan | 2014-07-08 | 1 | -0/+1 |
| | | |||||
* | | Merge pull request #16072 from sgrif/sg-xml-quoting | Rafael Mendonça França | 2014-07-08 | 1 | -1/+14 |
|\ \ | | | | | | | Don't rely on the sql type to quote XML columns in PG | ||||
| * | | Don't rely on the sql type to quote XML columns in PG | Sean Griffin | 2014-07-06 | 1 | -1/+14 |
| |/ | |||||
* / | Remove the `text?` predicate from the type objects | Sean Griffin | 2014-07-06 | 14 | -18/+0 |
|/ | | | | | | | This was only used for uniqueness validations. The first usage was in conjunction with `limit`. Types which cast to string, but are not considered text cannot have a limit. The second case was only with an explicit `:case_sensitive => true` option given by the user. | ||||
* | Change back occurrences of SQLite(3) to sqlite3 when referring to the | Zachary Scott | 2014-07-06 | 1 | -5/+6 |
| | | | | adapter, fixed from #16057 [ci skip] | ||||
* | Merge pull request #16057 from akshay-vishnoi/doc_change | Zachary Scott | 2014-07-06 | 1 | -2/+2 |
|\ | | | | | [ci skip] /sqlite/i --> SQLite | ||||
| * | [ci skip] /sqlite/i --> SQLite | Akshay Vishnoi | 2014-07-06 | 1 | -2/+2 |
| | | |||||
* | | active_record: Type cast booleans and durations for string columns. | Dylan Thacker-Smith | 2014-07-06 | 2 | -3/+34 |
| | | |||||
* | | Revert "Merge pull request #16059 from jenncoop/json-serialized-attr" | Godfrey Chan | 2014-07-05 | 1 | -15/+1 |
| | | | | | | | | | | | | This reverts commit a03097759bd7103bb9db253e7ba095f011453f75. This needs more work before it would work correctly on master. | ||||
* | | Merge pull request #16059 from jenncoop/json-serialized-attr | Godfrey Chan | 2014-07-05 | 1 | -1/+15 |
| | | | | | | | | | | | | | | | | Fixed issue with ActiveRecord serialize object as JSON Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb | ||||
* | | Fix mysql/mysql2 failing with FK constraint errors | Godfrey Chan | 2014-07-05 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | One of the author fixture we have ("david") references an author address by ID. Since we disable FK checks when inserting fixtures, this is all fine until we try to update it, at which point MySQL would complain about the missing row referenced by the `author_address_id`. [Godfrey Chan, Matthew Draper] | ||||
* | | Re-enable foriegn key tests on MySQL | Godfrey Chan | 2014-07-05 | 1 | -2/+0 |
| | | | | | | | | This reverts commit e84799d, e31104c and e6ca8e2 | ||||
* | | Use the type object for quoting PG Ranges | Sean Griffin | 2014-07-05 | 2 | -6/+6 |
| | | |||||
* | | Add a `required` option to singular associations | Sean Griffin | 2014-07-04 | 1 | -0/+82 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to defining the association, a `required` association will also have its presence validated. Before: ```ruby belongs_to :account validates_presence_of :account ``` After: ```ruby belongs_to :account, required: true ``` This helps to draw a distinction between types of validations, since validations on associations are generally for data integrity purposes, and aren't usually set through form inputs. | ||||
* | | Fix typo | Rafael Mendonça França | 2014-07-04 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #16028 from ↵ | Rafael Mendonça França | 2014-07-04 | 1 | -0/+10 |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | cade/fix_counter_cache_count_with_association_selects Add `:all` argument to `count` in `reset_counters` Conflicts: activerecord/CHANGELOG.md | ||||
| * | | Add `:all` argument to `count` in `reset_counters` | Cade Truitt | 2014-07-02 | 1 | -0/+10 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this fix, if an association had a scope with a `select`, calls to `reset_counters` would generate invalid SQL and throw: ActiveRecord::StatementInvalid: [$DB_ADAPTER]: wrong number of arguments to function COUNT() References #10710, #13648 | ||||
* | | | Merge pull request #16049 from matthewd/find-via-reload | Matthew Draper | 2014-07-05 | 1 | -0/+12 |
|\ \ \ | | | | | | | | | After find-via-reload, the record is not new | ||||
| * | | | After find-via-reload, the record is not new | Matthew Draper | 2014-07-05 | 1 | -0/+12 |
| | |/ | |/| | |||||
* | | | Merge pull request #16037 from sgrif/sg-money-quoting | Rafael Mendonça França | 2014-07-04 | 1 | -0/+24 |
|\ \ \ | |/ / |/| | | Remove unneccessary special case for money in quoting | ||||
| * | | Remove unneccessary special case for money in quoting | Sean Griffin | 2014-07-03 | 1 | -0/+24 |
| |/ | |||||
* | | Merge pull request #16036 from sgrif/sg-datetime-infinity | Rafael Mendonça França | 2014-07-03 | 1 | -0/+44 |
|\ \ | | | | | | | Do not rely on the column type when quoting infinity | ||||
| * | | Do not rely on the column type when quoting infinity | Sean Griffin | 2014-07-03 | 1 | -0/+44 |
| |/ | |||||
* / | Use the type object for type casting HStore columns | Sean Griffin | 2014-07-03 | 1 | -11/+5 |
|/ | |||||
* | Quote range strings when quoting PG ranges | Sean Griffin | 2014-07-02 | 2 | -1/+18 |
| | | | | | The test case for CVE-2014-3483 doesn't actually send the generated SQL to the database. The generated SQL is actually invalid for real inputs. | ||||
* | Fix SQL injection when querying against ranges and bitstrings | Rafael Mendonça França | 2014-07-02 | 1 | -0/+11 |
| | | | | Fix CVE-2014-3483 and protect against CVE-2014-3482. | ||||
* | Don't error when `dup`ing a record with no PK | Sean Griffin | 2014-07-02 | 1 | -0/+12 |
| | |||||
* | do not hold on to a stale connection object. fixes #15998 | Aaron Patterson | 2014-07-01 | 1 | -2/+5 |
| | |||||
* | Add regression tests for keys on nested associations | eileencodes | 2014-07-01 | 1 | -0/+32 |
| | | | | | | This adds the regressions tests from issue #15893 to master. It's checking that both strings and symbols are accepted as keys for nested associations. | ||||
* | Use the type object for sending JSON to the database | Sean Griffin | 2014-06-29 | 1 | -1/+1 |
| | |||||
* | Always pass a column with a type object to quote | Sean Griffin | 2014-06-28 | 2 | -13/+2 |
| | | | | | | | | The only case where we got a column that was not `nil`, but did not respond to `cast_type` was when type casting the default value during schema creation. We can look up the cast type, and add that object to the column definition. Will allow us to consistently rely on the type objects for type casting in all directions. | ||||
* | [Postgresql tests] remove duplicate helper | Abdelkader Boudih | 2014-06-28 | 1 | -12/+3 |
| | |||||
* | Merge pull request #15934 from seuros/rename | Rafael Mendonça França | 2014-06-27 | 1 | -0/+10 |
|\ | | | | | | | rename primary key sequence only if it exists | ||||
| * | rename sequence only if it exists | Abdelkader Boudih | 2014-06-27 | 1 | -0/+10 |
| | | |||||
* | | Do not change the global state of the test suite | Rafael Mendonça França | 2014-06-27 | 1 | -18/+1 |
| | | |||||
* | | Improve tests to use add_foreign_key DSL | Rafael Mendonça França | 2014-06-27 | 1 | -18/+11 |
| | | |||||
* | | MySQL doesn't works with foreign key | Rafael Mendonça França | 2014-06-27 | 1 | -3/+2 |
|/ | |||||
* | Merge pull request #12450 from iantropov/master | Rafael Mendonça França | 2014-06-27 | 1 | -0/+36 |
|\ | | | | | | | | | | | | | | | | | Fix bug, when ':dependent => :destroy' violates foreign key constraints Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/associations/builder/association.rb activerecord/lib/active_record/associations/builder/has_one.rb | ||||
| * | Fix bug, when ':dependent => :destroy' option violates foreign key ↵ | Ivan Antropov | 2013-10-26 | 1 | -0/+36 |
| | | | | | | | | constraints, issue #12380 | ||||
* | | Merge pull request #15788 from sgrif/sg-mutable-strings | Rafael Mendonça França | 2014-06-27 | 3 | -12/+39 |
|\ \ | | | | | | | | | | Detect in-place modifications on Strings | ||||
| * | | Detect in-place modifications on Strings | Sean Griffin | 2014-06-17 | 3 | -12/+39 |
| | | | |||||
* | | | Merge pull request #8639 from bogdan/valid-with-bang | Rafael Mendonça França | 2014-06-27 | 1 | -0/+14 |
|\ \ \ | | | | | | | | | | | | | Add AR::Base#valid! method | ||||
| * | | | Add AR::Base#validate! method | Bogdan Gusiev | 2014-06-23 | 1 | -0/+14 |
| | | | | | | | | | | | | | | | | | | | | Acts same as valid? but raises AR::RecordInvalid exception if validation fails | ||||
* | | | | fk: use random digest names | Yves Senn | 2014-06-26 | 1 | -14/+17 |
| | | | | | | | | | | | | | | | | | | | | | | | | The name of the foreign key is not relevant from a users perspective. Using random names resolves the urge to rename the foreign key when the respective table or column is renamed. | ||||
* | | | | fk: raise for invalid :on_update / :on_delete values | Yves Senn | 2014-06-26 | 1 | -0/+10 |
| | | | | |||||
* | | | | fk: `add/remove_foreign_key` are noop for adapters that don't support fk | Yves Senn | 2014-06-26 | 1 | -0/+24 |
| | | | | |||||
* | | | | fk: dump foreign keys at the bottom to make sure tables exist. | Yves Senn | 2014-06-26 | 1 | -0/+7 |
| | | | | |||||
* | | | | fk: raise when identifiers are longer than `allowed_index_name_length`. | Yves Senn | 2014-06-26 | 1 | -0/+9 |
| | | | |