glebtv-simple_captcha 0.6.5 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simple_captcha/hooks/form_builder.rb +8 -8
- data/lib/simple_captcha/version.rb +1 -1
- data/lib/simple_captcha/view.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51f918db5a2e85b3420d2e8e894d4955287d6614
|
4
|
+
data.tar.gz: cab23a9929ddf2eb87144466c979f595c99b0953
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a606223a9803296d8b246464cc48bd0354b32bd8248dbea69311b9415c5d9b6f883fdf28c89623ece09f66ead2e98281b4a50e5cab4b21b141a0e4b013c03d5
|
7
|
+
data.tar.gz: 3430a30edbb9c1f37537eced825ba976aead0c8fcb66fdd1c7b04a011ba6b5216669faacf6c0cc9d16cb0dd89b2d6089af2835d648537d3937db0ec1b4360eb9
|
@@ -9,14 +9,14 @@ module SimpleCaptcha
|
|
9
9
|
|
10
10
|
module ClassMethods
|
11
11
|
# Example:
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
# <% form_for :post, :url => posts_path do |form| %>
|
13
|
+
# ...
|
14
|
+
# <%= form.simple_captcha :label => "Enter numbers.." %>
|
15
|
+
# <% end %>
|
16
|
+
#
|
17
|
+
def simple_captcha(options = {})
|
18
|
+
options.update :object => @object_name
|
19
|
+
show_simple_captcha(objectify_options(options))
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
data/lib/simple_captcha/view.rb
CHANGED
@@ -62,7 +62,7 @@ module SimpleCaptcha #:nodoc
|
|
62
62
|
defaults[:time] = options[:time] || Time.now.to_i
|
63
63
|
|
64
64
|
query = defaults.collect{ |key, value| "#{key}=#{value}" }.join('&')
|
65
|
-
url = "/simple_captcha?code=#{sc_key}
|
65
|
+
url = "/simple_captcha?code=#{sc_key}&#{query}"
|
66
66
|
|
67
67
|
"<img src='#{url}' alt='captcha' />".html_safe
|
68
68
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-simple_captcha
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GlebTv
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|