Sha256: e6a7254af19f6797922ec0cd09ce33e3bb2b29bb75d2bc057b57f7b3d4df0c88
Contents?: true
Size: 608 Bytes
Versions: 177
Compression:
Stored size: 608 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, current_ability) } end def create Motor::Resources::PersistConfigs.call(@resource) Motor::Configs::WriteToFile.call render json: { data: Motor::ApiQuery::BuildJson.call(@resource, params, current_ability) } end private def resource_params params.require(:data).permit! end end end
Version data entries
177 entries across 177 versions & 7 rubygems