Andy Waite

Results 394 comments of Andy Waite

Hi @gobijan, We (the ruby-lsp-rails maintainers) are working with some Rails Core members on a change to how the LSP is run. Once that is complete we can hopefully make...

Are those other approaches common? Perhaps you could check on https://github.com/eliotsykes/real-world-rails

I agree with the rule, but as with Callbacks Order, I think it's sufficient to give a small example (e.g. two filters) and have a link to the full list...

`assert_raise` is an alias for Rails' own `assert_raises`, which adds support for a `match` parameter, so it's not Minitest's `assert_raises`: https://github.com/rails/rails/blob/23938052acd773fa24068debe56cd892cbf8d868/activesupport/lib/active_support/testing/assertions.rb#L34-L39 But I would support a guideline to prefer `assert_raises`...

I find to hard to say whether either is 'good' or 'bad' without seeing the examples in a wider context.

I agree with the premise, but I wonder if it's too general. In any language, it's usually wise to avoid directly exposing users to errors in the underlying framework.

Would you want to have this applied to _all_ multiline blocks? If so, see https://github.com/rubocop/ruby-style-guide/issues/823

Care should be taken for how this interacts with `Style/SpecialGlobalVars`.

Note: Rails defines `overlap?` for Ruby 3.2 and below: https://github.com/rails/rails/blob/main/activesupport/lib/active_support/core_ext/range/overlap.rb It also aliases `overlaps?` to `overlap?`.