hot-glue 0.6.6.1 → 0.6.7
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/README.md +17 -0
- data/app/helpers/hot_glue/controller_helper.rb +8 -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: 4145a5b0431eb0e5527da881e94fe7dbd3e98afd1eea8186e5082705e295e6e1
|
4
|
+
data.tar.gz: 87f4eeedf75612c0ee90c116d9d8487be17bfb217c4aaeb06314b7fba93f6266
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c5146d1150afca3a2d65956a06d1e1ee8b7f0bd172d9db3d1772f832a954abbc01849ff3002b6aaf617036d28d6cfd405aa31dd0e09be1aaaf497e16f5a074a
|
7
|
+
data.tar.gz: 2099aef1b686d42ebd546b4c9d77d32534476d9eb3fed28c9b43482549fe846fba69a07eb90ade6cc3838aee628cad51e3ed8b90ccad3ec27485fad3833d7627
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1612,6 +1612,23 @@ These automatic pickups for partials are detected at buildtime. This means that
|
|
1612
1612
|
|
1613
1613
|
# VERSION HISTORY
|
1614
1614
|
|
1615
|
+
#### 2024-11-26 - v0.6.7
|
1616
|
+
|
1617
|
+
Patch for my non-:00 seconds problem. I have discovered that the root of my issues was a quirk in how browsers display datetime-local fields.
|
1618
|
+
|
1619
|
+
This implementation favors a no-seconds approach, which is a good idea for most applications. If you need seconds, you should use a different approach.
|
1620
|
+
|
1621
|
+
here is a note about the problem:
|
1622
|
+
# note: as according to https://stackoverflow.com/questions/20111413/html5-datetime-local-control-how-to-hide-seconds
|
1623
|
+
# there is no way to set the seconds to 00 in the datetime-local input field
|
1624
|
+
# as I have implemented a "seconds don't matter" solution,
|
1625
|
+
# the only solution is to avoid setting any non-00 datetime values into the database
|
1626
|
+
# if they already exist in your database, you should zero them out
|
1627
|
+
# or apply .change(sec: 0) when displaying them as output in the form
|
1628
|
+
# this will prevent seconds from being added by the browser
|
1629
|
+
|
1630
|
+
|
1631
|
+
|
1615
1632
|
#### 2024-11-18 - v0.6.6.1
|
1616
1633
|
|
1617
1634
|
- Adds hg- classes to the form fields for easier styling
|
@@ -81,7 +81,14 @@ module HotGlue
|
|
81
81
|
if include_me && params[k].present?
|
82
82
|
if use_timezone
|
83
83
|
parse_date = "#{params[k].gsub("T", " ")} #{use_timezone.formatted_offset}"
|
84
|
-
|
84
|
+
# note: as according to https://stackoverflow.com/questions/20111413/html5-datetime-local-control-how-to-hide-seconds
|
85
|
+
# there is no way to set the seconds to 00 in the datetime-local input field
|
86
|
+
# as I have implemented a "seconds don't matter" solution,
|
87
|
+
# the only solution is to avoid setting any non-00 datetime values into the database
|
88
|
+
# if they already exist in your database, you should zero them out
|
89
|
+
# or apply .change(sec: 0) when displaying them as output in the form
|
90
|
+
# this will prevent seconds from being added by the browser
|
91
|
+
params[k] = Time.strptime(parse_date, "%Y-%m-%d %H:%M %Z")
|
85
92
|
end
|
86
93
|
end
|
87
94
|
}
|
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.
|
4
|
+
version: 0.6.7
|
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: 2024-11-
|
11
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|