Sometimes you want index powered by ElasticSearch but show is a
normal ActiveRecord Resource. While we still support the existing
syntax, you can now pass a hash of per-action Resources:
class PostsController < ApplicationController
jsonapi resource: {
index: PostSearchResource,
show: PostResource
}
end
Sometimes you want
index
powered by ElasticSearch butshow
is a normal ActiveRecord Resource. While we still support the existing syntax, you can now pass a hash of per-action Resources: