Skip to content

Conversation

kddnewton
Copy link
Member

@kddnewton kddnewton commented Dec 20, 2020

If you have something like

config.action_dispatch.rescue_responses.merge!(
  # We created more threads than RAILS_MAX_THREADS
  'ActiveRecord::ConnectionTimeoutError' => :service_unavailable,
  # Some query hits a timeout
  'ActiveRecord::QueryCanceled' => :service_unavailable,
  # Rack::Timeout
  'Rack::Timeout::RequestExpiryError' => :service_unavailable,
  'Rack::Timeout::RequestTimeoutError' => :service_unavailable,
  'Rack::Timeout::RequestTimeoutException' => :service_unavailable,
)

then we want to group the args and the method chain.

Closes #729

If you have something like

```ruby
config.action_dispatch.rescue_responses.merge!(
  # We created more threads than RAILS_MAX_THREADS
  'ActiveRecord::ConnectionTimeoutError' => :service_unavailable,
  # Some query hits a timeout
  'ActiveRecord::QueryCanceled' => :service_unavailable,
  # Rack::Timeout
  'Rack::Timeout::RequestExpiryError' => :service_unavailable,
  'Rack::Timeout::RequestTimeoutError' => :service_unavailable,
  'Rack::Timeout::RequestTimeoutException' => :service_unavailable,
)
```

then we want to group the args and the method chain.
@kddnewton kddnewton force-pushed the long-calls-with-args-at-end branch from 9d2b356 to 0fb9f4a Compare December 20, 2020 19:23
@kddnewton kddnewton merged commit 10d72ac into master Dec 20, 2020
@kddnewton kddnewton deleted the long-calls-with-args-at-end branch December 20, 2020 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relatively short method chain with hash passed last breaks chain on multiple lines
1 participant