formtastic_date_as_string 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,11 @@
1
1
  Formtastic::SemanticFormBuilder.class_eval do
2
2
 
3
3
  def date_input(method, options = {})
4
- options.merge! :input_html => { :value => I18n.l(object[method]) } if object[method]
5
- options.merge! :wrapper_html => { :class => :date }
4
+ options[:input_html] ||= {}
5
+ options[:input_html][:class] = [options[:input_html][:class], :date].compact.join ' '
6
+ options[:input_html][:value] = I18n.l(object[method]) if object[method].is_a? Date
7
+ options[:wrapper_html] ||= {}
8
+ options[:input_html][:class] = [options[:wrapper_html][:class], :date].compact.join ' '
6
9
  string_input method, options
7
10
  end
8
11
 
@@ -1,3 +1,3 @@
1
1
  module FormtasticDateAsString
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dmitry Lihachev
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-03-29 00:00:00 +07:00
17
+ date: 2011-04-08 00:00:00 +07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency