chore: revert memoization patterns and redundant default values
- Disable Style/MemoizeInstanceVariable and Style/RedundantAssignment rules - Revert all instance_variable_defined? patterns back to ||= memoization - Restore || 0 and || 1 default values that were removed by RuboCop - Restore ternary operator formatting - Reduce PR from 35 to 18 files by removing cosmetic style changes
This commit is contained in:
@@ -25,11 +25,7 @@ class Api::V1::Widget::BaseController < ApplicationController
|
||||
end
|
||||
|
||||
def inbox
|
||||
if instance_variable_defined?(:@inbox)
|
||||
@inbox
|
||||
else
|
||||
@inbox = ::Inbox.find_by(id: auth_token_params[:inbox_id])
|
||||
end
|
||||
@inbox ||= ::Inbox.find_by(id: auth_token_params[:inbox_id])
|
||||
end
|
||||
|
||||
def conversation_params
|
||||
|
||||
Reference in New Issue
Block a user