diff options
| author | Alban Peignier | 2017-12-29 11:16:52 +0100 |
|---|---|---|
| committer | Alban Peignier | 2017-12-29 11:16:58 +0100 |
| commit | 3cd00c8b27e35028593479b717bfa01efe937b0c (patch) | |
| tree | 4de660233ee25f9154d11cf2ec2a021764af40a9 /app | |
| parent | a072b918f274fe902226ae4cc376b318e3881c5f (diff) | |
| download | chouette-core-3cd00c8b27e35028593479b717bfa01efe937b0c.tar.bz2 | |
Replace CommonHelper.string_keys_to_symbols by Hash#symbolize_keys
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers/common_helper.rb | 8 | ||||
| -rw-r--r-- | app/views/imports/_import_messages.html.slim | 2 |
2 files changed, 1 insertions, 9 deletions
diff --git a/app/helpers/common_helper.rb b/app/helpers/common_helper.rb deleted file mode 100644 index b515f681b..000000000 --- a/app/helpers/common_helper.rb +++ /dev/null @@ -1,8 +0,0 @@ - -module CommonHelper - def string_keys_to_symbols enumerable_pairs - enumerable_pairs.inject({}){ | hashy, (k, v) | - hashy.merge k.to_sym => v - } - end -end diff --git a/app/views/imports/_import_messages.html.slim b/app/views/imports/_import_messages.html.slim index 9ab9226f7..4f2755b1d 100644 --- a/app/views/imports/_import_messages.html.slim +++ b/app/views/imports/_import_messages.html.slim @@ -7,4 +7,4 @@ dd.import_message = t( ['import_messages', 'compliance_check_messages', - import_message.message_key].join('.'), string_keys_to_symbols(import_message.message_attributes)) + import_message.message_key].join('.'), import_message.message_attributes.symbolize_keys) |
