Closed zaphod030 closed 3 years ago
Hi @zaphod030, adding more flags (like skip_on_get
) makes the gem less maintainable... so I'd probably go making the detect_spam
public... But to be honest, I think The Best ™️ option is to use RESTful controllers, so you can clearly separate actions, something like:
class SessionsController < ApplicationController
invisible_captcha only: :create
# GET
def new
...
end
# POST
def create
...
end
end
Hi Marc,
thank you for this precious gem. I want to suggest a feature to run the spam detection only on POST-requests.
Imagine the following code within the Login-Controller:
With this setup you'll get an infinite loop when accessing the Login-Screen.
I could imagine two possible solutions:
What do you think?
KR, Stefan