igorkasyanchuk / rails_db

Rails Database Viewer and SQL Query Runner
https://www.railsjazz.com/
MIT License
1.46k stars 111 forks source link

Search doesn't work under Rails 7.1.0rc #134

Closed heroturtle closed 4 weeks ago

heroturtle commented 9 months ago

After upgrading to Rails 7.1.0rc, the search in my application doesn't work anymore. I get the following message: AbstractController::ActionNotFound (The search action could not be found for the :find_table callback on RailsDb::TablesController, but it is listed in the controller's :only option.

igorkasyanchuk commented 9 months ago

I'll appreciate a PR with fix for this issue. Can you try to create ir?

bpurinton commented 4 weeks ago

I am having the same issue with Rails 7.1.3.3

I can reach /rails/db, but trying to click into any of the tables results in this in the server log:

AbstractController::ActionNotFound - The search action could not be found for the :find_table
callback on RailsDb::TablesController, but it is listed in the controller's
:only option.
Raising for missing callback actions is a new default in Rails 7.1, if you'd
like to turn this off you can delete the option from the environment configurations
or set `config.action_controller.raise_on_missing_callback_actions` to `false`.:

So it seems that the new "missing callbacks" default in Rails 7.1 is to blame here.

Indeed a workaround is to set the configuration option to false:

# config/environments/development.rb
config.action_controller.raise_on_missing_callback_actions = false

But perhaps a change can be made to fix this gem instead.