I have a reCAPTCHA amethia plugin for Rails 3. Does anyone know how to override this flash message markup? I would like to reuse my own id flash_error div instead of using the plugin flash_recaptcha_error div id:
<div id="flash_recaptcha_error">incorrect-captcha-sol</div>
Also, how would you clear this # create controller?
def create @post = Post.new(params[:post]) respond_to do |format| if verify_recaptcha(:model => @post, :error => "reCAPTCHA incorrect. Try again.") && @post.save flash.now[:notice] = "Created \"#{@post.title}\"" format.html { redirect_to(@post, :notice => 'Post was successfully created.') } else flash.now[:error] = "Incorrect word verification. Are you sure you\'re human?" format.html { redirect_to(:back, :error => 'reCAPTCHA incorrect. Try again.') } end end end
Thanks for reading my question.
source share