Fix line lenght offenses at multiple controllers

This commit is contained in:
Bertocq
2018-02-18 23:54:37 +01:00
parent fbfabaeda4
commit 118deb9fc4
9 changed files with 50 additions and 28 deletions

View File

@@ -22,13 +22,15 @@ class AccountController < ApplicationController
end
def account_params
if @account.organization?
params.require(:account).permit(:phone_number, :email_on_comment, :email_on_comment_reply, :newsletter,
organization_attributes: [:name, :responsible_name])
else
params.require(:account).permit(:username, :public_activity, :public_interests, :email_on_comment, :email_on_comment_reply,
:email_on_direct_message, :email_digest, :newsletter, :official_position_badge)
end
attributes = if @account.organization?
[:phone_number, :email_on_comment, :email_on_comment_reply, :newsletter,
organization_attributes: [:name, :responsible_name]]
else
[:username, :public_activity, :public_interests, :email_on_comment,
:email_on_comment_reply, :email_on_direct_message, :email_digest, :newsletter,
:official_position_badge]
end
params.require(:account).permit(*attributes)
end
end