before_action
5 6 7 8 9 10 11
# File 'app/controllers/adhoq/explains_controller.rb', line 5 def create begin @result = Adhoq::Executor.new(params[:query]).explain rescue ActiveRecord::StatementInvalid => @statement_invalid render 'statement_invalid', status: :unprocessable_entity end end