Sha256: 8bfde97343bad73553c85f87cb7068fb78df1a4018f161177b961fac91364e1b
Contents?: true
Size: 459 Bytes
Versions: 12
Compression:
Stored size: 459 Bytes
Contents
module Adhoq class PreviewsController < Adhoq::ApplicationController layout false def create begin query = Adhoq::Query.new(query: params[:query]) raw_query = query.substitute_query(params[:parameters] || {}) @result = Adhoq::Executor.new(raw_query).execute rescue ActiveRecord::StatementInvalid => @statement_invalid render 'statement_invalid', status: :unprocessable_entity end end end end
Version data entries
12 entries across 12 versions & 1 rubygems