Commit Graph

58397 Commits

Author SHA1 Message Date
Jon Moss
80e819586b
Move code style configuration files to root directory
I think these are meant to be in the root directory, not in
`/activerecord`? 😬

r? @sgrif

[ci skip]
2016-06-16 22:17:46 -04:00
Arthur Nogueira Neves
267489a103 Merge pull request #24773 from ralinc/fix-silent-fail-on-psql-command
PostgreSQL: Fix db:structure:load silent failure on SQL error
2016-06-16 20:07:27 -04:00
Rafael Mendonça França
7291178265
Move quiet option to development.rb
This option is used in a initializer hook that runs before the
config/initializers files so it will not work if it is set there.
2016-06-16 17:01:55 -04:00
Matthew Draper
2ff5a1755f Merge pull request #25411 from javan/fix-digesting-different-formats
Fix digesting non-HTML templates with non-unique logical names
2016-06-17 01:40:40 +09:30
Rafael França
0d00ef96fb Merge pull request #25416 from alexcameron89/master
[ci skip] Remove duplicate alias documentation in ActiveModel::Validations
2016-06-16 11:13:27 -04:00
Alex Kitchens
92e8ede6df [ci skip] Remove duplicate alias documentation in ActiveModel::Validations 2016-06-16 09:15:44 -05:00
Javan Makhmali
57f87ae480 Add test for nested html dependencies with same logical name as templates for other formats 2016-06-15 18:25:18 -04:00
Javan Makhmali
fe381d21f7 Move and rename test 2016-06-15 18:25:18 -04:00
Javan Makhmali
1ee4eebb2b Fix finding templates for digesting for */* requests that render a non-default (html) template 2016-06-15 18:25:18 -04:00
Javan Makhmali
1717836e4f Explicity find with the rendered format to handle searching multiple view paths correctly 2016-06-15 18:25:18 -04:00
Javan Makhmali
2451177f37 Fix digesting templates with identical logical names when requesting a format other than the first default 2016-06-15 18:25:18 -04:00
Sean Griffin
7980b31bc6 Merge pull request #25271 from kamipo/prevent_range_error_for_exists
Prevent `RangeError` for `FinderMethods#exists?`
2016-06-15 18:22:34 -04:00
Ryuta Kamizono
1cf467b7a3 Prevent RangeError for FinderMethods#exists?
`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`.
2016-06-16 06:25:37 +09:00
Rafael França
61a7239e40 Merge pull request #25407 from pjscopeland/doc/correct-pg-example
Correct example in PostgreSQL guide
2016-06-15 17:01:23 -04:00
Patrick Copeland
acf9391c98 Example had results the wrong way round [ci skip] 2016-06-16 08:54:26 +12:00
Rafael França
d4514e3be1 Merge pull request #25339 from prathamesh-sonpatki/reuse-validate-index-length
Reuse validate index length
2016-06-15 15:28:25 -04:00
Rafael França
245fce127b Merge pull request #25402 from alexcameron89/master
Change AS::Callback to ActiveSupport::Callbacks in doc [ci skip]
2016-06-14 15:10:10 -04:00
Alex Kitchens
9bcaa2c154 Change AS::Callback to ActiveSupport::Callbacks in doc [ci skip] 2016-06-14 14:08:33 -05:00
Arthur Neves
1f63cd9190
Fix postgresql query_cache test 2016-06-14 13:06:30 -04:00
Arthur Neves
009b2a5434
Respect the current connected? method when calling cache
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.
2016-06-14 12:37:50 -04:00
Arthur Neves
596669cfac
Remove not needed line on test 2016-06-14 12:37:50 -04:00
Richard Schneeman
05e62a1447 Merge pull request #25401 from jwgoh/docs/request-response
Add Rack doc link for request and response object [ci skip]
2016-06-14 11:04:50 -05:00
Jun Wan Goh
bce690a49e Add Rack doc link for request and response object [ci skip] 2016-06-14 23:48:51 +08:00
Robin Dupret
5dfaf73d79 Merge pull request #25399 from wynksaiddestroy/fix-typo-and-simply-after-commit-example
[skip ci] Fix typo and simplify after_commit example
2016-06-14 15:28:54 +02:00
wynksaiddestroy
c4861cc67d [skip ci] Fix typo and simplify after_commit example
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.
2016-06-14 14:45:43 +02:00
Rafael Mendonça França
f27a932d6f
Fix error message to talk about the scale not precision of the type
Fixes #25391
2016-06-13 13:01:32 -04:00
Rafael Mendonça França
6e5b0a184d
Fix missing requires for object/blank 2016-06-13 13:01:32 -04:00
Rafael França
3ff1cfe13c Merge pull request #25390 from gsamokovarov/abstact-unit-presence-require
Require "active_support/core_ext/object/blank" for railties abstract unit
2016-06-13 12:11:00 -04:00
Genadi Samokovarov
4b80a96313 Require "active_support/core_ext/object/blank" for railties abstract unit
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`.
2016-06-13 19:07:30 +03:00
Rafael Mendonça França
4a7cd700b4
Remove deprecated arguments in assert_nothing_raised 2016-06-13 12:05:33 -04:00
Rafael Mendonça França
e29eb9feb5
Merge pull request #24756 from gsamokovarov/always-inherit-from-application-record
Always genererate models with ApplicationRecord parent
2016-06-13 11:25:55 -04:00
Rafael França
a9734859ce Merge pull request #25319 from morgoth/generate-application-record-first
Generate application_record.rb file before model file
2016-06-13 11:24:33 -04:00
Sean Griffin
1efc81ba8f Merge pull request #25374 from kamipo/fix_calculate_with_string_in_from_and_eager_loading
Fix `calculate` with a string value in `from` and eager loading
2016-06-13 11:03:38 -04:00
Sean Griffin
1f131fba4c Explicitly require acts_like in AV
This method is used in `distance_of_time_in_words`

Fixes #25357
2016-06-13 10:57:03 -04:00
Sean Griffin
2806203f10 Merge pull request #25372 from kamipo/remove_assert_date_from_db
Remove unnecessary `assert_date_from_db`
2016-06-13 10:53:15 -04:00
Sean Griffin
7d883b8293 Add codeclimate and rubocop config files
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)
2016-06-13 10:29:50 -04:00
Kasper Timm Hansen
01fc08f694 Merge pull request #25380 from gsamokovarov/drop-unused-blank-require
Remove an unused require in ActiveSupport::TestCase
2016-06-13 10:08:50 +02:00
Genadi Samokovarov
3d8b238dd8 Remove an unused require in ActiveSupport::TestCase
We used to have `assert_blank` and `assert_presence`. [ci skip]
2016-06-13 10:50:48 +03:00
प्रथमेश Sonpatki
b070a49e6b Merge pull request #25378 from nikhilthombare/patch-1
Changed ActiveJob::Base to ApplicationJob in the Active Job guide [ci…
2016-06-12 21:19:21 -07:00
Nikhil Thombare
891c3dfca5 Changed ActiveJob::Base to ApplicationJob in the Active Job guide [ci skip]
@prathamesh-sonpatki
2016-06-13 09:48:12 +05:30
Ryuta Kamizono
681a0a0299 Fix calculate with a string value in from and eager loading
`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.
2016-06-13 01:13:54 +09:00
Eileen M. Uchitelle
8a39123d5d Merge pull request #25362 from maclover7/jm-rm-ar-require
Remove unnecessary model requires
2016-06-12 09:22:17 -04:00
Eileen M. Uchitelle
2bfb3207de Merge pull request #25371 from kamipo/remove_outdated_comment
Remove outdated comments [ci skip]
2016-06-12 09:20:01 -04:00
Eileen M. Uchitelle
39fa2c5329 Merge pull request #25004 from y-yagi/generate_mailer_layout_files_if_it_does_not_already_exist
generate mailer layout files if it does not already exist
2016-06-12 09:18:46 -04:00
Ryuta Kamizono
4e545d0e43 Remove unnecessary assert_date_from_db
`assert_date_from_db` was added at 6a2104d for SQL Server.
But latest sqlserver adapter work to pass expected behavior since
8e4624b.
2016-06-12 20:54:03 +09:00
Ryuta Kamizono
5deb44d6ea Remove outdated comments [ci skip]
These comments were added at dd257a3ccb30ab181cd48d3d81bc7f23bb45f36f
but outdated since #2086.
2016-06-12 20:30:10 +09:00
Rafael França
8f8a07d7eb Merge pull request #25366 from prathamesh-sonpatki/update-release-notes-2
Add missing things to Rails 5.0 release notes [ci skip]
2016-06-11 18:27:54 -04:00
Rafael França
7f6af4b627 Merge pull request #25367 from stephenminded/active_job_test_helper_custom_queue_adapter
Provide the ability to override the queue adapter used by jobs under test
2016-06-11 18:24:25 -04:00
Rafael França
e5ba6b296b Merge pull request #25368 from frodsan/patch-1
Fix typo
2016-06-11 18:23:58 -04:00
Francesco Rodriguez
65f96f3805 Fix typo
[ci skip]
2016-06-12 00:22:36 +02:00