I use ready-made confirmation. I have some custom things that I need to override from development. method, so in my user model, I have the following method that overrides it:
def confirm! super gb = Gibbon::API.new(ENV['MAILCHIMP_API_KEY']) gb.lists.subscribe({:id => ENV['MAILCHIMP_ID'], :email => {:email => self.email }}) end
It works great. Now I'm trying to use it so that the user automatically subscribes after confirmation, but cannot figure out how to do this. I know this is considered a security flaw, but I have weighed the risks and it is worth it to work on my site. I don't want to do anything with the routes file because this method already works, so I should be able to do it from here. I tried putting the following into my configuration file:
config.allow_insecure_sign_in_after_confirmation = true
but he does not sign the user.
I looked at the Avoid login after you confirmed that click the link using devem gem? , and this does not help, please do not mark it as a duplicate.
Thanks to everyone.
source share