wiser_timezone 0.1.1 → 0.1.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 +8 -8
- data/README.md +6 -4
- data/app/helpers/wiser_timezone/wiser_timezone_helper.rb +4 -0
- data/lib/wiser_timezone/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZmE5ZGEzMDYyNmJkMzAzNzBmMTE5MTM1YWI3NzAwNzM4YjJkNmMxMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzQ3YmM2MmFkY2NiNzgzNWJjY2ExNDZlYjMyMDBiY2FjZWIxNWQwMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2JhZWMxZjQ5NzEyMjI4NWJjZTBiMzUzMTE4YzIxMzdhZDEzNjE0OWVjMDk0
|
10
|
+
MjdhMDAwMzczZTEwYTFhZDMzMmE0OGI2MjBhZGJjZjhkODRjOTQ2MTA0NDFm
|
11
|
+
MTJkODc0OTdlOGEyNjk5OWE2NjUxMzAzZjBhM2RhMDQ3NGIyOTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmEwYjZhOWFkMjk0YjQ1ZDY1YzQ5ZDA1NDllMzkxNWE1ODkyNWI1YjFkYTMy
|
14
|
+
NjU4ZmRmZWNmZGUwNmIxZTFlNTU5MjViZjUxZTM2M2E4MmE3NWU0ZjkzMDcx
|
15
|
+
YjY2MmFjMzFjMjUwYTE0MDEyNDA0OWI2ZDg5ZGY1NTVjMjVjODE=
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ You can do normal gem installation for `wiser_timezone` from your terminal:
|
|
16
16
|
|
17
17
|
or add this line in your Gemfile:
|
18
18
|
|
19
|
-
gem 'wiser_timezone', '~> 0.1.
|
19
|
+
gem 'wiser_timezone', '~> 0.1.2'
|
20
20
|
|
21
21
|
Be sure to restart your application if it is already running.
|
22
22
|
|
@@ -73,7 +73,7 @@ Render the `wiser_timezone_initialize` view below the `body` of your layout file
|
|
73
73
|
|
74
74
|
All dates must be printed using the custom helper `wiser_timezone()` from the `wiser_timezone`.
|
75
75
|
|
76
|
-
### Examples
|
76
|
+
### Basic Examples
|
77
77
|
|
78
78
|
You can do the normal usage:
|
79
79
|
|
@@ -85,15 +85,17 @@ Or even format the value:
|
|
85
85
|
<%= wiser_timezone(@post.created_at).strftime('%Y-%m-%d %H:%M:%S') %>
|
86
86
|
// Return: 2014-03-15 02:37:07
|
87
87
|
|
88
|
-
###
|
88
|
+
### Globalize
|
89
89
|
|
90
|
-
|
90
|
+
Enable the *WiserTimezone* in the entire application by adding the `ensure_timezone` method as a `before_filter` of your `ApplicationController`:
|
91
91
|
|
92
92
|
include WiserTimezone::WiserTimezoneHelper
|
93
93
|
class ApplicationController < ActionController::Base
|
94
|
+
before_filter :ensure_timezone
|
94
95
|
# More Codes
|
95
96
|
end
|
96
97
|
|
98
|
+
|
97
99
|
### Extra
|
98
100
|
|
99
101
|
You can get the current timezone using the `current_timezone` method:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wiser_timezone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth John Balgos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|