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.
@@ -1,3 +1,3 @@
1
1
  module CheckTag
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: check_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: