DEV Community

hiko1129
hiko1129

Posted on • Originally published at note.hiko1129.com on

[Rails][Sorbet] How to add kaminari type definitions in sorbet-rails

Translate ja to en

kaminariに限った話ではないが一部のgemに関してはsorbet-railsのinitializerを追加することで型生成対象に含めることができる。

kaminariのgemを入れているから勝手に生成されるとかではなくあくまで自分で設定する必要がある模様。

# -- config/initializers/sorbet_rails.rb
SorbetRails.configure do |config|
  config.enabled_gem_plugins = [
    :kaminari
  ]
end
Enter fullscreen mode Exit fullscreen mode

参考

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️