hot-glue 0.6.21 → 0.6.21.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/helpers/hot_glue/controller_helper.rb +7 -2
- data/lib/generators/hot_glue/fields/time_field.rb +1 -1
- data/lib/hotglue/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f79c85d7b5413fe8f12306c5b46de1eedd68c6373ffbab5512a1a57ac22c0e30
|
4
|
+
data.tar.gz: d151d9357396d201e1b8a25b59146b7f065b260d38b8f456ece7d798d2b09320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e9df1507995d80cc0efc229c29bca7e6e1d52e1a6be0870cbcee4d9cc42cfec85ddf2dd3ec8b710162eff4d800a04f847dcdbd8580220277642026a7e5dbc45
|
7
|
+
data.tar.gz: 0271cd11a4848ef7044ac0310cf9064fff0defef82a2e4237c8caf34bb8e660b618f2da3c1f3565e6317b69c10aa3e6bc3e24366a088c4be5e756d6d25cada7e
|
data/Gemfile.lock
CHANGED
@@ -98,8 +98,13 @@ module HotGlue
|
|
98
98
|
|
99
99
|
if include_me && params[k].present?
|
100
100
|
if use_timezone
|
101
|
+
natural_offset = use_timezone.formatted_offset
|
102
|
+
hour = natural_offset.split(":").first
|
103
|
+
min = natural_offset.split(":").last
|
104
|
+
hour = hour.to_i - 1 if uses_dst && is_dst_now?
|
101
105
|
|
102
|
-
|
106
|
+
use_offset = "#{hour}:#{min}"
|
107
|
+
parse_date = "#{params[k].gsub("T", " ")} #{use_offset}"
|
103
108
|
# note: as according to https://stackoverflow.com/questions/20111413/html5-datetime-local-control-how-to-hide-seconds
|
104
109
|
# there is no way to set the seconds to 00 in the datetime-local input field
|
105
110
|
# as I have implemented a "seconds don't matter" solution,
|
@@ -112,7 +117,7 @@ module HotGlue
|
|
112
117
|
else
|
113
118
|
parsed_time = Time.strptime(parse_date, parsables[field_list[k.to_sym]])
|
114
119
|
end
|
115
|
-
|
120
|
+
|
116
121
|
params[k] = parsed_time
|
117
122
|
end
|
118
123
|
end
|
@@ -5,7 +5,7 @@ class TimeField < Field
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def form_field_output
|
8
|
-
"<%= time_field_localized(f, :#{name}, #{singular}.#{name}, label: '#{ name.to_s.humanize }') %>"
|
8
|
+
"<%= time_field_localized(f, :#{name}, #{singular}.#{name}&.in_time_zone(current_user.timezone)&.strftime('%H:%M'), label: '#{ name.to_s.humanize }') %>"
|
9
9
|
end
|
10
10
|
|
11
11
|
def line_field_output
|
data/lib/hotglue/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hot-glue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.21
|
4
|
+
version: 0.6.21.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Fleetwood-Boldt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|