Replace some instances of Current.account with model account
This commit is contained in:
@@ -7,7 +7,7 @@ module Board::Entropic
|
||||
end
|
||||
|
||||
def entropy
|
||||
super || Current.account.entropy
|
||||
super || account.entropy
|
||||
end
|
||||
|
||||
def auto_postpone_period=(new_value)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user