huacnlee / rucaptcha

Captcha Gem for Rails, which generates captcha image by Rust.
https://huacnlee.github.io/rucaptcha
MIT License
695 stars 133 forks source link

Invalid message not shown #46

Closed leiz-me closed 7 years ago

leiz-me commented 7 years ago

I am using this gem without devise, version == 2.1.3.

Not sure why but cannot get the invalid message. Just follow the instructions. Now in order to get an error message, I have to manually add a line of code to make it happen.

    if verify_rucaptcha?(@user) && @user.save
      @user.send_activation_email
      redirect_to activate_user_url(@user)
    else
      # this one below
      @user.errors.add(:base, t('rucaptcha.invalid'))
      render :new
    end
huacnlee commented 7 years ago

Send a PR for update README

leiz-me commented 7 years ago

README updated