Update js_locale_helper.rb

Fix "undefined method `end_with?' for 1:Fixnum" when field name in YML file is not quoted number like:

```
    user_action_groups:
      1: "Likes Given"
      2: "Likes Received"
```

(yamllint.com validates such file as valid YML file)
This commit is contained in:
Anton Batenev 2013-06-06 22:20:17 +04:00
parent f268b882fd
commit 621d949033
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ module JsLocaleHelper
hash.each do |k,v|
if Hash === v
rval.merge!(strip_out_message_formats!(v, prefix + (prefix.length > 0 ? "." : "") << k, rval))
elsif k.end_with?("_MF")
elsif k.to_s().end_with?("_MF")
rval[prefix + (prefix.length > 0 ? "." : "") << k] = v
hash.delete(k)
end