Sha256: b6b1c47fe85fae825a770707e389b1bbb3de88f99c9d41ba6fdbd0eac84439a1
Contents?: true
Size: 741 Bytes
Versions: 31
Compression:
Stored size: 741 Bytes
Contents
require_dependency "publish_my_data/application_controller" module PublishMyData class SparqlController < ApplicationController include PublishMyData::SparqlProcessing before_filter :check_format, :only => [:endpoint] def endpoint @query_text = params[:query] if @query_text.blank? unless is_request_html_format? #the html view handles this ok render :text => "no query supplied", :status => 400 end else build_sparql_query(@query_text) @sparql_query_result = process_sparql_query(@sparql_query) respond_to do |format| format.html { render } format.any { render text: @sparql_query_result } end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems