Commit Graph

55925 Commits

Author SHA1 Message Date
Matthew Draper 7363ad43f5 Allow subscription adapters to be shut down 2016-01-24 19:00:06 +10:30
Matthew Draper b17a7e4c4d Add Async and Inline adapters
Just like their ActiveJob equivalents, these only work within the
current process.
2016-01-24 15:52:47 +10:30
Matthew Draper e81bb80cb4 Normalize on no arguments for the success callback 2016-01-24 15:52:47 +10:30
Matthew Draper dccc15d403 Split internal subscriber tracking from Postgres adapter 2016-01-24 15:52:47 +10:30
Andrew White 83d2c39d5e Add environment back to db:structure:load
Because of the changes in #22967 the assumption in #18907 is no longer
true because the internal metadata feature for Active Record requires
a working environment.
2016-01-23 19:14:39 +00:00
Eileen M. Uchitelle 75a8973c7a Merge pull request #23102 from yui-knk/foreign_type_to_singular_association
Define `:foreign_type` as a valid option in `SingularAssociation`
2016-01-23 11:48:41 -05:00
Sean Griffin 67c1719012 Use the database type to deserialize enum
This fixes incorrect assumptions made by e991c7b that we can assume the
DB is already casting the value for us. The enum type needs additional
information to perform casting, and needs a subtype.

I've opted not to call `super` in `cast`, as we have a known set of
types which we accept there, and the subtype likely doesn't accept them
(symbol -> integer doesn't make sense)

Close #23190
2016-01-23 08:44:16 -07:00
Andrew White 8de32bb252 Document scoping issue with Time.use_zone
The Time.use_zone method will only affect ActiveSupport::TimeWithZone
instances created inside of the block passed to Time.use_zone. This
could be confusing when fetching a model and then reading the attribute
before the block and it not changing afterwards because Active Record
caches the conversion from the database value.

Since changing the behavior of Active Record to recreate the value on
every attribute read is an expensive operation the best we can do is
to document the issue.

Fixes #23195.

[ci skip]
2016-01-23 15:01:55 +00:00
Kasper Timm Hansen 39ea2b09ed Merge pull request #23206 from joyvuu-dave/action_cable_api_fix
prevent --skip-action-cable from erroring when --api option is used
2016-01-23 08:21:41 +01:00
Dave Riddle 578af21a41 prevent --skip-action-cable from erroring when --api option is used 2016-01-22 22:39:01 -08:00
प्रथमेश Sonpatki 4fdc56d578 Merge pull request #23207 from y-yagi/fix_path_of_actioncable_config
fix path of Action Cable configuration file [ci skip]
2016-01-23 11:42:40 +05:30
yuuji.yaginuma 57a1abafdb fix path of Action Cable configuration file [ci skip]
This changed in #22950.
2016-01-23 15:01:32 +09:00
Vijay Dev f3cf476f8c Merge branch 'master' of github.com:rails/docrails 2016-01-22 20:14:43 +00:00
Jon Moss 9bb5f5fbe1 Merge pull request #23201 from dkniffin/patch-1
Move ApplicationCable::Channel section of readme
2016-01-22 14:26:05 -05:00
Derek Kniffin 08ac76d1ad Move ApplicationCable::Channel section of readme
I believe the paragraph starting with "This relies" belongs with the one above it.
2016-01-22 14:01:44 -05:00
Jon Moss f6925137a4 Merge pull request #23126 from Gaurav2728/implement_rake_to_rails_taks_in_doc
Rails 5.0+ rake commands implemented in Rails Framework itself. We pr…
2016-01-22 12:43:01 -05:00
Matthew Draper cf1cf0287a Merge pull request #23194 from britg/patch-2
Use the correct reference to the redis connection
2016-01-23 03:33:14 +10:30
Brit Gardner 2bc0c7ca02 Use the correct reference to the redis connection
Fixes #23193

This was throwing `There was an exception - NameError(undefined local variable or method `hi_redis_conn' for #<ActionCable::SubscriptionAdapter::Redis:0x007fb1449e2b70>)` on unsubscribe.
2016-01-22 10:59:44 -06:00
Gaurav Sharma ca339cc8fd Rails 5.0+ rake commands implemented in Rails Framework itself. We prefer to use bin/rails instead of rake [ci skip] 2016-01-22 22:20:03 +05:30
Jon Moss 84461db61e Merge pull request #23177 from vipulnsward/testing-pass-1
First pass over parts of Testing guide
2016-01-22 10:46:29 -05:00
Jon Moss 9e4534c473 Merge pull request #23182 from palkan/add-docs-tsrange
[ci skip] Add note about tsrange and timezone awareness to docs
2016-01-22 07:37:33 -05:00
palkan 21f0136fc7 [ci skip] Add note about tsrange and timezone awareness to docs 2016-01-22 14:35:52 +03:00
Andrew White 8383f79d92 Merge pull request #23178 from vipulnsward/rm-changelog
rm changelog for unreleased changes fixes
2016-01-22 08:49:54 +00:00
Andrew White a2a6806063 Merge pull request #23180 from y-yagi/remove_per_form_csrf_tokens_initializer_from_rails_api
remove `per_form_csrf_tokens` initializer from Rails API
2016-01-22 08:47:30 +00:00
yuuji.yaginuma 82deb76882 remove `per_form_csrf_tokens` initializer from Rails API
Because the form is not in the Rails API,
`per_form_csrf_tokens` initializer I think unnecessary.
2016-01-22 17:14:43 +09:00
Vipul A M 48c03c59c3 rm changelog for unreleased changes fixes
Based on https://github.com/rails/rails/pull/23167/files#r50507317

[ci skip]
2016-01-22 12:43:03 +05:30
Vipul A M 86a3a54915 First pass over parts of Testing guide
- Grammar improvements
- Consistent usage of you or we in sentences
- Tests can have zero or more assertions. Its not mandatory to have one.
- Example for assert_send

[ci skip]
2016-01-22 12:36:13 +05:30
Kasper Timm Hansen 5d9e923d27 Merge pull request #23174 from JuanitoFatas/followup-skip-action-cable
Remove action_cable_meta_tag when skip Action Cable
2016-01-22 08:00:01 +01:00
Kasper Timm Hansen 24a316d15f Merge pull request #23175 from maclover7/add-ac-appgen-test
Add `config/cable.yml` to list of default files in Rails generator
2016-01-22 07:56:34 +01:00
Matthew Draper a688c0317d Merge pull request #23080 from prathamesh-sonpatki/fix-cache-key-for-loaded-empty-collection
Fix ActiveRecord::Relation#cache_key for loaded empty collection
2016-01-22 16:07:59 +10:30
Jon Moss a161b8e7f7 Add `config/cable.yml` to list of default files in Rails generator 2016-01-21 21:30:54 -05:00
JuanitoFatas cd0d649dc4 Remove action_cable_meta_tag when skip action_cable 2016-01-22 10:21:37 +08:00
Rafael França 6fcc3c47eb Merge pull request #23167 from maclover7/fix-21032
Fix `ActionController::Parameters#==` bug
2016-01-21 17:34:55 -05:00
Jon Moss 627f736cc0 Fix `ActionController::Parameters#==` bug
See bug #21032.
2016-01-21 17:28:18 -05:00
Rafael França 77e1b0eb3a Merge pull request #23078 from y-yagi/add_application_mailer_rb_to_mountable_engine
add application_mailer.rb to template of mountable engine
2016-01-21 17:21:33 -05:00
Jon Moss 7fa3976867 Merge pull request #23165 from shakib609/fix-23157
[ci skip] fix #23157
2016-01-21 15:38:20 -05:00
Sean Griffin 6efb39456a Use bind parameters for ranges in where clauses
This is a similar case to wanting ot use bind params for limit and
offset. Right now passing a range grows the amount of prepared
statements in an unbounded fashion. We could avoid using prepared
statements in that case, similar to what we do with arrays, but there's
a known number of variants for ranges.

This ends up duplicating some of the logic from Arel for how to handle
potentially infinite ranges, and that behavior may be removed from Arel
in the future.

Fixes #23074
2016-01-21 13:27:40 -07:00
Shakib Hossain 6b42667607 [ci skip] fix #23157 2016-01-22 02:25:55 +06:00
Kasper Timm Hansen 71d6826d29 Merge pull request #23164 from vipulnsward/warning-from-renderers-test
Fix warning introduced in API response fix
2016-01-21 20:34:12 +01:00
Vipul A M 9b3dc9d850 - Fix warning introduced in 77acc004ef when fixing API responses.
- render :text is deprecated, so added an assertion for it.
2016-01-22 00:38:12 +05:30
Guillermo Iguaran 9a99c7cef5 Merge pull request #23156 from plentz/patch-1
updating secrets.yml template to use rails command instead of rake
2016-01-21 09:28:28 -05:00
Diego Plentz 98186f5534 updating secrets.yml template to use rails command instead of rake 2016-01-21 11:50:15 -02:00
प्रथमेश Sonpatki 4f62597800 Merge pull request #23154 from sealocal/improve-docs-for-respond-to
Improve Docs for ActionController::MimeResponds#respond_to
2016-01-21 14:47:18 +05:30
sealocal 27a4e9345f remove doc reference to ActionController::MimeResponds#respond_to 2016-01-20 23:41:07 -08:00
sealocal 36b359f816 document simple example of ActionController::MimeResponds#respond_to 2016-01-20 23:39:46 -08:00
Santiago Pastorino e5b9b7d25d Merge pull request #23149 from maclover7/fix-23142
Re-add ActionController::ApiRendering
2016-01-21 00:17:15 -03:00
Jon Moss c555c03bc1 Merge pull request #23150 from alxndr/guides-tweak
insert newlines into code samples in Upgrading section of Asset Pipeline doc
2016-01-20 20:13:34 -05:00
Alexander 7c643d9fcf insert newlines into code samples
[ci skip]
2016-01-20 17:06:02 -08:00
Jon Moss 77acc004ef Re-add ActionController::ApiRendering
- Fixes bug #23142.
- Bug was occurring only with ActionController::API, because `_process_options` wasn't being run for API requests, even though it was being run for normal app requests.
2016-01-20 19:16:23 -05:00
Aaron Patterson 06397336b2 Merge pull request #23140 from rails/fix-search-for-custom-routes
Fix marking of custom routes for Journey
2016-01-20 15:14:13 -08:00