Commit Graph

62158 Commits

Author SHA1 Message Date
Dmytro Vasin db65f73f2e Fix mistake in JS response parser:
-
  Restore ability to accept ecmascript
  JS response should not modify DOM.
2017-04-13 16:58:36 +03:00
Ryuta Kamizono faca40dfd4 ✂️
[ci skip]
2017-04-13 07:15:04 +09:00
Matthew Draper 92ba89dbcc Merge pull request #28726 from matthewd/transaction-locking
Add comprehensive locking around DB transactions
2017-04-13 05:37:38 +09:30
Andrew White 2a3b3d21fc Merge pull request #28712 from kamipo/tweaks_28678
Tweaks #28678
2017-04-12 17:54:36 +01:00
Matthew Draper 0eb21874cb Merge pull request #28740 from matthewd/old-postgres
Use a query that's compatible with PostgreSQL 9.2
2017-04-13 01:51:52 +09:30
Matthew Draper 7384771dd0 Use a query that's compatible with PostgreSQL 9.2
Also, explicitly apply the order: generate_subscripts is unlikely to
start returning values out of order, but we should still be clear about
what we want.
2017-04-12 23:38:57 +09:30
Jon Moss 2b4583f2a2 Move CHANGELOG.md entry from Active Support to Action Pack
Was looking through #28402, and realized the CHANGELOG.md entry is in the wrong
place. Sorry we didn't catch this during code review 😢

[ci skip]
2017-04-11 18:52:02 -04:00
Rafael Mendonça França d4692c92c3
✂️
[ci skip]
2017-04-11 18:48:53 -04:00
Rafael França 15c4306cf1 Merge pull request #28731 from y-yagi/fix_rubocop_violations
Fix rubocop violations
2017-04-11 18:45:32 -04:00
yuuji.yaginuma fb9e846be9 Fix rubocop violations 2017-04-12 07:41:59 +09:00
Rafael França afb41fbefa Merge pull request #28402 from jules2689/action-controller-api-base-hooks
Add `action_controller_base` and `action_controller_api` hooks to mitigate differences between them. Also document Active Support on_load hooks
2017-04-11 18:24:31 -04:00
Matthew Draper fff414ede7 Merge pull request #28729 from matthewd/dont-freeze-inputs
Don't freeze input strings
2017-04-12 07:33:11 +09:30
Rafael França acc5a55118 Merge pull request #28722 from DmytroVasin/rails-ujs-default-url
rails-ujs: missing default url for ajax requests.
2017-04-11 17:36:14 -04:00
Matthew Draper 8de7df5b22 Don't freeze input strings
See 34321e4a43 for background on
ImmutableString vs String.

Our String type cannot delegate typecasting to ImmutableString, because
the latter freezes its input: duplicating the value after that gives us
an unfrozen result, but still mutates the originally passed object.
2017-04-12 03:14:09 +09:30
Rafael França 2fa1d2c121 Merge pull request #28728 from dskecse/update-documentation-on-routing
Update routing doc on the `get` `to:` option [ci skip]
2017-04-11 12:37:45 -04:00
Dzianis Dashkevich 04b9d68297
Update routing doc on the `get` `to:` option [ci skip] 2017-04-11 18:50:05 +03:00
Rafael França e426bc2233 Merge pull request #28721 from koic/oracle_does_not_support_limit_clause
Fix an AR test of relations_test when using Oracle
2017-04-11 11:30:39 -04:00
Koichi ITO 66cc3c7aa7 Fix an AR test of relations_test when using Oracle 2017-04-11 15:44:05 +09:00
Dmytro Vasin dc8ddea563 Set current page as default for ajax requests 2017-04-11 06:56:52 +03:00
Julian Nadeau 8ca42638bc
Add Documentation for Active Support On Load Hooks 2017-04-10 19:34:49 -04:00
Julian Nadeau 35fac87123
Add action_controller_api, action_controller_base on_load hook 2017-04-10 19:34:48 -04:00
Matthew Draper e4c197c769 Add comprehensive locking around DB transactions
Transactional-fixture using tests with racing threads and inter-thread
synchronisation inside transaction blocks will now deadlock... but
without this, they would just crash.

In 5.0, the threads didn't share a connection at all, so it would've
worked... but with the main thread inside the fixture transaction, they
wouldn't've been able to see each other.

So: as far as I can tell, the set of operations this "breaks" never had
a compelling use case. Meanwhile, it provides an increased level of
coherency to the operational feel of transactional fixtures.

If this does cause anyone problems, they're probably best off disabling
transactional fixtures on the affected tests, and managing transactions
themselves.
2017-04-11 08:10:24 +09:30
Jon Moss c134a17b3d Remove link to rack.github.io
We mention the "resources" section of the guide in the next paragraph,
and the link is listed there. IMHO we shouldn't list it twice.

[ci skip]
2017-04-10 11:05:05 -04:00
Jon Moss 374dca2d66 Small grammar fixes
[ci skip]
2017-04-10 11:04:38 -04:00
Jon Moss 8801108c0f Pluralize callback
Users could have more than one `before_destroy` callback in their models.

