aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Whitespace fixes from #18349Sean Griffin2015-01-051-2/+1
| | |
* | | Merge pull request #18349 from jdelStrother/primarykeylessSean Griffin2015-01-052-1/+23
|\ \ \ | |/ / |/| | Fix rollback of primarykey-less tables
| * | Fix rollback of primarykey-less tablesJonathan del Strother2015-01-052-1/+23
| | | | | | | | | If you have a table without a primary key, and an `after_commit` callback on that table (ie `has_transactional_callbacks?` returns true), then trying to rollback a transaction involving that record would result in “ActiveModel::MissingAttributeError: can't write unknown attribute ``”
* | | Add firebird support to test suiteRay Zane2015-01-055-21/+28
| | |
* | | Merge pull request #18344 from jonatack/patch-1Rafael Mendonça França2015-01-051-5/+5
|\ \ \ | | | | | | | | Clean up secure_token_test
| * | | Clean up secure_token_testJon Atack2015-01-051-5/+5
| | | |
* | | | Fix TypeError in Fixture creationMatt Hogan2015-01-051-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 4.2 started doing `value.gsub('$LABEL', label)` for fixture label interpolation, but you can have have valid YAML where `label` isn't a String. For example: ```YAML 0: name: John email: johndoe@gmail.com 1: name: Jane email: janedoe@gmail.com ``` This YAML will create a label that is a Fixnum, causing `TypeError: no implicit conversion of Fixnum into String.`
* | | Fix typo in changelog [ci skip]Carlos Antonio da Silva2015-01-051-1/+1
| | |
* | | remove deprecated support to preload instance-dependent associaitons.Yves Senn2015-01-054-32/+16
| | | | | | | | | | | | Addresses https://github.com/rails/rails/commit/ed56e596a0467390011bc9d56d462539776adac1#commitcomment-9145960
* | | remove deprecated support for PG ranges with exclusive lower bounds.Yves Senn2015-01-053-37/+10
| | | | | | | | | | | | addresses https://github.com/rails/rails/commit/91949e48cf41af9f3e4ffba3e5eecf9b0a08bfc3#commitcomment-9144563
* | | can't kill thread with in-memory db. fixes `rake test:sqlite3_mem`.Yves Senn2015-01-051-0/+2
| | |
* | | remove deprecation warning when modifying a Relation with cached arel.Yves Senn2015-01-053-21/+27
| | | | | | | | | | | | This adresses https://github.com/rails/rails/commit/1b7aa62b184c4410c99208f71b59bbac5c5f03be#commitcomment-9147803
* | | add punctuation. [ci skip]Yves Senn2015-01-051-2/+2
| |/ |/|
* | Remove version conditional for calling GC.disableRafael Mendonça França2015-01-041-1/+1
| |
* | Remove Thread hack for Ruby 1.9claudiob2015-01-041-23/+18
| | | | | | | | | | | | | | | | The hack so skip a Thread test for Ruby 1.9 can be removed now that Rails requires Ruby >= 2.0. Conflicts: activerecord/test/cases/transactions_test.rb
* | remove files which is dependent on ruby1.9 as we do not support Ruby1.9Kuldeep Aggarwal2015-01-042-44/+24
| | | | | | | | | | Conflicts: activerecord/lib/active_record/attribute_methods/read.rb
* | Merge pull request #18217 from robertomiranda/has_secure_tokenDavid Heinemeier Hansson2015-01-047-0/+104
|\ \ | | | | | | Add has_secure_token to Active Record
| * | Add has_secure_token to Active Recordrobertomiranda2015-01-047-0/+104
| | | | | | | | | | | | | | | | | | Update SecureToken Docs Add Changelog entry for has_secure_token [ci skip]
* | | Simplify boolean casting logicCarlos Antonio da Silva2015-01-041-3/+1
|/ /
* | Remove unneeded `require 'as/deprecation'`claudiob2015-01-041-1/+0
| | | | | | | | | | Tests should still pass after removing `require 'active_support/deprecation'` from these files since the related deprecations have been removed.
* | Remove unneeded requiresRafael Mendonça França2015-01-043-6/+0
| | | | | | | | These requires were added only to change deprecation message
* | Change the behavior of boolean columns to be closer to Ruby's semantics.Rafael Mendonça França2015-01-044-19/+16
| | | | | | | | | | | | | | | | Before this change we had a small set of "truthy", and all others are "falsy". Now, we have a small set of "falsy" values and all others are "truthy" matching Ruby's semantics.
* | Change transaction callbacks to not swallowing errors.Rafael Mendonça França2015-01-045-75/+25
| | | | | | | | | | | | | | | | Before this change any error raised inside a transaction callback are rescued and printed in the logs. Now these errors are not rescue anymore and just bubble up, as the other callbacks.
* | Remove deprecated `sanitize_sql_hash_for_conditions`Rafael Mendonça França2015-01-043-40/+4
| |
* | Remove deprecated `Reflection#source_macro`Rafael Mendonça França2015-01-042-19/+4
| |
* | Remove deprecated `symbolized_base_class` and `symbolized_sti_name`Rafael Mendonça França2015-01-042-10/+4
| |
* | Remove deprecated `ActiveRecord::Fixtures` constantRafael Mendonça França2015-01-041-6/+0
| |
* | Remove deprecated `ActiveRecord::Base.disable_implicit_join_references=`Rafael Mendonça França2015-01-043-13/+4
| |
* | Remove deprecated access to connection specification using a string acessor.Rafael Mendonça França2015-01-043-58/+7
| | | | | | | | Now all strings will be handled as a URL.
* | Change the default `null` value for `timestamps` to `false`Rafael Mendonça França2015-01-047-80/+37
| |
* | Return an array of pools from `connection_pools`Rafael Mendonça França2015-01-043-13/+6
| |
* | Return a null column from `column_for_attribute` when no column exists.Rafael Mendonça França2015-01-045-16/+36
| | | | | | | | | | | | | | | | This reverts commit ae96f229f6501d8635811d6b22d75d43cdb880a4. Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods.rb
* | Remove deprecated `serialized_attributes`Rafael Mendonça França2015-01-043-19/+4
| |
* | Remove `cache_attributes` and friendsRafael Mendonça França2015-01-042-25/+0
| |
* | Remove deprecated automatic counter caches on `has_many :through`Rafael Mendonça França2015-01-043-40/+4
| |
* | Remove deprecated `ActiveModel::Dirty#reset_#{attribute}` and ↵Rafael Mendonça França2015-01-041-12/+0
| | | | | | | | `ActiveModel::Dirty#reset_changes`.
* | Remove deprecated methods at `Kernel`.Rafael Mendonça França2015-01-042-1/+23
|/ | | | `silence_stderr`, `silence_stream`, `capture` and `quietly`.
* Merge pull request #18319 from kamipo/sql_type_has_been_determinedRafael Mendonça França2015-01-041-4/+2
|\ | | | | `sql_type` has been determined already when quoting defaults
| * `sql_type` has been determined already when quoting defaultsRyuta Kamizono2015-01-041-4/+2
| | | | | | | | No need to call `type_to_sql` again.
* | Merge pull request #18318 from ↵Rafael Mendonça França2015-01-041-1/+2
|\ \ | | | | | | | | | | | | kamipo/stop_passing_the_column_when_quoting_defaults Stop passing the column to the `quote` method when quoting defaults
| * | Stop passing the column to the `quote` method when quoting defaultsRyuta Kamizono2015-01-041-1/+2
| |/ | | | | | | Related the commit 8f8f8058e58dda20259c1caa61ec92542573643d.
* / Prefer `array?` rather than `array`Ryuta Kamizono2015-01-0418-30/+29
|/ | | | | | Slightly refactoring `PostgreSQLColumn`. `array` should be readonly. `default_function` should be initialized by `super`. `sql_type` has been removed `[]`. Since we already choose to remove it we should not change.
* Merge pull request #17227 from claudiob/explicitly-abort-callbacksRafael Mendonça França2015-01-0315-48/+202
|\ | | | | | | | | | | | | Introduce explicit way of halting callback chains by throwing :abort. Deprecate current implicit behavior of halting callback chains by returning `false` in apps ported to Rails 5.0. Completely remove that behavior in brand new Rails 5.0 apps. Conflicts: railties/CHANGELOG.md
| * Add config to halt callback chain on return falseclaudiob2015-01-021-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This stems from [a comment](rails#17227 (comment)) by @dhh. In summary: * New Rails 5.0 apps will not accept `return false` as a way to halt callback chains, and will not display a deprecation warning. * Existing apps ported to Rails 5.0 will still accept `return false` as a way to halt callback chains, albeit with a deprecation warning. For this purpose, this commit introduces a Rails configuration option: ```ruby config.active_support.halt_callback_chains_on_return_false ``` For new Rails 5.0 apps, this option will be set to `false` by a new initializer `config/initializers/callback_terminator.rb`: ```ruby Rails.application.config.active_support.halt_callback_chains_on_return_false = false ``` For existing apps ported to Rails 5.0, the initializers above will not exist. Even running `rake rails:update` will not create this initializer. Since the default value of `halt_callback_chains_on_return_false` is set to `true`, these apps will still accept `return true` as a way to halt callback chains, displaying a deprecation warning. Developers will be able to switch to the new behavior (and stop the warning) by manually adding the line above to their `config/application.rb`. A gist with the suggested release notes to add to Rails 5.0 after this commit is available at https://gist.github.com/claudiob/614c59409fb7d11f2931
| * Deprecate `false` as the way to halt AR callbacksclaudiob2015-01-0215-47/+191
| | | | | | | | | | | | | | | | | | | | Before this commit, returning `false` in an ActiveRecord `before_` callback such as `before_create` would halt the callback chain. After this commit, the behavior is deprecated: will still work until the next release of Rails but will also display a deprecation warning. The preferred way to halt a callback chain is to explicitly `throw(:abort)`.
| * Deprecate `false` as the way to halt AS callbacksclaudiob2015-01-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After this commit, returning `false` in a callback will display a deprecation warning to make developers aware of the fact that they need to explicitly `throw(:abort)` if their intention is to halt a callback chain. This commit also patches two internal uses of AS::Callbacks (inside ActiveRecord and ActionDispatch) which sometimes return `false` but whose returned value is not meaningful for the purpose of execution. In both cases, the returned value is set to `true`, which does not affect the execution of the callbacks but prevents unrequested deprecation warnings from showing up.
| * Throw :abort halts default CallbackChainsclaudiob2015-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes arguments and default value of CallbackChain's :terminator option. After this commit, Chains of callbacks defined **without** an explicit `:terminator` option will be halted as soon as a `before_` callback throws `:abort`. Chains of callbacks defined **with** a `:terminator` option will maintain their existing behavior of halting as soon as a `before_` callback matches the terminator's expectation. For instance, ActiveModel's callbacks will still halt the chain when a `before_` callback returns `false`.
* | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-01-031-3/+4
|\ \
| * | Fix doc formatting for `count_by_sql`claudiob2015-01-011-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: ![before](https://cloud.githubusercontent.com/assets/10076/5592809/25ce08e8-9199-11e4-9dfe-5baa8bd6b658.png) After: ![after](https://cloud.githubusercontent.com/assets/10076/5592810/25ceef9c-9199-11e4-88f4-d286203d7f6f.png) [ci skip]
* | | Merge pull request #18307 from brainopia/datetime_regressionRafael Mendonça França2015-01-022-1/+13
|\ \ \ | |_|/ |/| | Fully support datetime values in AR::Type::DateTime#type_cast_for_database