Skip to content

Commit

Permalink
Add consortium_uid and use for serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Aug 12, 2022
1 parent 188f31d commit f0d6078
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ def uid
symbol.downcase
end

def consortium_uid
consortium_id.downcase
end

def from_salesforce=(value)
@from_salesforce = (value.to_s == "true")
end
Expand Down
1 change: 1 addition & 0 deletions app/serializers/provider_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class ProviderSerializer
has_many :contacts, record_type: :contacts
belongs_to :consortium,
record_type: :providers,
id_method_name: :consortium_uid,
serializer: ProviderSerializer,
if: Proc.new { |provider| provider.consortium_id }
has_many :consortium_organizations,
Expand Down

0 comments on commit f0d6078

Please sign in to comment.