check_tag 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/check_tag/version.rb +1 -1
- data/lib/check_tag.rb +4 -0
- metadata +1 -1
data/lib/check_tag/version.rb
CHANGED
data/lib/check_tag.rb
CHANGED
@@ -3,6 +3,7 @@ include ActionView::Helpers::FormTagHelper
|
|
3
3
|
|
4
4
|
module CheckTag
|
5
5
|
def self.now(id, check, uncheck, defaulted)
|
6
|
+
begin
|
6
7
|
id = id.to_s
|
7
8
|
check = check.to_s
|
8
9
|
uncheck = uncheck.to_s
|
@@ -10,6 +11,9 @@ module CheckTag
|
|
10
11
|
@hidden_tag = hidden_field_tag(id, uncheck)
|
11
12
|
@return_objects = check_box_tag(id, check, (defaulted == check ? true : false))
|
12
13
|
return @hidden_tag + " " + @return_objects
|
14
|
+
rescue
|
15
|
+
puts "CHECK TAG ERROR. You may have not have used all four arguments. Usage: CheckTag.now('test_id', 'yes', 'no', 'no')"
|
16
|
+
end
|
13
17
|
end
|
14
18
|
|
15
19
|
|