Commit Graph

58813 Commits

Author SHA1 Message Date
Rafael França
9fcfb86c42 Merge pull request #20818 from jeremywadsack/use_transactional_fixtures_all_databases
Use notification to ensure that lazy-loaded model classes have transactions
2016-07-17 04:19:23 -03:00
Rafael França
bad3a120f1 Merge pull request #25811 from oss92/to_sentence_fallback_string
Added :fallback_string option to Array#to_sentence
2016-07-17 04:14:12 -03:00
Rafael Mendonça França
2384317465
Enable a few more rubocop rules 2016-07-17 04:11:51 -03:00
Rafael França
28e7dfa86d Merge pull request #25650 from prathamesh-sonpatki/add-note-about-changelog-at-the-top
Add a note about adding CHANGELOG entries at the top of the file
2016-07-17 03:55:45 -03:00
Rafael França
9c2ca6c31c Merge pull request #25864 from vipulnsward/fix-ap-test
Fix failing requirement of duplicable in ParameterFilter
2016-07-17 03:50:19 -03:00
Rafael Mendonça França
b0770523e1
Merge pull request #25850 from ojab/layout_doc_fix
Mention that layout can call a Proc [ci skip]
2016-07-17 03:49:56 -03:00
Vipul A M
e0dbb99cb5
Fix failing requirement of duplicable in ParameterFilter 2016-07-16 23:36:30 -07:00
Rafael França
81b6bc9975 Merge pull request #25861 from vipulnsward/fix-grammer
Fix CHANGELOG grammar [ci skip]
2016-07-17 03:10:18 -03:00
Vipul A M
6a10978e68
Fix CHANGELOG grammar [ci skip] 2016-07-16 23:04:08 -07:00
Rafael França
6d645a8ec4 Merge pull request #25860 from prathamesh-sonpatki/add-cg-for-rails-initializers
CHANGELOG for https://github.com/rails/rails/pull/25257 [ci skip]
2016-07-17 03:01:41 -03:00
Prathamesh Sonpatki
91251fdcbd
CHANGELOG for https://github.com/rails/rails/pull/25257 [ci skip]
- Also minor weekly CHANGELOG cleanup.
2016-07-17 11:27:06 +05:30
Rafael França
c1e38d68a2 Merge pull request #25815 from greysteil/add-newline-between-structure-versions
Add newline between each migration in `structure.sql`
2016-07-16 20:01:27 -03:00
Eileen M. Uchitelle
821f6975da Merge pull request #25775 from junaruga/hotfix/actionpack-depending-on-activerecord
Remove unused activerecord requirement in actionpack.
2016-07-16 11:52:46 -04:00
Eileen M. Uchitelle
9fa0371e87 Merge pull request #25854 from prathamesh-sonpatki/fix-test-name
Fix wrong test name
2016-07-16 11:32:40 -04:00
Prathamesh Sonpatki
4c9f8ff10f
Fix wrong test name
- Followup of https://github.com/rails/rails/pull/23179
2016-07-16 15:16:50 +05:30
Vipul A M
4860fcc522 Merge pull request #25853 from CodingItWrong/remove-reference-indexes-in-docs
Update references generation docs to exclude index
2016-07-16 02:27:02 -07:00
Josh Justice
65132b9087 Update references generation docs to exclude index
In #23179 the migration generator was changed to no longer output `index: true` for `references` migrations. This updates the migrations guide to remove `index: true` from relevant examples.

