rails_captcha 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,5 @@
1
1
  $(document).ready(function() {
2
- $('#captcha_image_container').html("<%= escape_javascript image_tag("/images/captchas/#{Rails.env.to_s}/#{session[:captcha]}.jpg", :id => "captcha_image", :rel => Rails.env.to_s, :alt => t('rails_captcha.security_code')) %>");
3
- $("#update_captcha").click(function () {
2
+ function rails_captcha_request() {
4
3
  var env = $('#captcha_image_container').attr('class');
5
4
  $.ajax({
6
5
  type: "GET",
@@ -11,6 +10,10 @@ $(document).ready(function() {
11
10
  },
12
11
  error: function(result) { alert('Captcha ERROR'); }
13
12
  });
13
+ }
14
+ rails_captcha_request();
15
+ $("#update_captcha").click(function () {
16
+ rails_captcha_request();
14
17
  return false;
15
18
  });
16
19
  });
@@ -1,3 +1,3 @@
1
1
  module RailsCaptcha
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_captcha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-20 00:00:00.000000000 Z
12
+ date: 2012-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails