Sha256: ab188d2a21c68346ed480ff074cff24c5afc8bdec67835314bfd0c224ed18078
Contents?: true
Size: 897 Bytes
Versions: 1
Compression:
Stored size: 897 Bytes
Contents
require_dependency "publish_my_data/application_controller" module PublishMyData class ThemesController < ApplicationController caches_action :show, :index, :cache_path => Proc.new { |c| c.params }, :if => Proc.new { |c| c.request.format.html? } respond_to :html, :ttl, :rdf, :nt, :json 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
publish_my_data-0.0.14 | app/controllers/publish_my_data/themes_controller.rb |