From e0f61a59b4e9be1fc2f20320a0400793318b8a9f Mon Sep 17 00:00:00 2001 From: Vinnie Okada Date: Sun, 15 Feb 2015 20:50:53 -0700 Subject: Use shorter map() syntax --- app/controllers/profiles_controller.rb | 4 +--- app/views/admin/applications/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index e3e36505f0b..a7863aba756 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -16,9 +16,7 @@ class ProfilesController < ApplicationController def applications @applications = current_user.oauth_applications @authorized_tokens = current_user.oauth_authorized_tokens - @authorized_apps = @authorized_tokens.map do |token| - token.application - end.uniq + @authorized_apps = @authorized_tokens.map(&:application).uniq end def update diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index 0632888dc82..d550278710e 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -17,6 +17,6 @@ %tr{:id => "application_#{application.id}"} %td= link_to application.name, admin_application_path(application) %td= application.redirect_uri - %td= application.access_tokens.map { |t| t.resource_owner_id }.uniq.count + %td= application.access_tokens.map(&:resource_owner_id).uniq.count %td= link_to 'Edit', edit_admin_application_path(application), class: 'btn btn-link' %td= render 'delete_form', application: application -- cgit v1.2.1