Sha256: f2f989100222a0043df658662e8d52233df4d7c9cb003884a568323138bd903a
Contents?: true
Size: 584 Bytes
Versions: 18
Compression:
Stored size: 584 Bytes
Contents
# frozen_string_literal: true module Motor class ResourcesController < ApiBaseController wrap_parameters :data, except: %i[include fields] load_and_authorize_resource def index render json: { data: Motor::ApiQuery::BuildJson.call(@resources, params) } end def create Motor::BuildSchema::PersistResourceConfigs.call(@resource) Motor::Configs::WriteToFile.call render json: { data: Motor::ApiQuery::BuildJson.call(@resource, params) } end private def resource_params params.require(:data).permit! end end end
Version data entries
18 entries across 18 versions & 1 rubygems