Sha256: a076b51e30192694797ca1a2a13970f1a3847c4cbb4c6efb19ee4b4ed7cbb005
Contents?: true
Size: 477 Bytes
Versions: 177
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true module Motor class ResourceDefaultQueriesController < ApiBaseController skip_authorization_check before_action :authorize_resource def show render json: { data: { sql: resource_class.all.to_sql } } end private def resource_class @resource_class ||= Motor::BuildSchema::Utils.classify_slug(params[:resource]) end def authorize_resource authorize!(resource_class, :manage) end end end
Version data entries
177 entries across 177 versions & 7 rubygems