Skip to content

Commit

Permalink
Specify the relation name to use on the model
Browse files Browse the repository at this point in the history
  • Loading branch information
yoldas committed Jan 23, 2024
1 parent 1ec913e commit 555768c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/resources/api/v2/tag_group_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ class TagGroupResource < BaseResource
default_includes :uuid_object, :tags

# Associations:
has_one :tag_group_adapter_type, foreign_key: :adapter_type_id, readonly: true, class_name: 'TagGroupAdapterType'
has_one :tag_group_adapter_type,
foreign_key: :adapter_type_id,
readonly: true,
class_name: 'TagGroupAdapterType',
relation_name: :adapter_type

# Attributes
attribute :uuid, readonly: true
Expand Down

0 comments on commit 555768c

Please sign in to comment.