simple_form_bootstrap3 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: badf8b8266ad0ff704e36354f7624e6c7767a639
4
- data.tar.gz: 172394a4dce577876613761a90a39443dbcfb02b
3
+ metadata.gz: cd1beacf5c4641db392cdbac70092159f1446b59
4
+ data.tar.gz: de9ab571777ffc18d12340b68a0caeee7083a036
5
5
  SHA512:
6
- metadata.gz: bb1e024dffe8d9e8ebc8f339ce6b4d5321da139a5a6eeea4366cae1d8c957195382a4ade6bfd9ada5c2e3236d308403c4f4d0eaeb8ff102062424f5433c0e7eb
7
- data.tar.gz: 89640a074f7efd2bddb4c479efb79adb8f67d6b5177ad266ea0470d8118debd29a6373261ba6828debde35d37cc6bade96e7fb0bd6744ca620c7181a474e35da
6
+ metadata.gz: 7ad3763abc2b5c9cfe51c3668b0f0245a37e63299ad342b899f11cfb2f7e01de3a36d8b547854a93d5ae1c6f977f4d9421846f10ed8614ecf86a94eb2196ec99
7
+ data.tar.gz: d6851fd4df9d46420b749d46bd6358e0df7d0de5ceaf91d48d5e87530280308d56aa6d09c79b2e6db09bf156aee2db875f2d9134bd80b8d3eba1d072e3968a3f
@@ -11,7 +11,11 @@ module SimpleForm
11
11
  private
12
12
 
13
13
  def input_html_options
14
- { class: 'form-control', readonly: true, value: object.send(attribute_name).strftime("%Y-%m-%d") }
14
+ options[:value] = Time.zone.parse(options[:value]) if options[:value].is_a? String
15
+
16
+ { class: 'form-control',
17
+ readonly: true,
18
+ value: (options[:value].presence || object.send(attribute_name)).strftime("%Y-%m-%d") }
15
19
  end
16
20
 
17
21
  def span_calendar
@@ -11,7 +11,11 @@ module SimpleForm
11
11
  private
12
12
 
13
13
  def input_html_options
14
- { class: 'form-control', readonly: true, value: object.send(attribute_name).strftime("%Y-%m-%d %H:%M") }
14
+ options[:value] = Time.zone.parse(options[:value]) if options[:value].is_a? String
15
+
16
+ { class: 'form-control',
17
+ readonly: true,
18
+ value: (options[:value].presence || object.send(attribute_name)).strftime("%Y-%m-%d %H:%M") }
15
19
  end
16
20
 
17
21
  def span_calendar
@@ -1,3 +1,3 @@
1
1
  module SimpleFormBootstrap3
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_bootstrap3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuriy Kolodovskyy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-26 00:00:00.000000000 Z
11
+ date: 2014-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-sass