File tree Expand file tree Collapse file tree 4 files changed +44
-42
lines changed Expand file tree Collapse file tree 4 files changed +44
-42
lines changed Original file line number Diff line number Diff line change 1
1
source "http://rubygems.org"
2
- gem "rails" , ">= 3.0.0"
2
+ gem "rails" , "~> 3.0.0"
3
3
gem "rmagick"
4
4
5
5
group :development do
Original file line number Diff line number Diff line change 2
2
remote: http://rubygems.org/
3
3
specs:
4
4
abstract (1.0.0 )
5
- actionmailer (3.0.4 )
6
- actionpack (= 3.0.4 )
5
+ actionmailer (3.0.7 )
6
+ actionpack (= 3.0.7 )
7
7
mail (~> 2.2.15 )
8
- actionpack (3.0.4 )
9
- activemodel (= 3.0.4 )
10
- activesupport (= 3.0.4 )
8
+ actionpack (3.0.7 )
9
+ activemodel (= 3.0.7 )
10
+ activesupport (= 3.0.7 )
11
11
builder (~> 2.1.2 )
12
12
erubis (~> 2.6.6 )
13
- i18n (~> 0.4 )
13
+ i18n (~> 0.5.0 )
14
14
rack (~> 1.2.1 )
15
- rack-mount (~> 0.6.13 )
15
+ rack-mount (~> 0.6.14 )
16
16
rack-test (~> 0.5.7 )
17
17
tzinfo (~> 0.3.23 )
18
- activemodel (3.0.4 )
19
- activesupport (= 3.0.4 )
18
+ activemodel (3.0.7 )
19
+ activesupport (= 3.0.7 )
20
20
builder (~> 2.1.2 )
21
- i18n (~> 0.4 )
22
- activerecord (3.0.4 )
23
- activemodel (= 3.0.4 )
24
- activesupport (= 3.0.4 )
21
+ i18n (~> 0.5.0 )
22
+ activerecord (3.0.7 )
23
+ activemodel (= 3.0.7 )
24
+ activesupport (= 3.0.7 )
25
25
arel (~> 2.0.2 )
26
26
tzinfo (~> 0.3.23 )
27
- activeresource (3.0.4 )
28
- activemodel (= 3.0.4 )
29
- activesupport (= 3.0.4 )
30
- activesupport (3.0.4 )
31
- arel (2.0.8 )
27
+ activeresource (3.0.7 )
28
+ activemodel (= 3.0.7 )
29
+ activesupport (= 3.0.7 )
30
+ activesupport (3.0.7 )
31
+ arel (2.0.10 )
32
32
builder (2.1.2 )
33
33
diff-lcs (1.1.2 )
34
34
erubis (2.6.6 )
39
39
bundler (~> 1.0.0 )
40
40
git (>= 1.2.5 )
41
41
rake
42
- mail (2.2.15 )
42
+ mail (2.2.19 )
43
43
activesupport (>= 2.3.6 )
44
44
i18n (>= 0.4.0 )
45
45
mime-types (~> 1.16 )
46
46
treetop (~> 1.4.8 )
47
47
mime-types (1.16 )
48
48
polyglot (0.3.1 )
49
- rack (1.2.1 )
50
- rack-mount (0.6.13 )
49
+ rack (1.2.3 )
50
+ rack-mount (0.6.14 )
51
51
rack (>= 1.0.0 )
52
52
rack-test (0.5.7 )
53
53
rack (>= 1.0 )
54
- rails (3.0.4 )
55
- actionmailer (= 3.0.4 )
56
- actionpack (= 3.0.4 )
57
- activerecord (= 3.0.4 )
58
- activeresource (= 3.0.4 )
59
- activesupport (= 3.0.4 )
54
+ rails (3.0.7 )
55
+ actionmailer (= 3.0.7 )
56
+ actionpack (= 3.0.7 )
57
+ activerecord (= 3.0.7 )
58
+ activeresource (= 3.0.7 )
59
+ activesupport (= 3.0.7 )
60
60
bundler (~> 1.0 )
61
- railties (= 3.0.4 )
62
- railties (3.0.4 )
63
- actionpack (= 3.0.4 )
64
- activesupport (= 3.0.4 )
61
+ railties (= 3.0.7 )
62
+ railties (3.0.7 )
63
+ actionpack (= 3.0.7 )
64
+ activesupport (= 3.0.7 )
65
65
rake (>= 0.8.7 )
66
66
thor (~> 0.14.4 )
67
- rake (0.8.7 )
67
+ rake (0.9.2 )
68
68
rmagick (2.13.1 )
69
69
rspec (2.3.0 )
70
70
rspec-core (~> 2.3.0 )
74
74
rspec-expectations (2.3.0 )
75
75
diff-lcs (~> 1.1.2 )
76
76
rspec-mocks (2.3.0 )
77
- simplecov (0.4.0 )
78
- simplecov-html (~> 0.4.0 )
79
- simplecov-html (0.4.3 )
77
+ simplecov (0.4.2 )
78
+ simplecov-html (~> 0.4.4 )
79
+ simplecov-html (0.4.5 )
80
80
thor (0.14.6 )
81
81
treetop (1.4.9 )
82
82
polyglot (>= 0.3.1 )
83
- tzinfo (0.3.24 )
84
- yard (0.6.4 )
83
+ tzinfo (0.3.27 )
84
+ yard (0.6.8 )
85
85
86
86
PLATFORMS
87
87
ruby
88
88
89
89
DEPENDENCIES
90
90
bundler (~> 1.0.0 )
91
91
jeweler (~> 1.5.2 )
92
- rails (>= 3.0.0 )
92
+ rails (~> 3.0.0 )
93
93
rmagick
94
94
rspec (~> 2.3.0 )
95
95
simplecov (>= 0.3.8 )
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module ControllerHelpers
4
4
5
5
def self . included ( base ) #:nodoc:
6
6
base . class_eval do
7
- helper_method :valid_captcha?
7
+ helper_method :valid_captcha? , :captcha_valid?
8
8
end
9
9
end
10
10
@@ -46,10 +46,11 @@ def generate_captcha_code
46
46
end
47
47
48
48
# validate given captcha code and re
49
- def valid_captcha ?( code )
49
+ def captcha_valid ?( code )
50
50
return false if session [ :captcha ] . blank? or code . blank?
51
51
session [ :captcha ] . to_s . upcase == code . to_s . upcase
52
52
end
53
+ alias_method :valid_captcha? , :captcha_valid?
53
54
54
55
# reset the captcha code in session for security after each request
55
56
def reset_last_captcha_code!
Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ def captcha #:nodoc:
20
20
end
21
21
22
22
# validate captcha
23
- def valid_captcha ?
23
+ def captcha_valid ?
24
24
errors . add ( :captcha , :invalid ) if @captcha . blank? or @captcha_verification . blank? or @captcha . to_s . upcase != @captcha_verification . to_s . upcase
25
25
end
26
+ alias_method :valid_captcha? , :captcha_valid?
26
27
end
27
28
end
28
29
end
You can’t perform that action at this time.
0 commit comments