mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
add scope for discover_regen
This commit is contained in:
@@ -20,7 +20,7 @@ class ConnectAppJob < ApplicationJob
|
||||
selector = "#connected-app-discover-regen.enterprise_#{enterprise.id}"
|
||||
html = ApplicationController.render(
|
||||
partial: "admin/enterprises/form/connected_apps/discover_regen",
|
||||
locals: { enterprise:, connected_app: enterprise.connected_apps.first},
|
||||
locals: { enterprise:, connected_app: enterprise.connected_apps.discover_regen.first },
|
||||
)
|
||||
|
||||
cable_ready[channel].morph(selector:, html:).broadcast
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
class ConnectedApp < ApplicationRecord
|
||||
belongs_to :enterprise
|
||||
|
||||
scope :discover_regen, -> { where(type: "ConnectedApp") }
|
||||
|
||||
def connecting?
|
||||
data.nil?
|
||||
end
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
= render partial: "/admin/enterprises/form/connected_apps/discover_regen",
|
||||
locals: { enterprise:, connected_app: enterprise.connected_apps.first }
|
||||
locals: { enterprise:, connected_app: enterprise.connected_apps.discover_regen.first }
|
||||
|
||||
Reference in New Issue
Block a user