@@ -4,7 +4,7 @@ class Avo::Resources::Speaker < Avo::BaseResource
4
4
if id . is_a? ( Array )
5
5
query . where ( slug : id )
6
6
else
7
- query . find_by ( slug : id )
7
+ query . find_by ( slug : id ) || query . find_by ( id : )
8
8
end
9
9
}
10
10
self . search = {
@@ -17,19 +17,13 @@ class Avo::Resources::Speaker < Avo::BaseResource
17
17
def fields
18
18
field :id , as : :id , link_to_record : true
19
19
field :name , as : :text , link_to_record : true , sortable : true
20
- field :twitter , as : :text
21
- field :github , as : :text
22
- field :speakerdeck , as : :text
23
- field :mastodon , as : :text , hide_on : :index
24
- field :linkedin , as : :text , hide_on : :index
25
- field :bsky , as : :text , hide_on : :index
26
20
field :bio , as : :textarea , hide_on : :index
27
- field :website , as : :text , hide_on : :index
28
21
field :slug , as : :text , hide_on : :index
29
22
field :talks_count , as : :number , sortable : true
30
23
field :canonical , as : :belongs_to , hide_on : :index
31
24
# field :suggestions, as: :has_many
32
25
# field :speaker_talks, as: :has_many
26
+ field :social_profiles , as : :has_many , use_resource : "Avo::Resources::SocialProfile"
33
27
field :talks , as : :has_many , use_resource : "Avo::Resources::Talk" , attach_scope : -> { query . order ( title : :asc ) } , searchable : true
34
28
end
35
29
0 commit comments