aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #22083 from thejamespinto/idempotent-route-generatorAndrew White2015-11-013-1/+20
|\ \ \ | |_|/ |/| | Route generator should be idempotent
| * | Route generator should be idempotent - closes #22082Thiago Pinto2015-10-313-1/+20
| | |
* | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-10-3114-28/+28
|\ \ \
| * | | Remove wrong period mark in `ActiveSupport::LogSubscriber` docs [ci skip]amitkumarsuroliya2015-10-111-1/+1
| | | |
| * | | Add missing punctuation mark in `ActiveSupport` docs [ci skip]amitkumarsuroliya2015-10-114-7/+7
| | | | | | | | | | | | It improves readability of docs
| * | | Fixed `ActiveSupport::NumberHelper` Outputs [ci skip]amitkumarsuroliya2015-10-111-2/+2
| | | |
| * | | Improved `KeyError` messages on bang version, since commit ↵amitkumarsuroliya2015-10-112-2/+2
| | | | | | | | | | | | | | | | https://github.com/rails/rails/commit/e768c519fb6015e00961702a5165c6dab548a954 bang version produces `KeyError` [ci skip]
| * | | Revert "Corrected ActiveSupport `time_with_zone` outputs [ci skip]"Rafael Mendonça França2015-10-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit efbd62f0c5c927a08e860b318b7bb561b2602a98. Right now Eastern Time zone is on daylight saving, so the output in the documentation is different but this doesn't mean that it is wrong. Daylight savings only happen in 3 months in a year so it is better to use the normal time zone in the documentation.
| * | | Corrected ActiveSupport `time_with_zone` outputs [ci skip]amitkumarsuroliya2015-10-111-7/+7
| | | |
| * | | Improved readability of Assertion docs, replaced ‘Assert’ -> ↵amitkumarsuroliya2015-10-093-12/+12
| | | | | | | | | | | | | | | | | | | | ‘Asserts’ at all places [ci skip] Following commit https://github.com/rails/docrails/commit/495722a95687e25114ae75608dd3107ac5d6611b
| * | | Replace `an UNIQUE` with `a UNIQUE` as UNIQUE doesn't have a vowel sound [ci ↵amitkumarsuroliya2015-10-072-2/+2
| | | | | | | | | | | | | | | | | | | | skip] `A UNIQUE` we pronounce URL as 'yu-ni-k’. We use this everywhere. So, be consistent with it.
| * | | Fixed wording in Assertion docs, changed ‘Assert’ -> ‘Asserts’Ronak Jangir2015-10-074-4/+4
| | | |
* | | | Merge pull request #22140 from jwworth/pull-request/fix-double-wordArun Agrawal2015-10-311-1/+1
|\ \ \ \ | | | | | | | | | | Fix double word 'be' [ci skip]
| * | | | Fix double word 'be' [ci skip]Jake Worth2015-10-311-1/+1
|/ / / /
* | | | Merge pull request #22136 from y-yagi/fix_changelog_formatArun Agrawal2015-10-311-2/+3
|\ \ \ \ | |_|/ / |/| | | minor formatting changes [ci skip]
| * | | minor formatting changes [ci skip]yuuji.yaginuma2015-10-311-2/+3
|/ / / | | | | | | | | | | | | * add newline for display the fenced code block * add "#" in the comments section
* | | split `process` from mailer instantiationAaron Patterson2015-10-302-5/+6
| | | | | | | | | | | | | | | this allows us to construct mailer objects without possibly disastrous side-effects.
* | | Merge pull request #22125 from k0kubun/left_joinsSean Griffin2015-10-305-3/+10
|\ \ \ | | | | | | | | Alias left_joins to left_outer_joins
| * | | Alias left_joins to left_outer_joinsTakashi Kokubun2015-10-315-3/+10
| | | |
* | | | Add tasks to automatize CHANGELOG headersRafael Mendonça França2015-10-301-2/+13
| | | |
* | | | :scissors:Rafael Mendonça França2015-10-301-1/+0
| | | |
* | | | Merge pull request #21251 from rodzyn/more_param_parser_testsSean Griffin2015-10-301-0/+14
|\ \ \ \ | | | | | | | | | | Add test for parsing application/vnd.api+json
| * | | | Add test for parsing application/vnd.api+jsonMarcin Olichwirowicz2015-08-211-0/+14
| | | | |
* | | | | Merge pull request #22128 from Sirupsen/config-for-envRafael França2015-10-303-2/+22
|\ \ \ \ \ | | | | | | | | | | | | rails/application: allow passing an env to config_for
| * | | | | rails/application: allow passing an env to config_forSimon Eskildsen2015-10-303-2/+22
|/ / / / /
* | | | | don't sleep in testsAaron Patterson2015-10-301-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | we should be using a countdown latch instead of rolling our own busy-loop.
* | | | | Merge pull request #22122 from ↵Sean Griffin2015-10-308-23/+322
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | samphilipd/sam/manual_locking_on_schema_migrations Make migrations concurrent safe (using advisory locks)
| * | | | | Use advisory locks to prevent concurrent migrationsSam Davies2015-10-308-23/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Addresses issue #22092 - Works on Postgres and MySQL - Uses advisory locks because of two important properties: 1. The can be obtained outside of the context of a transaction 2. They are automatically released when the session ends, so if a migration process crashed for whatever reason the lock is not left open perpetually - Adds get_advisory_lock and release_advisory_lock methods to database adapters - Attempting to run a migration while another one is in process will raise a ConcurrentMigrationError instead of attempting to run in parallel with undefined behavior. This could be rescued and the migration could exit cleanly instead. Perhaps as a configuration option? Technical Notes ============== The Migrator uses generate_migrator_advisory_lock_key to build the key for the lock. In order to be compatible across multiple adapters there are some constraints on this key. - Postgres limits us to 64 bit signed integers - MySQL advisory locks are server-wide so we have to scope to the database - To fulfil these requirements we use a Migrator salt (a randomly chosen signed integer with max length of 31 bits) that identifies the Rails migration process as the owner of the lock. We multiply this salt with a CRC32 unsigned integer hash of the database name to get a signed 64 bit integer that can also be converted to a string to act as a lock key in MySQL databases. - It is important for subsequent versions of the Migrator to use the same salt, otherwise different versions of the Migrator will not see each other's locks.
* | | | | | Fix test failures caused by #12071Sean Griffin2015-10-301-10/+10
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | This assumes only one query was ever executed, but it appears to sometimes be loading schema information. We can just look at the array of queries, rather than the "first" one that was run
* | | | | Merge pull request #11872 from AvnerCohen/log_namespaceSean Griffin2015-10-302-1/+14
|\ \ \ \ \ | | | | | | | | | | | | When testing cache issues, it is useful to log the actual key, including namespace
| * | | | | When logging Cache key, in debug mode, also log namespace, to create the ↵Avner Cohen2015-06-232-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | full key that actually used by the underline cache implementation
* | | | | | Merge pull request #12071 from Crunch09/outer_joinsSean Griffin2015-10-307-16/+176
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | added ActiveRecord::Relation#outer_joins
| * | | | | added ActiveRecord::Relation#left_outer_joinsFlorian Thomas2015-05-197-16/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: User.left_outer_joins(:posts) => SELECT "users".* FROM "users" LEFT OUTER JOIN "posts" ON "posts"."user_id" = "users"."id"
* | | | | | Add version constraint to database gem in generated applicationRafael Mendonça França2015-10-294-17/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are using the same version constraint in the database adapters so when a new version of the adapter that doesn't work with the version of rails is released we don't break new applications.
* | | | | | Revert "ActionController::Base#process() now only takes an action name"Aaron Patterson2015-10-293-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9f93a5efbba3e1cbf0bfa700a17ec8d1ef60d7c6.
* | | | | | Ensure `has_and_belongs_to_many` works with `belongs_to_required_by_default`Sean Griffin2015-10-293-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, if `ActiveRecord::Base.belongs_to_required_by_default` is set to `true`, then creating a record through `has_and_belongs_to_many` fails with the cryptic error message `Left side must exist`. This is because `inverse_of` isn't working properly in this case, presumably since we're doing trickery with anonymous classes in the middle. Rather than following this rabbit hole to try and get `inverse_of` to work in a case that we know is not publicly supported, we can just turn off this validation to match the behavior of 4.2 and earlier.
* | | | | | ActionController::Base#process() now only takes an action nameAaron Patterson2015-10-293-22/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rather than an action name and *args. The *args were not being used in regular applications outside tests. This causes a backwards compatibility issue, but reduces array allocations for most users.
* | | | | | switch to JSON.dump to avoid infinite recursionAaron Patterson2015-10-291-1/+1
| | | | | |
* | | | | | Add a changelog entry for #13008Sean Griffin2015-10-291-0/+4
| | | | | |
* | | | | | Merge pull request #13008 from ktheory/sanitize_orderSean Griffin2015-10-292-0/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Support SQL sanitization in AR::QueryMethods#order
| * | | | | | Support SQL sanitization in AR::QueryMethods#orderAaron Suggs2013-11-222-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for sanitizing arrays in SQL ORDER clauses. This is useful when using MySQL `ORDER BY FIELD()` to return records in a predetermined way. ```ruby Tag.order(['field(id, ?', [1,3,2]].to_sql # => SELECT "tags".* FROM "tags" ORDER BY field(id, 1,3,2) ``` Prior to this, developers must be careful to sanitize `#order` arguments themselves.
* | | | | | | use `dispatch` instead of `process` to run requests thougheileencodes2015-10-292-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `dispatch` sets the request and response on the controller for us automatically, so the test harness doesn't need to know the internals of how request / response is set. Conflicts: actionpack/lib/action_controller/test_case.rb
* | | | | | | Remove unnecessary methodeileencodes2015-10-291-3/+0
| | | | | | |
* | | | | | | Merge pull request #19511 from larskanis/replace_const_conn_paramsSean Griffin2015-10-291-7/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | PostgreSQL, Replace static connection param list by libpq's dynamic list
| * | | | | | | PostgreSQL, Replace static connection param list by the one built into libpq.Lars Kanis2015-03-251-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the connection adapter future-proof regarding to new parameters. To maintain backward compatibility, :requiressl is added by hand. It is deprecated by PostgreSQL since 2003, but still accepted by libpq.
* | | | | | | | Merge pull request #22121 from gocardless/patch-2Andrew White2015-10-292-12/+10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Set standard_conforming_strings with SET
| * | | | | | | | Don't disable errors when turning standard_conforming_strings onHarry Marr2015-10-292-12/+10
| | | | | | | | |
* | | | | | | | | Merge pull request #22119 from philr/time_with_zone_documentationAndrew White2015-10-291-4/+42
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | ActiveSupport::TimeWithZone documentation
| * | | | | | | | Fix the example given in the documentation for TimeWithZone#-Phil Ross2015-10-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stated value of `now` would actually give the same result for `now - 24.hours` and `now - 1.day`. Use an alternative value for `now` that demonstrates the difference between subtracting `24.hours` and `1.day`.
| * | | | | | | | Add documentation for TimeWithZone #ago and #advance.Phil Ross2015-10-291-0/+38
| | | | | | | | |