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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2653f57c314c564d1a4a7128ef3cc876cd3073a2
4
- data.tar.gz: eceb3ec015fe712f937b9028a4da7e6b68b5ecbc
3
+ metadata.gz: 29b399f60630d69b79a68a2b1e040b84ba3d33b8
4
+ data.tar.gz: 84cac48391c72ac2c20357a4b0d220cb7297124c
5
5
  SHA512:
6
- metadata.gz: c4e3ad2007ddb758de6bd136238f550148142e524566ab62e2d8f029d92628ff6f3682804d3f7dd4d6702ffc4cf0da2ea9fa37f0a394ce1c3ebb627e6fc003df
7
- data.tar.gz: e24501a3af696b98c1048323b3aeee0fd8375894a99ac3dc1b6de37eb2c266eefa9d103b5703f4e6e77c236a7ad98c60e1487230c015890c6822b99e3a409945
6
+ metadata.gz: 6430b7f31395e7dd97d25626cd3da71b65ad348b4bbf37eb7b7bbe3e6b7fbe62cfbc5c353a556a595dfedd6b8711bc7b7976864625351d1ae291262032f6ef76
7
+ data.tar.gz: bc3096a5624909ea0900cb6de7c790a01b6980b382f80f3da499f3094d478996b0442d98e02657d0bbf5b04dbc905be4c098e0872295d7a4d04b71290908f736
@@ -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? :before_filter
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
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = %q{zero-captcha}
4
- s.version = "0.0.4"
4
+ s.version = "0.0.5"
5
5
 
6
6
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
7
7
  s.authors = ['lunaru']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zero-captcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - lunaru