formtastic_date_as_string 0.0.5.2 → 0.0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ Formtastic::SemanticFormBuilder.class_eval do
3
3
  def date_input(method, options = {})
4
4
  options[:input_html] ||= {}
5
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
6
+ options[:input_html][:value] = I18n.l(object.send(method)) if object.send(method).is_a? Date
7
7
  options[:wrapper_html] ||= {}
8
8
  options[:input_html][:class] = [options[:wrapper_html][:class], :date].compact.join ' '
9
9
  string_input method, options
@@ -12,7 +12,7 @@ Formtastic::SemanticFormBuilder.class_eval do
12
12
  def datetime_input(method, options = {})
13
13
  options[:input_html] ||= {}
14
14
  options[:input_html][:class] = [options[:input_html][:class], :datetime].compact.join ' '
15
- options[:input_html][:value] = I18n.l(object[method], :format => :datetime) if object[method].is_a?(DateTime) || object[method].is_a?(Time)
15
+ options[:input_html][:value] = I18n.l(object.send(method), :format => :datetime) if object.send(method).is_a?(DateTime)
16
16
  options[:wrapper_html] ||= {}
17
17
  options[:input_html][:class] = [options[:wrapper_html][:class], :datetime].compact.join ' '
18
18
  string_input method, options
@@ -1,3 +1,4 @@
1
1
  module FormtasticDateAsString
2
- VERSION = "0.0.5.2"
2
+ VERSION = "0.0.5.3"
3
3
  end
4
+
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.0.5.2
9
+ - 3
10
+ version: 0.0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dmitry Lihachev
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-15 00:00:00 +07:00
19
+ date: 2011-07-19 00:00:00 +07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency