From a18bee8eacb918ae1239b075549710d3dacde0c9 Mon Sep 17 00:00:00 2001 From: Miles Zhang Date: Wed, 16 Oct 2024 14:54:19 +0900 Subject: [PATCH] feat: add relation of address and lock_script (#2244) Signed-off-by: Miles Zhang --- app/models/address.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/address.rb b/app/models/address.rb index b4028c36a..4381be719 100644 --- a/app/models/address.rb +++ b/app/models/address.rb @@ -12,6 +12,7 @@ class Address < ApplicationRecord has_many :mining_infos has_many :udt_accounts has_many :dao_events + belongs_to :lock_script, optional: true has_one :bitcoin_address_mapping, foreign_key: "ckb_address_id" has_one :bitcoin_address, through: :bitcoin_address_mapping