lib/quick_script/interaction.rb in quick_script-0.10.2 vs lib/quick_script/interaction.rb in quick_script-0.11.0
- old
+ new
@@ -26,9 +26,13 @@
opts[:data] = data
opts[:meta] = meta
opts.to_json
end
+ def json_error(errors, meta = 404, opts = {})
+ json_resp({:errors => errors}, meta, opts)
+ end
+
def handle_params
@scope = {}
@scope[:name] = params[:scope].first.to_sym if params[:scope]
@scope[:args] = params[:scope][1..-1] if params[:scope]
@scope[:limit] = params[:limit].to_i if params[:limit]