Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #14971 from versioncontrol/#14785 | Yves Senn | 2014-06-06 | 1 | -0/+9 |
|\ | | | | | | | Baseclass becomes! subclass | ||||
| * | Fix Baseclass becomes! subclass. | Edo Balvers | 2014-05-13 | 1 | -0/+9 |
| | | |||||
* | | docs, `instantiate` expects `String` keys. [Rafal Piekarski & Yves Senn] | Yves Senn | 2014-05-20 | 1 | -0/+11 |
|/ | | | | | Closes #15122 Closes #15107 | ||||
* | test, persist inherited class with different table name. Refs #14971. | Yves Senn | 2014-05-07 | 1 | -0/+14 |
| | | | | | This case prevents against regressions. The change was suggested in a recent PR but the all our tests passed. | ||||
* | Move dup destroyed test to specific file that tests dup logic | Carlos Antonio da Silva | 2014-05-02 | 1 | -9/+2 |
| | | | | | Also change other related test to use existing record rather than creating new one. | ||||
* | `@destroyed` should always be set to `false` when an object is duped. | Kuldeep Aggarwal | 2014-04-19 | 1 | -0/+16 |
| | |||||
* | Change usec to 0 on tests that compare seconds | Arthur Neves | 2014-03-12 | 1 | -3/+3 |
| | | | | | Avoid rounding problems with `.usec` method rounding the seconds when the field doesn't persist the `.usec` piece. | ||||
* | use the new clear_validators! api everywhere to reset validators in tests | Kuldeep Aggarwal | 2014-01-28 | 1 | -2/+2 |
| | |||||
* | Copy changed_attributes across to newly become'd records | Jonathan del Strother | 2013-12-27 | 1 | -0/+14 |
| | | | Without this, the original record's values won't get saved, since the partial insertions support (https://github.com/rails/rails/commit/144e8691cbfb8bba77f18cfe68d5e7fd48887f5e) checks for changed values and thinks there are none. | ||||
* | Raising an error when nil or non-hash is passed to update_attributes. | wangjohn | 2013-06-25 | 1 | -4/+11 |
| | |||||
* | Extract AR::Persistence#becomes's test code out from base_test.rb | Takehiro Adachi | 2013-05-22 | 1 | -0/+13 |
| | | | | | The method got extracted out from AR::Base in commit d916c62cfc7c59ab6411407a05b946d3dd7535e9, but the tests never did. | ||||
* | Fix class and method name typos | Vipul A M | 2013-05-12 | 1 | -1/+1 |
| | |||||
* | Add missing require to inheritance test | Carlos Antonio da Silva | 2013-04-03 | 1 | -1/+1 |
| | |||||
* | Use snake case variable names, stick with the convention | Carlos Antonio da Silva | 2013-03-28 | 1 | -13/+13 |
| | |||||
* | Fix updates not working within after_create hooks | Aaron Pfeifer | 2013-03-27 | 1 | -0/+16 |
| | |||||
* | When we pass id to update_attributes it will try to set new id for that record | Dmitry Vorotilin | 2013-03-22 | 1 | -0/+9 |
| | |||||
* | Remove regression test added in 0268b5d8cdc3c5a1337462135f0a326a2654ba1a | Rafael Mendonça França | 2013-03-07 | 1 | -8/+0 |
| | | | | | | It was added because a regression caused by a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca Closes #9255 | ||||
* | Skip failing test and add a FIXME note | Rafael Mendonça França | 2013-02-20 | 1 | -0/+2 |
| | |||||
* | test for regression from a712e08ebe21f6d8653a0e6602df2e0f5d40d9ca | Aaron Patterson | 2013-02-11 | 1 | -0/+6 |
| | |||||
* | Change duplicated test name | Rafael Mendonça França | 2013-01-03 | 1 | -2/+2 |
| | |||||
* | Rename update_attributes method to update, keep update_attributes as an alias | Amparo Luna + Guillermo Iguaran | 2013-01-03 | 1 | -5/+42 |
| | |||||
* | remove meaningless AS::FrozenObjectError | Akira Matsuda | 2013-01-02 | 1 | -3/+2 |
| | |||||
* | Unscope update_column(s) query to ignore default scope | Carlos Antonio da Silva | 2012-12-06 | 1 | -0/+16 |
| | | | | | | | | | | | | | | | | | | | | | | | | When applying default_scope to a class with a where clause, using update_column(s) could generate a query that would not properly update the record due to the where clause from the default_scope being applied to the update query. class User < ActiveRecord::Base default_scope where(active: true) end user = User.first user.active = false user.save! user.update_column(:active, true) # => false In this situation we want to skip the default_scope clause and just update the record based on the primary key. With this change: user.update_column(:active, true) # => true Fixes #8436. | ||||
* | Remove not used variable warnigns | Carlos Antonio da Silva | 2012-12-01 | 1 | -1/+1 |
| | |||||
* | AR::Base.becomes should not change the STI type | Thomas Hollstegge | 2012-11-17 | 1 | -1/+12 |
| | | | | If you want to change the STI type too, use AR::Base.becomes! instead | ||||
* | Enable update_column(s) for the primary key attribute. | Henrik N | 2012-10-28 | 1 | -0/+13 |
| | | | | Didn't work before because it updated the model-in-memory first, so the DB query couldn't find the record. | ||||
* | Remove mass_assignment_options from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -40/+0 |
| | |||||
* | Revert "Remove update_attribute." | Rafael Mendonça França | 2012-08-25 | 1 | -0/+40 |
| | | | | | | | | | | | This reverts commit a7f4b0a1231bf3c65db2ad4066da78c3da5ffb01. Conflicts: activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/persistence.rb activerecord/test/cases/base_test.rb activerecord/test/cases/dirty_test.rb activerecord/test/cases/timestamp_test.rb | ||||
* | Remove the deprecation of update_column. | Rafael Mendonça França | 2012-07-30 | 1 | -38/+17 |
| | | | | | | update_column was suggested as replacement of update_attribute at the last release of 3-2-stable, so deprecating it now will confuse the users. | ||||
* | Deprecate ActiveRecord::Base.scoped. | Jon Leighton | 2012-07-27 | 1 | -3/+3 |
| | | | | | | | It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders. | ||||
* | ActiveRecord::Base.all returns a Relation. | Jon Leighton | 2012-07-27 | 1 | -1/+1 |
| | | | | | | | | | | | Previously it returned an Array. If you want an array, call e.g. `Post.to_a` rather than `Post.all`. This is more explicit. In most cases this should not break existing code, since Relations use method_missing to delegate unknown methods to #to_a anyway. | ||||
* | Deprecate update_column in favor of update_columns. | Rafael Mendonça França | 2012-07-24 | 1 | -17/+38 |
| | | | | Closes #1190 | ||||
* | Use update_columns to implemente the update_column | Rafael Mendonça França | 2012-07-24 | 1 | -2/+36 |
| | |||||
* | New #update_columns method. | Sebastian Martinez | 2012-07-24 | 1 | -0/+57 |
| | |||||
* | Remove update_attribute. | Steve Klabnik | 2012-06-14 | 1 | -62/+1 |
| | | | | | | | | | | | Historically, update_attribute and update_attributes are similar, but with one big difference: update_attribute does not run validations. These two methods are really easy to confuse given their similar names. Therefore, update_attribute is being removed in favor of update_column. See the thread on rails-core here: https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-core/BWPUTK7WvYA | ||||
* | + ActiveRecord::Base#destroy! | Marc-Andre Lafortune | 2012-06-06 | 1 | -0/+7 |
| | |||||
* | Remove unused assignments from activerecord tests | Mark Rushakoff | 2012-04-29 | 1 | -1/+0 |
| | |||||
* | remove deprecated calls | Jon Leighton | 2012-04-27 | 1 | -1/+1 |
| | |||||
* | %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵ | Jon Leighton | 2012-04-27 | 1 | -1/+1 |
| | | | | things | ||||
* | remove deprecate #all usage | Jon Leighton | 2012-04-26 | 1 | -1/+1 |
| | |||||
* | remove deprecate #update_all usage | Jon Leighton | 2012-04-26 | 1 | -7/+1 |
| | |||||
* | Fix delete_all when chained with joins. | Rafael Mendonça França | 2012-04-10 | 1 | -1/+19 |
| | | | | Closes #5202 and #919 | ||||
* | Raise error when using write_attribute with a non-existent attribute. | Jon Leighton | 2011-09-13 | 1 | -6/+11 |
| | | | | | | | | | Previously we would just silently write the attribute. This can lead to subtle bugs (for example, see the change in AutosaveAssociation where a through association would wrongly gain an attribute. Also, ensuring that we never gain any new attributes after initialization will allow me to reduce our dependence on method_missing. | ||||
* | Bring back the ability to provide :order for update_all. | thedarkone | 2011-07-25 | 1 | -0/+20 |
| | |||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. | ||||
* | Ensure assign_attributes and update_attributes do not fail on nil, closes #478. | José Valim | 2011-05-10 | 1 | -0/+4 |
| | |||||
* | some test renaming to avoid collisions, and some annoying issues between dbs | Josh Kalderimis | 2011-04-27 | 1 | -7/+7 |
| | |||||
* | final corrections to the mass-assignment security tests | Josh Kalderimis | 2011-04-27 | 1 | -4/+4 |
| | |||||
* | fix mass-assignment security tests, this was due to a string column limit ↵ | Josh Kalderimis | 2011-04-27 | 1 | -6/+6 |
| | | | | which doesn't cause issues on sqlite |