aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #25271 from kamipo/prevent_range_error_for_existsSean Griffin2016-06-153-10/+6
|\ | | | | Prevent `RangeError` for `FinderMethods#exists?`
| * Prevent `RangeError` for `FinderMethods#exists?`Ryuta Kamizono2016-06-163-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | `FinderMethods#exists?` should return a boolean rather than raising an exception. `UniquenessValidator#build_relation` catches a `RangeError` because it includes type casting due to a string value truncation. But a string value truncation was removed at #23523 then type casting in `build_relation` is no longer necessary. aa06231 removes type casting in `build_relation` then a `RangeError` moves to `relation.exists?`. This change will remove the catching a `RangeError`.
| * Avoid type casting in uniqueness validatorRyuta Kamizono2016-06-041-5/+2
| | | | | | | | | | Type casting in uniqueness validator is for a string value truncation. It was removed at #23523.
* | Merge pull request #25407 from pjscopeland/doc/correct-pg-exampleRafael França2016-06-151-2/+2
|\ \ | | | | | | Correct example in PostgreSQL guide
| * | Example had results the wrong way round [ci skip]Patrick Copeland2016-06-161-2/+2
|/ /
* | Merge pull request #25339 from prathamesh-sonpatki/reuse-validate-index-lengthRafael França2016-06-151-7/+7
|\ \ | | | | | | Reuse validate index length
| * | Reuse existing validate_index_length! methodPrathamesh Sonpatki2016-06-091-7/+7
| | | | | | | | | | | | - Followup of https://github.com/rails/rails/commit/1ea6cc11211dc89e3e14b2b641a3cca8a0a91d55.
* | | Merge pull request #25402 from alexcameron89/masterRafael França2016-06-141-1/+1
|\ \ \ | | | | | | | | Change AS::Callback to ActiveSupport::Callbacks in doc [ci skip]
| * | | Change AS::Callback to ActiveSupport::Callbacks in doc [ci skip]Alex Kitchens2016-06-141-1/+1
|/ / /
* | | Fix postgresql query_cache testArthur Neves2016-06-141-0/+1
| | |
* | | Respect the current `connected?` method when calling `cache`Arthur Neves2016-06-142-2/+17
| | | | | | | | | | | | | | | | | | Before we enable query caching we check if the connection is connected. Before this fix we were always checking against the main connection, and not the model connection.
* | | Remove not needed line on testArthur Neves2016-06-141-1/+0
| | |
* | | Merge pull request #25401 from jwgoh/docs/request-responseRichard Schneeman2016-06-141-2/+2
|\ \ \ | | | | | | | | Add Rack doc link for request and response object [ci skip]
| * | | Add Rack doc link for request and response object [ci skip]Jun Wan Goh2016-06-141-2/+2
|/ / /
* | | Merge pull request #25399 from ↵Robin Dupret2016-06-141-2/+2
|\ \ \ | | | | | | | | | | | | | | | | wynksaiddestroy/fix-typo-and-simply-after-commit-example [skip ci] Fix typo and simplify after_commit example
| * | | [skip ci] Fix typo and simplify after_commit examplewynksaiddestroy2016-06-141-2/+2
|/ / / | | | | | | | | | The beginning of the note on the :on option is not capitalised correctly. The :destroy symbol in the after_commit example is unnecessarily wrapped in an array.
* | | Fix error message to talk about the scale not precision of the typeRafael Mendonça França2016-06-131-1/+1
| | | | | | | | | | | | Fixes #25391
* | | Fix missing requires for object/blankRafael Mendonça França2016-06-132-1/+3
| | |
* | | Merge pull request #25390 from gsamokovarov/abstact-unit-presence-requireRafael França2016-06-131-0/+1
|\ \ \ | | | | | | | | Require "active_support/core_ext/object/blank" for railties abstract unit
| * | | Require "active_support/core_ext/object/blank" for railties abstract unitGenadi Samokovarov2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #25380 I moved an `active_support/core_ext/object/blank` in the `activesupport/lib/active_support/testing/assertions.rb`, however it caused a chain reaction, resulting in failing railties tests. Moving the require to `railties/test/isolation/abstract_unit.rb` and `activesupport/test/abstract_unit.rb`.
* | | | Remove deprecated arguments in assert_nothing_raisedRafael Mendonça França2016-06-132-6/+5
| | | |
* | | | Merge pull request #24756 from ↵Rafael Mendonça França2016-06-131-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | gsamokovarov/always-inherit-from-application-record Always genererate models with ApplicationRecord parent
| * \ \ \ Merge branch 'master' into always-inherit-from-application-recordGenadi Samokovarov2016-05-30323-6690/+8063
| |\ \ \ \
| * | | | | Always genererate models with ApplicationRecord parentGenadi Samokovarov2016-04-285-29/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if we generate a model while `app/model/application_record.rb` isn't present, we'll end up with a model with an `ActiveRecord::Base` parent _and_ a newly generated `app/models/application_record.rb`. While the behavior for choosing an `ActiveRecord::Base` was chosen for an easier migration math to 5.0, generating the `app/model/application_record.rb` file kinda contradicts with it. In any case, I think we should decide on a behavior and stick to it. Here, I'm changing the generated parent to always be `ApplicationRecord` and to always create `app/model/application_record.rb` if it doesn't exist.
* | | | | | Merge pull request #25319 from morgoth/generate-application-record-firstRafael França2016-06-135-28/+20
|\ \ \ \ \ \ | | | | | | | | | | | | | | Generate application_record.rb file before model file
| * | | | | | Generate application_record.rb file before model fileWojciech Wnętrzak2016-06-085-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously model file was generated first, which resulted in inheriting from `ActiveRecord::Base`, but since application_record.rb is generated as well, it should already be used.
* | | | | | | Merge pull request #25374 from ↵Sean Griffin2016-06-132-9/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/fix_calculate_with_string_in_from_and_eager_loading Fix `calculate` with a string value in `from` and eager loading
| * | | | | | | Fix `calculate` with a string value in `from` and eager loadingRyuta Kamizono2016-06-132-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `construct_relation_for_association_calculations` pass a string value to `construct_join_dependency` when setting a string value in `from`. It should not pass a string value, but always `joins_values`. Related #14834, #19452. Fixes #24193.
* | | | | | | | Explicitly require `acts_like` in AVSean Griffin2016-06-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method is used in `distance_of_time_in_words` Fixes #25357
* | | | | | | | Merge pull request #25372 from kamipo/remove_assert_date_from_dbSean Griffin2016-06-132-5/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove unnecessary `assert_date_from_db`
| * | | | | | | | Remove unnecessary `assert_date_from_db`Ryuta Kamizono2016-06-122-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `assert_date_from_db` was added at 6a2104d for SQL Server. But latest sqlserver adapter work to pass expected behavior since 8e4624b.
* | | | | | | | | Add codeclimate and rubocop config filesSean Griffin2016-06-132-0/+54
| |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to be experimenting with a new bot for them. This will not cause anything to start affecting new PRs yet, but it will have data sent to them so they can do "dry run" stuff on their end. The rubocop file is based on our documented style guide. I've only included rules which are either already consistently applied throughout the entire codebase, or where added lines should be following the guideline regardless of the surrounding code (such as hash syntax)
* | | | | | | | Merge pull request #25380 from gsamokovarov/drop-unused-blank-requireKasper Timm Hansen2016-06-131-2/+0
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove an unused require in ActiveSupport::TestCase
| * | | | | | | | Remove an unused require in ActiveSupport::TestCaseGenadi Samokovarov2016-06-131-2/+0
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | We used to have `assert_blank` and `assert_presence`. [ci skip]
* | | | | | | | Merge pull request #25378 from nikhilthombare/patch-1प्रथमेश Sonpatki2016-06-121-11/+11
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | Changed ActiveJob::Base to ApplicationJob in the Active Job guide [ci…
| * | | | | | | Changed ActiveJob::Base to ApplicationJob in the Active Job guide [ci skip] Nikhil Thombare2016-06-131-11/+11
|/ / / / / / / | | | | | | | | | | | | | | @prathamesh-sonpatki
* | | | | | | Merge pull request #25362 from maclover7/jm-rm-ar-requireEileen M. Uchitelle2016-06-121-2/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove unnecessary model requires
| * | | | | | | Remove unnecessary model requiresJon Moss2016-06-101-2/+0
| | | | | | | |
* | | | | | | | Merge pull request #25371 from kamipo/remove_outdated_commentEileen M. Uchitelle2016-06-121-12/+0
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Remove outdated comments [ci skip]
| * | | | | | | | Remove outdated comments [ci skip]Ryuta Kamizono2016-06-121-12/+0
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These comments were added at dd257a3ccb30ab181cd48d3d81bc7f23bb45f36f but outdated since #2086.
* | | | | | | | Merge pull request #25004 from ↵Eileen M. Uchitelle2016-06-125-0/+44
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | y-yagi/generate_mailer_layout_files_if_it_does_not_already_exist generate mailer layout files if it does not already exist
| * | | | | | | generate mailer layout files if it does not already existyuuji.yaginuma2016-05-155-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if `ApplicationMailer` does not exist, it is generated when run the mailer generator, but layouts files does not generate. However, because it uses the layouts in `ApplicationMailer`, layouts are required. Follow up to #24161
* | | | | | | | Merge pull request #25366 from prathamesh-sonpatki/update-release-notes-2Rafael França2016-06-111-1/+19
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add missing things to Rails 5.0 release notes [ci skip]
| * | | | | | | | Add missing things to Rails 5.0 release notes [ci skip]Prathamesh Sonpatki2016-06-111-1/+19
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - https://github.com/rails/rails/pull/18288. - https://github.com/rails/rails/commit/da9038e. - https://github.com/rails/rails/commit/78dab2a8569408658542e462a957ea5a35aa4679. - https://github.com/rails/rails/pull/9065. - https://github.com/rails/rails/pull/18314. - https://github.com/rails/rails/pull/13434.
* | | | | | | | Merge pull request #25367 from ↵Rafael França2016-06-112-1/+26
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stephenminded/active_job_test_helper_custom_queue_adapter Provide the ability to override the queue adapter used by jobs under test
| * | | | | | | | Provide the ability to override the queue adapter used by jobs underSteve Lounsbury2016-06-112-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test. This PR adds a method called `queue_adapter_for_test` to `ActiveJob::TestHelper`. This method is expected to provide the queue adapter to be used for jobs under test. It maintains the current behaviour by defaulting to an instance of `ActiveJob::QueueAdapter::TestAdapter`. Tests that include `ActiveJob::TestHelper` or extend from `ActiveJob::TestCase` can provide a custom queue adapter by overriding `queue_adapter_for_test` in their class.
* | | | | | | | | Merge pull request #25368 from frodsan/patch-1Rafael França2016-06-111-1/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Fix typo
| * | | | | | | | Fix typoFrancesco Rodriguez2016-06-121-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Merge pull request #25363 from kamipo/fix_or_result_sqlVipul A M2016-06-111-1/+1
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | Fix `or` result SQL [ci skip]
| * | | | | | | Fix `or` result SQL [ci skip]Ryuta Kamizono2016-06-111-1/+1
|/ / / / / / /