inertiajs / inertia-rails

The Rails adapter for Inertia.js.
https://inertia-rails.dev/
MIT License
574 stars 45 forks source link

NoMethodError: undefined method `helper' for ActionController::API:Class #79

Closed Codcore closed 2 years ago

Codcore commented 2 years ago

On rails 7.0.1 I got error:

2022-06-07 23:17:03 +0300 Rack app ("GET /" - (127.0.0.1)): #<NoMethodError: undefined method `helper' for ActionController::API:Class

      helper ::InertiaRails::Helper
      ^^^^^^>
0xDing commented 2 years ago

https://github.com/inertiajs/inertia-rails/pull/77 could solve the same problem

BrandonShar commented 2 years ago

Thanks @Codcore ! I'm going to test out @0xDing 's solution and will respond back here afterwards.

BrandonShar commented 2 years ago

Hey @Codcore we just tagged v2.0.0 of InertiaRails with a fix for Rails 7 apps. Could you see if that resolves your issue?

BrandonShar commented 2 years ago

Closing because of an assumed fix/inactivity. Feel free to re-open if I'm incorrect!