rails-timeago 1.4.0 → 1.4.1
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.
- data/README.md +8 -0
- data/lib/rails-timeago.rb +1 -1
- data/lib/rails-timeago/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -115,6 +115,14 @@ Rails::Timeago.map_locale "en", "better/locales/en.js"
|
|
115
115
|
Given that mapping rails-timeago's `timeago_script_tag` will include the mapped
|
116
116
|
locale file into your page.
|
117
117
|
|
118
|
+
**Node:** Rails default `application.js` file contains a line to require all JavaScript
|
119
|
+
in your assets directory. That will also include all your custom locale files if you
|
120
|
+
place them in `app/assets/javascripts/locales` and will result in unexpected behavior when
|
121
|
+
using `en` locale (see #5).
|
122
|
+
|
123
|
+
A workaround is to remove the `//= require_tree .` line from `application.js` or to move your
|
124
|
+
custom locale files to `lib/assets/javascripts/locales`.
|
125
|
+
|
118
126
|
## License
|
119
127
|
|
120
128
|
[MIT License](http://www.opensource.org/licenses/mit-license.php)
|
data/lib/rails-timeago.rb
CHANGED
@@ -21,7 +21,7 @@ module Rails
|
|
21
21
|
'locales/jquery.timeago.' + locale.to_s + '.js'
|
22
22
|
end
|
23
23
|
end
|
24
|
-
elsif ::Rails::Timeago.locales.
|
24
|
+
elsif ::Rails::Timeago.locales.empty?
|
25
25
|
app.config.assets.precompile +=
|
26
26
|
Dir[Rails::Timeago.locale_path + '*.js'].map do |f|
|
27
27
|
'locales/' + File.basename(f)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-timeago
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|