Replace some instances of Current.account with model account

This commit is contained in:
Mike Dalessio
2025-11-10 15:49:59 -05:00
parent bca694f9f8
commit 9697f7b43d
4 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ module Board::Entropic
end
def entropy
super || Current.account.entropy
super || account.entropy
end
def auto_postpone_period=(new_value)
+1 -1
View File
@@ -24,7 +24,7 @@ module Card::Promptable
* Board id: #{board_id}
* Board name: #{board.name}
* Number of comments: #{comments.count}
* Path: #{card_path(self, script_name: Current.account.slug)}
* Path: #{card_path(self, script_name: account.slug)}
END OF CARD #{id}
PROMPT
+1 -1
View File
@@ -20,7 +20,7 @@ module Comment::Promptable
* Card title: #{card.title}
* Created by: #{creator.name}}
* Created at: #{created_at}}
* Path: #{card_path(card, anchor: ActionView::RecordIdentifier.dom_id(self), script_name: Current.account.slug)}
* Path: #{card_path(card, anchor: ActionView::RecordIdentifier.dom_id(self), script_name: account.slug)}
END OF COMMENT #{id}
PROMPT
end
+1 -2
View File
@@ -49,8 +49,7 @@ class Webhook < ApplicationRecord
end
def renderer
# TODO:PLANB: Current.account is not quite right, we should use the webhook's account_id
@renderer ||= ApplicationController.renderer.new(script_name: "/#{Current.account.external_account_id}", https: !Rails.env.local?)
@renderer ||= ApplicationController.renderer.new(script_name: "/#{account.external_account_id}", https: !Rails.env.local?)
end
def for_basecamp?