[ci skip]
2017-04-10 10:44:18 -04:00
Jon Moss e8ee2187ae Merge pull request #28680 from vishalzambre/callback_doc_update
Documented issue related before_destroy with dependent: :destroy
2017-04-10 09:28:42 -05:00
vishalzambre a1d1675106 [ci skip] documented issue related before_destroy
Updated text
2017-04-10 11:27:01 +05:30
Josh Pencheon 2144e70a86 Implement `fetch_values` for HashWithIndifferentAccess (#28316)
`fetch_values` was added to Hash in Ruby 2.3.0:
  https://bugs.ruby-lang.org/issues/10017

This patch adds an implemention for instances of HWAI, in line
with the existing definitions of `fetch` and `values_at`.
2017-04-10 10:20:13 +09:30
Boris Slobodin 24ac36be71 exclude ORDER BY clause for exists? (#28699) 2017-04-10 08:35:13 +09:30
Matthew Draper ee0f5c3f59 Merge pull request #28713 from kamipo/expose_queries_for_association_queries
Expose `queries` for `AssociationQueryValue` and `PolymorphicArrayValue`
2017-04-10 03:02:12 +09:30
Matthew Draper d928126725 delegate_missing_to should fall back to super 2017-04-09 20:07:12 +09:30
Matthew Draper 071882e8ef delegate_to_missing doesn't delegate private methods
So we shouldn't claim they're there, even when asked explicitly.
2017-04-09 20:00:12 +09:30
Kasper Timm Hansen 81555776d4 Merge pull request #28697 from y-yagi/remove_duplicated_delivery_method_definition
Remove duplicated `delivery_method` definition
2017-04-09 11:45:14 +02:00
Ryuta Kamizono cc0b566a61 Expose `queries` for `AssociationQueryValue` and `PolymorphicArrayValue` 2017-04-09 16:59:26 +09:00
Ryuta Kamizono 1d05e64b6d Tweaks #28678
* Fix the comment on `formatted_version`
* Extract `define_params`
* Remove duplicated guard clause for `@version`
2017-04-09 14:59:11 +09:00
Jon Moss 3b5a6dfb18 Add text to "Upgrading to Rails 5.1"
[ci skip]
2017-04-08 20:52:07 -04:00
Jon Moss f785ad786a Add scaffolding for different sections in 5.1 release notes
[ci skip]
2017-04-08 17:10:42 -04:00
Rafael França bb13c37fef Merge pull request #28678 from hedgesky/use_formatted_number_as_schema_version
use formatted number as schema version
2017-04-08 14:40:37 -04:00
Rafael França f5d8808669 Merge pull request #28705 from kamipo/extract_construct_relation_for_exists
Extract `construct_relation_for_exists` in `FinderMethods`
2017-04-08 14:11:05 -04:00
Ryuta Kamizono 0da696a5e3 Extract `construct_relation_for_exists` in `FinderMethods`
To ease to customize a relation for `exists?`.
2017-04-09 02:33:47 +09:00
Matthew Draper 24eb450d75 Drop the "Sanity Check" contributing step 2017-04-09 00:55:13 +09:30
Matthew Draper 668f8691f1 Remove mentions and instructions for docrails
It's been retired; all contributions now come in via PRs.
2017-04-09 00:55:13 +09:30
Ryuta Kamizono a76f5189f6 More exercise `exists?` tests 2017-04-08 22:35:25 +09:00
Rafael França 28079868d0 Merge pull request #28692 from kmcphillips/master
Calling fixture accessor method with no arguments returns all fixtures rather than empty array
2017-04-07 14:16:30 -04:00
Rafael Mendonça França 8f0d855189
Spaces 2017-04-07 13:55:54 -04:00
Rafael Mendonça França 866fc6a4e2
More ✂️ 2017-04-07 13:54:30 -04:00
Rafael França c597c3eb93 ✂️ 2017-04-07 13:51:30 -04:00
claudiob 0b4ff7eacf Fix Guides to include #23138 [ci skip]
A long-standing bug has been fixed in Rails 5.1 by @pixeltrix
See https://github.com/rails/rails/blame/5-1-stable/actionpack/CHANGELOG.md#L52-L64

This PR updates the guides accordingly.

Before:
<img width="799" alt="before" src="https://cloud.githubusercontent.com/assets/10076/24809105/4ec7066c-1b73-11e7-98c6-c709c3465306.png">

After:
<img width="799" alt="after" src="https://cloud.githubusercontent.com/assets/10076/24809109/50b21188-1b73-11e7-8a1a-32c3d0ed512a.png">
2017-04-07 09:23:18 -07:00
Kevin McPhillips 06f45435da Passing in no arguments to the dynamic fixture accessor method returns all fixtures, not an empty array. 2017-04-07 10:06:40 -04:00
yuuji.yaginuma e4cf71bf7a Remove duplicated `delivery_method` definition
`ActionMailer::Base.delivery_method` is already defined in
https://github.com/rails/rails/blob/master/actionmailer/test/parameterized_test.rb#L13
2017-04-07 21:58:08 +09:00