Sha256: 792a7ec7d0782bee8ca3fbee3cd2332903a53e9143a1fa2ca614d7f9e889787d
Contents?: true
Size: 775 Bytes
Versions: 9
Compression:
Stored size: 775 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_criteria, @pagination_params).paginate respond_with(@datasets) else raise Tripod::Errors::ResourceNotFound end end end end
Version data entries
9 entries across 9 versions & 1 rubygems