Class: PublishMyData::ThemesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PublishMyData::ThemesController
- Defined in:
- app/controllers/publish_my_data/themes_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/publish_my_data/themes_controller.rb', line 8 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 |
#show ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/publish_my_data/themes_controller.rb', line 14 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 |