Commit e0f61a59 authored by Vinnie Okada's avatar Vinnie Okada

Use shorter map() syntax

parent 9e0467c3
......@@ -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
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment