rails-timeago 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
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.nil?
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)
@@ -3,7 +3,7 @@ module Rails
3
3
  module VERSION
4
4
  MAJOR = 1
5
5
  MINOR = 4
6
- PATCH = 0
6
+ PATCH = 1
7
7
  STAGE = nil
8
8
 
9
9
  def self.to_s
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.0
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-23 00:00:00.000000000 Z
12
+ date: 2012-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport