Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown action ':protect_from_spam' error on default Ruby on Rails 7.1 projects #99

Open
1klap opened this issue Jun 25, 2024 · 2 comments
Assignees
Labels

Comments

@1klap
Copy link

1klap commented Jun 25, 2024

Describe the bug
The gem causes Ruby on Rails projects with version 7.1.0 or higher to break for all routes if the setting
config.action_controller.raise_on_missing_callback_actions = true is present in an environment (default for development and test).

To Reproduce
Steps to reproduce the behavior:

  1. run rails _7.1.3.4_ new example
  2. cd example
  3. add gem 'honeypot-captcha' to Gemfile
  4. run bundle install
  5. run bin/rails s
  6. go to localhost:3000
  7. see error below
Unknown action
The create action could not be found for the :protect_from_spam
callback on Rails::WelcomeController, 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`.

Expected behavior
The gem should work out of the box with a RoR application. I didn't find a configuration option or documentation to avoid this error except disable the configuration in Rails.

Screenshots
Screenshot with the error
Screenshot from 2024-06-25 16-51-20

Desktop:

  • OS: Ubuntu 22.04
  • Browser Firefox
  • Version 127.0.1

Smartphone:

  • Not applicable

Additional context

  • The setting can be found in the Rails project in config/environments/development.rb
@1klap 1klap added the bug label Jun 25, 2024
@jathayde
Copy link

jathayde commented Nov 1, 2024

+1 experiencing this. Can turn off with the development.rb and test.rb switches for missing callback actions.

@t3k4y
Copy link

t3k4y commented Nov 7, 2024

Same here.. @curtis did you find something to fixx this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants