Fix rubocop warnings

This commit is contained in:
Tom Hughes 2016-06-09 22:18:28 +01:00
parent 2ea4ecce54
commit 72e71b9972
9 changed files with 26 additions and 35 deletions

View file

@ -300,10 +300,9 @@ class ApiController < ApplicationController
# * if authenticated via basic auth all permissions are granted, so the list will contain all permissions.
# * unauthenticated users have no permissions, so the list will be empty.
def permissions
@permissions = case
when current_token.present?
@permissions = if current_token.present?
ClientApplication.all_permissions.select { |p| current_token.read_attribute(p) }
when @user
elsif @user
ClientApplication.all_permissions
else
[]

View file

@ -3,14 +3,12 @@ module NoteHelper
if by.nil?
I18n.t("browse.note." + event + "_by_anonymous",
:when => friendly_date(at),
:exact_time => l(at)
).html_safe
:exact_time => l(at)).html_safe
else
I18n.t("browse.note." + event + "_by",
:when => friendly_date(at),
:exact_time => l(at),
:user => note_author(by)
).html_safe
:user => note_author(by)).html_safe
end
end