From 927333f4f89403c5a6a2b421065112e517d88193 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 29 Sep 2016 21:28:21 +0200 Subject: Improve code style --- app/controllers/api/v1/accounts_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/controllers/api/v1/accounts_controller.rb') diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 23f48782f..50e6df80e 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -19,19 +19,19 @@ class Api::V1::AccountsController < ApiController end def follow - @follow = FollowService.new.(current_user.account, @account.acct) + @follow = FollowService.new.call(current_user.account, @account.acct) set_relationship render action: :relationship end def unfollow - @unfollow = UnfollowService.new.(current_user.account, @account) + @unfollow = UnfollowService.new.call(current_user.account, @account) set_relationship render action: :relationship end def relationships - ids = params[:id].is_a?(Enumerable) ? params[:id].map { |id| id.to_i } : [params[:id].to_i] + ids = params[:id].is_a?(Enumerable) ? params[:id].map(&:to_i) : [params[:id].to_i] @accounts = Account.find(ids) @following = Account.following_map(ids, current_user.account_id) @followed_by = Account.followed_by_map(ids, current_user.account_id) -- cgit