aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add note about broadcast_to/broadcasting_for to change logVladimir Dementyev2019-01-222-1/+25
|
* Add Channel#broadcast_toVladimir Dementyev2019-01-222-2/+2
|
* Move `channel_name` to Channel.broadcasting_forVladimir Dementyev2019-01-225-14/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That would allow us to test broadcasting made with channel, e.g.: ```ruby class ChatRelayJob < ApplicationJob def perform_later(room, msg) ChatChannel.broadcast_to room, message: msg end end ``` To test this functionality we need to know the underlying stream name (to use `assert_broadcasts`), which relies on `channel_name`. We had to use the following code: ```ruby assert_broadcasts(ChatChannel.broadcasting_for([ChatChannel.channel_name, room]), 1) do ChatRelayJob.perform_now end ``` The problem with this approach is that we use _internal_ API (we shouldn't care about `channel_name` prefix in our code). With this commit we could re-write the test as following: ```ruby assert_broadcasts(ChatChannel.broadcasting_for(room), 1) do ChatRelayJob.perform_now end ```
* Merge pull request #35020 from alkesh26/ationpack-typo-fixesRafael França2019-01-223-6/+6
|\ | | | | Actionpack typo fixes.
| * 1. Replaced unused variables by `_`.alkesh262019-01-223-6/+6
| | | | | | | | 2. Typo fixes.
* | Merge pull request #34952 from rails/template-stuffAaron Patterson2019-01-2211-82/+43
|\ \ | |/ |/| Template Handler Refactoring
| * Ask the view for its method containerAaron Patterson2019-01-182-5/+5
| | | | | | | | | | | | Rather than doing is_a? checks, ask the view object for its compiled method container. This gives us the power to replace the method container depending on the instance of the view.
| * Directly include "CompiledTemplates" moduleAaron Patterson2019-01-182-5/+6
| | | | | | | | | | We always want to include this module. It'll be used in production (maybe)
| * Only cache the view_context_class in one placeAaron Patterson2019-01-182-4/+9
| | | | | | | | | | | | | | This patch removes the instance writer of view_context_class. Subclasses may override it, but it doesn't need to be written. This also eliminates the need to cache the return value of the class level `view_context_class` method.
| * Remove args from `default_render`Aaron Patterson2019-01-172-3/+3
| | | | | | | | It's always called with 0 params, so just remove the parameter
| * Templates should be eval'd in the context of an AV::Base objectAaron Patterson2019-01-171-55/+0
| |
| * Pull up virtual path assignmentAaron Patterson2019-01-162-5/+3
| |
| * Pull buffer assignment upAaron Patterson2019-01-162-1/+2
| | | | | | | | | | Since everything goes through a `run` method, we can pull the buffer assignment up.
| * Always evaluate views against an ActionView::BaseAaron Patterson2019-01-165-9/+18
| | | | | | | | | | Methods created by views should always be evaluated against an AV::Base instance. This way we can extract and refactor things in to classes.
| * Pull output buffer conditional upAaron Patterson2019-01-162-2/+4
| | | | | | | | | | | | This pulls the "output buffer existence" conditional up. Instead of evaling the same conditional over and over, we can pull it in to "only compiled once" Ruby code.
* | Merge pull request #34997 from alkesh26/typo-fix-webserverEileen M. Uchitelle2019-01-227-9/+9
|\ \ | | | | | | Replaced webserver with web server
| * | Changed webserver to web server.alkesh262019-01-227-9/+9
| | |
* | | Merge pull request #35006 from kddeisz/alias-case-nodesRyuta Kamizono2019-01-222-0/+12
|\ \ \ | | | | | | | | Alias case nodes
| * | | Alias case nodesKevin Deisz2019-01-212-0/+12
| | | | | | | | | | | | | | | | When `Arel` was merged into `ActiveRecord` we lost the ability to alias case nodes. This adds it back.
* | | | Merge pull request #34990 from rails/fix-time-multiparameter-castingAndrew White2019-01-214-1/+52
|\ \ \ \ | |/ / / |/| | | Fix year value when casting a multiparameter time hash
| * | | Fix year value when casting a multiparameter time hashAndrew White2019-01-214-1/+52
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning a hash to a time attribute that's missing a year component (e.g. a `time_select` with `:ignore_date` set to `true`) then the year defaults to 1970 instead of the expected 2000. This results in the attribute changing as a result of the save. Before: event = Event.new(start_time: { 4 => 20, 5 => 30 }) event.start_time # => 1970-01-01 20:30:00 UTC event.save event.reload event.start_time # => 2000-01-01 20:30:00 UTC After: event = Event.new(start_time: { 4 => 20, 5 => 30 }) event.start_time # => 2000-01-01 20:30:00 UTC event.save event.reload event.start_time # => 2000-01-01 20:30:00 UTC
* | | Merge pull request #35005 from bogdanvlviv/add-chanel-tests-to-rails-statsRyuta Kamizono2019-01-212-1/+2
|\ \ \ | | | | | | | | Add Channel tests to `rails stats`
| * | | Add Channel tests to `rails stats`bogdanvlviv2019-01-212-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails generates `test/channels`(#34933) and even allows `rails test:channels` (#34947). `rails stats` has been providing info about `app/channels`, it makes sense to add `test/channels` as well. (I've changed test because we generate `test/channels` with some code)
* | | | Merge pull request #35004 from ↵Ryuta Kamizono2019-01-211-0/+8
|\ \ \ \ | |/ / / |/| | | | | | | | | | | bogdanvlviv/add-missing-entries-to-guides-changelog-file Add missing entries to guides' changelog file [ci skip]
| * | | Add missing entries to guides' changelog file [ci skip]bogdanvlviv2019-01-211-0/+8
|/ / / | | | | | | | | | | | | | | | | | | We added "Action Mailbox Basics", "Action Text Overview" guides(#34812, #34878) I think it makes to mention about it in the changelog file. (Similar to 7200ec92f8) Note that entries retain original author since I just moved content from readme files to the guides.
* | | Merge pull request #34982 from takeyuweb/fix_activestorage_allow_other_hostGeorge Claghorn2019-01-214-2/+57
|\ \ \ | | | | | | | | Fix ArgumentError when using S3Service
| * | | Fix ArgumentError: Unsafe redirectYuichi Takeuchi2019-01-214-2/+57
| | | |
* | | | Merge pull request #34991 from mcgregordan/mailbox-statisticsRyuta Kamizono2019-01-201-0/+2
|\ \ \ \ | |_|/ / |/| | | Report statistics for app/mailboxes
| * | | Report statistics from ActionMailboxDan McGregor2019-01-201-0/+2
|/ / /
* | | Merge pull request #34988 from bogdanvlviv/fix-development_dependencies_installRyuta Kamizono2019-01-201-1/+0
|\ \ \ | | | | | | | | Update "Development Dependencies Install" guide [ci skip]
| * | | Fix "Development Dependencies Install" guide [ci skip]bogdanvlviv2019-01-191-1/+0
| | | | | | | | | | | | | | | | | | | | Since we use [workspaces](https://yarnpkg.com/lang/en/docs/workspaces/) `yarn install` from the root should install all the javascript dependencies.
* | | | Fix type casting column default in `change_column`Ryuta Kamizono2019-01-204-28/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since #31230, `change_column` is executed as a bulk statement. That caused incorrect type casting column default by looking up the before changed type, not the after changed type. In a bulk statement, we can't use `change_column_default_for_alter` if the statement changes the column type. This fixes the type casting to use the constructed target sql_type. Fixes #34938.
* | | | Merge pull request #34986 from alkesh26/action-mailbox-layout-fixGeorge Claghorn2019-01-191-0/+1
|\ \ \ \ | | | | | | | | | | Enclosing body tag in conductor layout.
| * | | | enclosing body tag in conductor layout.alkesh262019-01-201-0/+1
|/ / / /
* | | | Check all provided attributes of the messageGeorge Claghorn2019-01-191-9/+11
| | | |
* | | | Merge pull request #34984 from takeyuweb/fix-actionmailbox-create-inbound-emailsGeorge Claghorn2019-01-192-2/+23
|\ \ \ \ | |_|/ / |/| | | Fix that adding attachments lose a body
| * | | Fix that adding attachments lose a bodyYuichi Takeuchi2019-01-192-2/+23
|/ / /
* | | Merge pull request #34981 from koic/bump_rubocop_to_0_63_0Ryuta Kamizono2019-01-192-6/+6
|\ \ \ | | | | | | | | Bump RuboCop to 0.63.0
| * | | Bump RuboCop to 0.63.0Koichi ITO2019-01-192-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ### Summary RuboCop 0.63.0 has been released. https://github.com/rubocop-hq/rubocop/releases/tag/v0.63.0 And rubocop-0-63 channel is available in Code Climate. https://github.com/codeclimate/codeclimate/releases/tag/v0.83.0 Currently, RuboCop version specified for Gemfile.lock (0.61) and Code Climate (0.60) are different. - https://github.com/rails/rails/blob/v6.0.0.beta1/Gemfile.lock#L407 - https://github.com/rails/rails/blob/v6.0.0.beta1/.codeclimate.yml#L26 This PR matches these versions to 0.63.
* | | | Single new line is not rendered as new line in the CHANGELOG.mdRyuta Kamizono2019-01-191-3/+4
|/ / / | | | | | | | | | | | | | | | https://github.com/rails/rails/blob/v6.0.0.beta1/actionview/CHANGELOG.md [ci skip]
* | | Change release_sumary task to work in first releases of the seriesRafael Mendonça França2019-01-181-2/+6
| | |
* | | Preparing for 6.0.0.beta1 releaseRafael Mendonça França2019-01-1832-72/+95
| | |
* | | Fix the user show page in the verify taskRafael Mendonça França2019-01-181-1/+3
|/ /
* | Merge pull request #34973 from dylanahsmith/fix-composed-of-nil-conditionRafael França2019-01-182-4/+23
|\ \ | | | | | | activerecord: Fix where nil condition on composed_of attribute
| * | activerecord: Fix where nil condition on composed_of attributeDylan Thacker-Smith2019-01-182-4/+23
|/ /
* | Merge pull request #30000 from ↵Ryuta Kamizono2019-01-1814-37/+72
|\ \ | | | | | | | | | | | | kamipo/all_of_queries_should_return_correct_result All of queries should return correct result even if including large number
| * | Ensure `StatementCache#execute` never raises `RangeError`Ryuta Kamizono2019-01-187-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 31ffbf8d, finder methods no longer raise `RangeError`. So `StatementCache#execute` is the only place to raise the exception for finder queries. `StatementCache` is used for simple equality queries in the codebase. This means that if `StatementCache#execute` raises `RangeError`, the result could always be regarded as empty. So `StatementCache#execute` just return nil in that range error case, and treat that as empty in the caller side, then we can avoid catching the exception in much places.
| * | All of queries should return correct result even if including large numberRyuta Kamizono2019-01-187-18/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently several queries cannot return correct result due to incorrect `RangeError` handling. First example: ```ruby assert_equal true, Topic.where(id: [1, 9223372036854775808]).exists? assert_equal true, Topic.where.not(id: 9223372036854775808).exists? ``` The first example is obviously to be true, but currently it returns false. Second example: ```ruby assert_equal topics(:first), Topic.where(id: 1..9223372036854775808).find(1) ``` The second example also should return the object, but currently it raises `RecordNotFound`. It can be seen from the examples, the queries including large number assuming empty result is not always correct. Therefore, This change handles `RangeError` to generate executable SQL instead of raising `RangeError` to users to always return correct result. By this change, it is no longer raised `RangeError` to users.
* | | Merge pull request #34959 from alkesh26/action-cable-typo-fixesRafael França2019-01-183-3/+3
|\ \ \ | | | | | | | | Typo fixes in action cable.
| * | | typo fixes in action cablealkesh262019-01-173-3/+3
| | | |