diff options
| author | Teddy Wing | 2017-06-12 11:18:21 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-06-12 11:18:21 +0200 | 
| commit | 53ede82ce2e8a1226fbb16ec67eb092cdcd12082 (patch) | |
| tree | 3db2fafd7e2e99c05c6fe3f06bb8dbff9ba8f80e /app/helpers/table_builder_helper.rb | |
| parent | 6dfdb22139eda7561fa1ae5a9c54b9fdadbfa4b3 (diff) | |
| download | chouette-core-53ede82ce2e8a1226fbb16ec67eb092cdcd12082.tar.bz2 | |
TableBuilderHelper: Change `#collect` calls to `#map`
Use `#map` here because the name makes more sense to me in this context.
Also, the `#thead` method uses `columns.map`, so we can do the same
thing in these two places for consistency.
Refs #3479
Diffstat (limited to 'app/helpers/table_builder_helper.rb')
| -rw-r--r-- | app/helpers/table_builder_helper.rb | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/table_builder_helper.rb b/app/helpers/table_builder_helper.rb index 586842d46..b3b5e3cde 100644 --- a/app/helpers/table_builder_helper.rb +++ b/app/helpers/table_builder_helper.rb @@ -54,7 +54,7 @@ module TableBuilderHelper    def tbody(collection, columns, selectable, links)      # TODO: refactor      content_tag :tbody do -      collection.collect do |item| +      collection.map do |item|          content_tag :tr do            bcont = [] @@ -96,7 +96,7 @@ module TableBuilderHelper      end      menu = content_tag :ul, class: 'dropdown-menu' do -      actions.collect do |action| +      actions.map do |action|          polymorph_url = []          unless [:show, :delete].include? action  | 