[ci skip]
2016-07-16 05:23:17 -04:00
Vipul A M
4d74d4f354 Merge pull request #25851 from y-yagi/add_missing_braces
add missing braces [ci skip]
2016-07-15 19:03:46 -07:00
yuuji.yaginuma
777ae60ddf add missing braces [ci skip]
Also modify to use Ruby 1.9+ syntax.
2016-07-16 10:56:28 +09:00
ojab
80ac40c6d4 Mention that layout can call a Proc [ci skip]
Also document return values for Proc/Symbol arguments
2016-07-15 21:54:31 +00:00
Rafael França
d41d7a4214 Merge pull request #25826 from javan/actionview/trim-digestor-template-lookups
Eliminate extra template lookup in ActionView::Digestor
2016-07-15 16:29:17 -03:00
Arun Agrawal
4f567d8d45 Merge pull request #25845 from znz/fix-broken-link
Fix broken link [ci skip]
2016-07-15 18:22:09 +05:30
Kazuhiro NISHIYAMA
bd6d2ec604 Fix broken link 2016-07-15 21:31:33 +09:00
प्रथमेश Sonpatki
ea007832ec Merge pull request #25844 from tyamagu2/empty_typo
[ci skip] fix a typo
2016-07-15 16:32:39 +05:30
Yamaguchi.Tomoki
68d35960f3 [ci skip] fix a typo 2016-07-15 19:43:58 +09:00
Vipul A M
62514c5db7 Merge pull request #25831 from rbr/patch-1
Fix display of unsorted list in release notes of 5.0 [ci skip]
2016-07-14 11:40:31 -07:00
Aaron Patterson
b866be1680 Merge pull request #25816 from greysteil/check-path-param-encoding
Check `request.path_parameters` encoding at the point they're set
2016-07-14 10:40:58 -07:00
Grey Baker
9f38a3fb0c Check request.path_parameters encoding at the point they're set
Check for any non-UTF8 characters in path parameters at the point they're
set in `env`. Previously they were checked for when used to get a controller
class, but this meant routes that went directly to a Rack app, or skipped
controller instantiation for some other reason, had to defend against
non-UTF8 characters themselves.
2016-07-14 16:50:49 +01:00
Grey Baker
60ff98184e Add newline between each migration in structure.sql
Keeps schema migration inserts as a single commit, so we still get all of the
benefits of 42dd2336b3,
but allows for easier git diff-ing. Fixes #25504.
2016-07-14 16:49:03 +01:00
rbr
2f6832e2a2 Fix display of unsorted list in release notes of 5.0 [ci skip] 2016-07-14 16:56:13 +02:00
Claudio B
ea31bdd7c8 Merge pull request #25829 from geshafer/fix-typo-in-mailer-previews-test
Fix typo in mailer previews test description [ci skip]
2016-07-14 07:38:41 -07:00
Gale Shafer
c05127c2fc Fix typo in mailer previews test description [ci skip]
A mailer preview test description misspelled the word configuration.
This commit updates the test description to spell the word correctly.
2016-07-14 10:18:30 -04:00
Javan Makhmali
dbd3b0bfb3 Eliminate extra template lookup in ActionView::Digestor 2016-07-14 09:14:37 -04:00
Xavier Noria
df6684458b fixes a link in the release notes of 5.0 [ci skip] 2016-07-14 12:17:21 +02:00
Xavier Noria
5494af0c0f small reword [ci skip] 2016-07-14 09:42:10 +02:00
Xavier Noria
07d3b588df finders guide: updates the section about batch processing [ci skip]
There are several edits here, but in particular it updates the
guide to reflect 451437c.
2016-07-14 09:40:31 +02:00
Matthew Draper
a1ac08c2d9 Merge pull request #25798 from greysteil/dont-raise-unknown-http-method-low-in-stack
Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
2016-07-14 10:41:02 +09:30
Rafael França
853a041d5e Merge pull request #25817 from javan/fix-namespaced-implicit-render-etag-template-digest
Fix adding implicitly rendered namespaced template digests to ETags
2016-07-13 18:19:07 -03:00
Kasper Timm Hansen
85925931fb Merge pull request #25771 from kaspth/make-test-response-assign-response-parser
Let TestResponse assign a parser.
2016-07-13 21:22:19 +02:00
Javan Makhmali
03efd177a1 Fix adding implicitly rendered namespaced template digests to ETags 2016-07-13 15:07:49 -04:00
Xavier Noria
2bf36970a0 removes a unnecessary limit call
We are setting a limit unconditionally just below,
which overrides any existing one anyway.
2016-07-13 20:55:37 +02:00
oss92
b937c24edc Added :fallback_string option to Array#to_sentence 2016-07-13 20:19:26 +02:00
Grey Baker
25c1461766 Don't raise ActionController::UnknownHttpMethod from ActionDispatch::Static
The `ActionDispatch::Static` middleware is used low down in the stack to serve
static assets before doing much processing. Since it's called from so low in
the stack, we don't have access to the request ID at this point, and generally
won't have any exception handling defined (by default `ShowExceptions` is added
to the stack quite a bit higher and relies on logging and request ID).

Before 8f27d6036a
this middleware would ignore unknown HTTP methods, and an exception about these
would be raised higher in the stack. After that commit, however, that exception
will be raised here.

If we want to keep `ActionDispatch::Static` so low in the stack (I think we do)
we should suppress the `ActionController::UnknownHttpMethod` exception here,
and instead let it be raised higher up the stack, once we've had a chance to
define exception handling behaviour.

This PR updates `ActionDispatch::Static` so it passes `Rack::Request` objects to
`ActionDispatch::FileHandler`, which won't raise an
`ActionController::UnknownHttpMethod` error. If an unknown method is
passed, it should exception higher in the stack instead, once we've had a
chance to define exception handling behaviour.`
2016-07-13 17:52:36 +01:00
Xavier Noria
451437c6f5 adds support for limits in batch processing 2016-07-13 18:23:13 +02:00
Matthew Draper
3b55ac22c9 Merge pull request #25799 from greysteil/wrap-rack-params-exceptions
Handle `Rack::QueryParser` errors in `ActionDispatch::ExceptionWrapper`
2016-07-14 00:58:30 +09:30
Guillermo Iguaran
3e18af6916 Merge pull request #25795 from mechanicles/command-importance
Give importance to rails command [ci skip]
2016-07-13 09:16:04 -05:00
Santosh Wadghule
e73b5cf51b Give importance to rails command in the comment section. 2016-07-13 19:13:05 +05:30
Vipul A M
e1915e712d Merge pull request #25748 from CodingItWrong/generator-field-types-link
Correct link for model generator field types
2016-07-13 01:18:12 -07:00
Josh Justice
5ae7fc5e40 Correct link for model generator field types
The most complete list of field types appears in the `SchemaStatements` docs rather than the `TableDefinition` docs.

The change to link to `SchemaStatements` means that the explanation for the `index` parameter is no longer available on the linked-to page. A brief explanation of the `index` parameter is added directly in the guide to make up for this.
2016-07-13 04:15:04 -04:00
Jeremy Wadsack
31a8588a01 Create connection.active_record notification and use that to ensure that lazy-
loaded model classes have their connections wrapped in transactions.

See #17776

In Rails 4 config.eager_load was changed to false in the test environment. This
means that model classes that connect to alternate databases with
establish_connection are not loaded at start up. If use_transactional_fixtures
is enabled, transactions are wrapped around the connections that have been
established only at the start of the test suite. So model classes loaded later
don't have transactions causing data created in the alternate database not to
be removed.

This change resolves that by creating a new connection.active_record
notification that gets fired whenever a connection is established. I then added
a subscriber after we set up transactions in the test environment to listen for
additional connections and wrap those in transactions as well.
2016-07-12 23:35:29 -07:00