zero-captcha 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zero-captcha.rb +3 -1
- data/zero-captcha.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29b399f60630d69b79a68a2b1e040b84ba3d33b8
|
4
|
+
data.tar.gz: 84cac48391c72ac2c20357a4b0d220cb7297124c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6430b7f31395e7dd97d25626cd3da71b65ad348b4bbf37eb7b7bbe3e6b7fbe62cfbc5c353a556a595dfedd6b8711bc7b7976864625351d1ae291262032f6ef76
|
7
|
+
data.tar.gz: bc3096a5624909ea0900cb6de7c790a01b6980b382f80f3da499f3094d478996b0442d98e02657d0bbf5b04dbc905be4c098e0872295d7a4d04b71290908f736
|
data/lib/zero-captcha.rb
CHANGED
@@ -17,7 +17,9 @@ module ZeroCaptcha
|
|
17
17
|
def self.included(base) # :nodoc:
|
18
18
|
base.send :helper_method, :zero_captcha_fields
|
19
19
|
|
20
|
-
if base.respond_to? :
|
20
|
+
if base.respond_to? :before_action
|
21
|
+
base.send :prepend_before_action, :protect_from_spam_with_zero_captcha, :only => [:create, :update]
|
22
|
+
elsif base.respond_to? :before_filter
|
21
23
|
base.send :prepend_before_filter, :protect_from_spam_with_zero_captcha, :only => [:create, :update]
|
22
24
|
end
|
23
25
|
end
|
data/zero-captcha.gemspec
CHANGED