simple_form_datetimepicker 0.0.2 → 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66e31139f9cf19baf5c4b8bc694049f7d05a4c89
4
- data.tar.gz: a13c5123668f90764d1ea8f262bf28a9b2677747
3
+ metadata.gz: 7006666abb188857dd5e1a4aacd5a6bb5864256a
4
+ data.tar.gz: 19a770a04de05e24f86311e87b0d34b9b296d089
5
5
  SHA512:
6
- metadata.gz: 25109ad3e022bbb006455d0a102ea97badda5557db048b84a285e7bb08d5bf73e96ded552c29bb0e5ed539f722642358272d81e43963e15284327c0c2fd0dcd4
7
- data.tar.gz: d13ab7193a92e7b209968914ad65d92b9df1cc405b66dbbd1499d88e340f6fcd85fc962bb51aaf2fad0ffb41cf25e184b6578c7703fdf97c583a0f74b338e70b
6
+ metadata.gz: fd099ddc72994408107489f8fa4fb3fd66d69781974fb0c9e49cb8f6fcfe4f987f0bf0ff2d2ed98b14b09c1a9f143142a10286addac4dd06d4cc0b58fe4a8a7a
7
+ data.tar.gz: bbf5fd17759675266ac2838f41a74f2c824c08edb1f81fa0bb410826b7f4d34f6b670cac396d8a514963e27fb43db586225e73bc0b16454eeb528fc47ce3cd1d
@@ -12,17 +12,24 @@ module SimpleForm
12
12
  defaultvalue = defaulttime
13
13
  end
14
14
  input_html_options[:class] << 'dtp'
15
- if input_html_options.key?(:data)
15
+ no_group = if input_html_options.key?(:data)
16
16
  input_html_options[:data][:defaultvalue] = defaultvalue if defaultvalue.present?
17
+ input_html_options[:data].key?(:no_group)
17
18
  else
18
19
  input_html_options[:data] = {:defaultvalue => defaultvalue} if defaultvalue.present?
20
+ false
19
21
  end
20
- out = '<div class="input-group">'
22
+
23
+ out = ''
24
+ out << '<div class="input-group">' unless no_group
21
25
  out << @builder.text_field(attribute_name, input_html_options)
22
- out << '<span class="input-group-addon">'
23
- out << "<span class='#{icon_lib} #{icon}'></span>"
24
- out << '</span>'
25
- (out << '</div>').html_safe
26
+ unless no_group
27
+ out << '<span class="input-group-addon">'
28
+ out << "<span class='#{icon_lib} #{icon}'></span>"
29
+ out << '</span>'
30
+ out << '</div>'
31
+ end
32
+ out.html_safe
26
33
  end
27
34
  end
28
35
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormDatetimepicker
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_datetimepicker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - smit1625
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-23 00:00:00.000000000 Z
11
+ date: 2014-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler