formtastic_extensions 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{formtastic_extensions}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Semyonov"]
@@ -12,7 +12,7 @@ module FormtasticExtensions
12
12
  options[:as] ||= default_input_type(method)
13
13
 
14
14
  html_class = [ options[:as], (options[:required] ? :required : :optional) ]
15
- html_class << 'error' if @object && @object.respond_to?(:errors) && @object.errors[method.to_sym]
15
+ html_class << 'error' if @object && @object.respond_to?(:errors) && !@object.errors[method.to_sym].blank?
16
16
 
17
17
  wrapper_html = options.delete(:wrapper_html) || {}
18
18
  wrapper_html[:id] ||= generate_html_id(method)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formtastic_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Semyonov