Skip to content

Commit

Permalink
Update subscription_client_resource.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Sep 17, 2024
1 parent c5b8b08 commit 3f198c8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/models/subscription_client_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ class SubscriptionClientResource < ActiveRecord::Base
belongs_to :supplier, class_name: "SubscriptionClientSupplier"
has_many :notices, class_name: "SubscriptionClientNotice", as: :notice_subject, dependent: :destroy
has_many :subscriptions, foreign_key: "resource_id", class_name: "SubscriptionClientSubscription", dependent: :destroy

def source_url(bucket)
"s3://#{access_key_id}:#{secret_access_key}@#{bucket}"
end
end

# == Schema Information
#
# Table name: subscription_client_resources
#
# id :bigint not null, primary key
# supplier_id :bigint
# name :string not null
# created_at :datetime not null
# updated_at :datetime not null
# id :bigint not null, primary key
# supplier_id :bigint
# name :string not null
# created_at :datetime not null
# updated_at :datetime not null
# access_key_id :string
# secret_access_key :string
#

0 comments on commit 3f198c8

Please sign in to comment.