aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge pull request #24350 from y-yagi/update_assert_no_performed_jobs_docVipul A M2016-03-301-18/+5
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | update `assert_no_performed_jobs` doc to use `assert_no_performed_jobs` method [ci skip]
| * | | | | | | update `assert_no_performed_jobs` doc to use `assert_no_performed_jobs` ↵yuuji.yaginuma2016-03-301-18/+5
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | method [ci skip]
* | | | | | | Merge pull request #24315 from kenta-s/add_empty_to_finder_methodsAndrew White2016-03-293-1/+34
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Delegate some additional methods in querying.rb
| * | | | | | | Delegate some additional methods in querying.rbKenta2016-03-303-1/+34
| |/ / / / / /
* | | | | | | Merge pull request #24354 from greysteil/fix-typoVipul A M2016-03-291-1/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Fix typo in headers comment [ci skip]
| * | | | | | Fix typo in headers commentGrey Baker2016-03-291-1/+1
| | | | | | |
* | | | | | | Merge pull request #24344 from codeodor/patch-1Vipul A M2016-03-281-2/+2
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Update how to clear the association cache
| * | | | | | Update how to clear the association cacheSammy Larbi2016-03-281-2/+2
|/ / / / / / | | | | | | | | | | | | Passing `true` to the association has been deprecated.
* | | | | | Merge pull request #24343 from arekf/masterप्रथमेश Sonpatki2016-03-281-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update `numericality` validation docs
| * | | | | | [skip ci] Update `numericality` validation docsArkadiusz Fal2016-03-281-0/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | Add `:other_than` option documentation.
* | | | | | Merge pull request #24325 from ↵Kasper Timm Hansen2016-03-271-3/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/show_correct_command_name_in_help_of_rails_runner show correct command name in help of rails runner
| * | | | | | show correct command name in help of rails runneryuuji.yaginuma2016-03-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If use rails together with `spring`, `spring` is rewrite `$0` in the interior command name. Therefore, for `$0` correct command name does not appear, `$0` has been modified so that it does not use.
* | | | | | | Merge pull request #24337 from xw19/realations-properlyVipul A M2016-03-271-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] relations inside <tt> tag
| * | | | | | | [ci skip] relations inside <tt> tagSourav Moitra2016-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s removed objects added
* | | | | | | | Merge pull request #24328 from bogdanvlviv/patch-3Vipul A M2016-03-271-2/+2
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fix description for method ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps [ci skip]
| * | | | | | | Fix description for method ↵Bogdan2016-03-271-2/+2
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps [ci skip]
* | | | | | | Merge pull request #24334 from mabras/masterArun Agrawal2016-03-271-1/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | remove old-dead link
| * | | | | | | remove old-dead linkMohamad Abras2016-03-271-1/+0
|/ / / / / / /
* | | | | | | Merge pull request #24333 from y-yagi/add_index_errors_option_to_exampleJon Moss2016-03-261-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | add `:index_errors` option to example [ci skip]
| * | | | | | | add `:index_errors` option to example [ci skip]yuuji.yaginuma2016-03-271-2/+2
|/ / / / / / /
* | | | | | | Cable: Shush pop warnings when skipping Postgres tests.Kasper Timm Hansen2016-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `skip` raises an exception to abort the execution of the test, so `super` would never be called and thus `@rx_adapter` and `@tx_adapter` would never have been defined at the time of teardown. Define them just before skipping and zap the warnings.
* | | | | | | Shush up EM::Hiredis when running tests.Kasper Timm Hansen2016-03-261-0/+11
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EM::Hiredis were spewing screenfuls of warnings when running the Action Cable tests. Copied over the technique that shushes up faye-websocket in the client tests, so we can reduce the noise ratio. Note: there's still warnings spewed after tests have finished when EM::Hiredis shuts down. I haven't been able to shush them up yet.
* | | | | | Merge pull request #24326 from mechanicles/highlight-wordप्रथमेश Sonpatki2016-03-261-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | Highlight the dynamic method finder 'find_by_' [ci skip]
| * | | | | | Highlight the dynamic method finder 'find_by_' [ci skip]Santosh Wadghule2016-03-261-1/+2
| | | | | | |
* | | | | | | Merge pull request #24323 from prathamesh-sonpatki/rm-check-for-development.rbMatthew Draper2016-03-261-4/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | development.rb file always exists so we don't need a check for it
| * | | | | | development.rb file always exists so we don't need a check for itPrathamesh Sonpatki2016-03-261-4/+1
| | | | | | |
* | | | | | | Merge pull request #24296 from laurmurclar/patch-1Vipul A M2016-03-251-19/+19
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Correct typos in "Active Record Query Interface" guide
| * | | | | | Correct typos in "Active Record Query Interface" guideLaura Murphy-Clarkin2016-03-251-19/+19
|/ / / / / /
* | | | | | Merge pull request #24299 from kitop/activemodel-errors-include-fixKasper Timm Hansen2016-03-252-1/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Do not create a hash key when calling ActiveModel::Errors#include?
| * | | | | | Do not create a hash key when calling ActiveModel::Errors#include?Esteban Pastorino2016-03-242-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From: https://github.com/rails/rails/issues/24279 Problem: By doing `record.errors.include? :foo`, it adds a new key to the @messages hash that defaults to an empty array. This happens because of a combination of these 2 commits: https://github.com/rails/rails/commit/b97035df64f5b2f912425c4a7fcb6e6bb3ddab8d (Added in Rails 4.1) and https://github.com/rails/rails/commit/6ec8ba16d85d5feaccb993c9756c1edcbbf0ba13#diff-fdcf8b65b5fb954372c6fe1ddf284c78R76 (Rails 5.0) By adding the default proc that returns an array for non-existing keys, ruby adds that key to the hash. Solution: Change `#include?` to check with `has_key?` and then check if that value is `present?`. Add test case for ActiveModels::Errors#include?
* | | | | | | Merge pull request #24313 from ↵Kasper Timm Hansen2016-03-251-1/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gaurav2728/remove_unused_set_in_action_view_template_type set in no more used in ActionView::Template::Types
| * | | | | | | set in no more used in ActionView::Template::TypesGaurav Sharma2016-03-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initially set is used for template type https://github.com/rails/rails/commit/67f55e28 after this commit https://github.com/rails/rails/commit/91f2ad36 it’s not require
* | | | | | | | Merge pull request #24312 from prathamesh-sonpatki/fix-cl-typosKasper Timm Hansen2016-03-252-2/+2
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fix typo in Action Pack changelog [ci skip]
| * | | | | | | Fix typo in Action Pack changelog [ci skip]Prathamesh Sonpatki2016-03-252-2/+2
|/ / / / / / /
* | | | | | | Revert "Ensure `config.active_record.time_zone_aware_types` is always set"Rafael Mendonça França2016-03-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 43ccebc1db072ba0c96a67de0b3db78fd8fd0973. This is not fixing the configuration problem since we are assigning to the ActiveRecord::Base not the configuration. See #24303.
* | | | | | | Apply scale before precision when coercing floats to decimalSean Griffin2016-03-242-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since precision is always larger than scale, it can actually change rounding behavior. Given a precision of 5 and a scale of 3, when you apply the precision of 5 to `1.25047`, the result is `1.2505`, which when the scale is applied would be `1.251` instead of the expected `1.250`. This issue appears to only occur with floats, as scale doesn't apply to other numeric types, and the bigdecimal constructor actually ignores precision entirely when working with strings. There's no way we could handle this for the "unknown object which responds to `to_d`" case, as we can't assume an interface for applying the scale. Fixes #24235
* | | | | | | Merge pull request #24292 from arthurnn/arthurnn/pk_sequence_klassArthur Nogueira Neves2016-03-242-2/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Move sequence value methods to Model level
| * | | | | | | Move sequence value methods to Model levelArthur Neves2016-03-242-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `prefetch_primary_key?` and `next_sequence_value` methods live in the connection level at the moment, that make sense when you are generating the sequence from the database, in the same connection. Which is the use case today at the Oracle and Postgres adapters. However if you have an service that generates IDs, that has nothing to do with the database connection, and should not be fetched from there. Another use case, is if you want to use another connection to fetch IDs, that would not be possible with the current implementation, however when we move those methods to the model level, you can use a new connection there. Also this makes easier for gems to add behavior on those methods.
* | | | | | | | Memoize user provided defaults before type castingSean Griffin2016-03-243-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a proc is given as a default value, the form builder ends up displaying `Proc#to_s` when the default is used. That's because we didn't handle the proc until type casting. This issue technically can occur any time that a proc is the value before type casting, but in reality the only place that will occur is when a proc default is provided through the attributes API, so the best place to handle this edge case is there. I've opted to memoize instead of just moving the `Proc#call` up, as this made me realize that it could potentially interact very poorly with dirty checking. The code here is a little redundant, but I don't want to rely on how `value_before_type_cast` is implemented in the super class, even if it's just an `attr_reader`. Fixes #24249 Close #24306
* | | | | | | | Merge pull request #24305 from chrisarcand/reload-ar-cache-after-migrationsArthur Nogueira Neves2016-03-242-2/+14
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Make 'migrate' clear the schema cache afterward
| * | | | | | | | Make 'migrate' clear the schema cache afterwardChris Arcand2016-03-242-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without clearing the caches afterward, removals done in migrations would not be reflected in a separate task in the same process. That is, given a table with a migration to remove a column, the schema cache would still reflect that a table has that in something such as the 'db:seed' task: `rake db:migrate db:seed` (A common thing to do in a script for a project ala `bin/setup`) vs `rake db:migrate && rake db:seed` (Two processes) The first would not reflect that the column was removed. The second would (cache reset).
* | | | | | | | | Cable: fix Faye periodic timer shutdown typoJeremy Daer2016-03-241-1/+1
|/ / / / / / / /
* | | | | | | | Merge pull request #24303 from gsamokovarov/fix-timezone-deprication-warningRafael França2016-03-241-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix a tip in Active Record time attributes deprecation
| * | | | | | | | Fix a tip in Active Record time attributes deprecationGenadi Samokovarov2016-03-241-1/+1
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have hit this deprecation in a newly created Rails 5 application and the suggested tip lead me to a `NoMethodError`. It's not trivial to actually make the following work, because of the ActiveRecord::Base class attributes setting dance in the Active Record railtie. config.active_record.time_zone_aware_types << :time Decided to suggest setting it explicitly to the values we need. [ci skip]
* | | | | | | | Merge pull request #24297 from ojab/masterRafael França2016-03-242-6/+21
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Use Range#cover? for Date inclusion validator
| * | | | | | | | Use Range#cover? for Date inclusion validatorojab2016-03-241-3/+4
| | | | | | | | |
| * | | | | | | | Add edge cases to Time/Date/DateTime inclusion validation testsojab2016-03-241-3/+17
| | | | | | | | |
* | | | | | | | | Merge pull request #24254 from vijayagrawal18/custom-context-documentationप्रथमेश Sonpatki2016-03-241-0/+19
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Added missing custom context validation documentation
| * | | | | | | | [ci skip] Added missing custom context validationVijay Kumar Agrawal2016-03-241-0/+19
|/ / / / / / / /
* | | | | | | | Merge pull request #24295 from yui-knk/add_test_for_unknown_migration_versionMatthew Draper2016-03-252-1/+4
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Change for `ActiveRecord::Migration.[]` to raise `ArgumentError` inst…