Sha256: fd7afdaeeb6cd5e061e1e08b4673c1bbc3c6d5053bcb8f49ab19879491eb8b1e
Contents?: true
Size: 816 Bytes
Versions: 40
Compression:
Stored size: 816 Bytes
Contents
require_dependency "publish_my_data/application_controller" module PublishMyData class ThemesController < ApplicationController respond_to :html, :ttl, :rdf, :nt, :json, :text def index # don't bother paginating this for now - there probably wont be that many themes @themes = Theme.all.where("?uri <#{RDF::RDFS.label}> ?label").order("?label").resources respond_with(@themes) end def show @theme = Theme.by_slug(params[:id]) if @theme @pagination_params = ResourcePaginationParams.from_request(request) @datasets = Paginator.new(@theme.datasets_query_str, @pagination_params, resource_class: PublishMyData::Dataset).paginate respond_with(@datasets) else raise Tripod::Errors::ResourceNotFound end end end end
Version data entries
40 entries across 40 versions & 1 rubygems