Support for I18n
-
Jason L Perry
Hmm, yes, great idea. I've got a ton of patches to sift through, I'm gonna try to set aside some time this week to take care of them. I'll definitely work on this one too.
-
Roman Shterenzon
- Tag set to i18n, patch
Please find attached a patch which adds I18n support.
By the way, the latest changes introduced to the recaptcha rendered the rdoc incorrect. It's impossible to use verify_recaptcha(@model) now, you have rather use verify_recaptcha(:model => @model). I wasted some time in order to understand, why I'm not getting any errors in my model. The simple fix can be adding
@@ -51,6 +51,7 @@ module Ambethia # variable +RECAPTCHA_PUBLIC_KEY+. def verify_recaptcha(options = {}) return true if SKIP_VERIFY_ENV.include? ENV['RAILS_ENV'] + model = options if options.is_a? ActiveRecord::Base private_key = options[:private_key] ||= ENV['RECAPTCHA_PRIVATE_KEY'] raise ReCaptchaError, "No private key specified." unless private_key begin -
Roman Shterenzon
Hmm.. no, sorry, the line "if model = options[:model]" should be changed as well.
-
Roman Shterenzon
I came up with the following, seems to work for both the old and the new way of specifying the model.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
