Class: PublishMyData::InformationResourcesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- PublishMyData::InformationResourcesController
- Includes:
- ResourceRendering
- Defined in:
- app/controllers/publish_my_data/information_resources_controller.rb
Instance Method Summary collapse
Instance Method Details
#data ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/controllers/publish_my_data/information_resources_controller.rb', line 11 def data uri = "http://#{PublishMyData.local_domain}/data/#{params[:id]}" @resource = PublishMyData::Resource.find(uri, local: true) respond_with(@resource) do |format| format.html { render_resource(@resource) } format.atom { @resource.is_a?(PublishMyData::Dataset) ? render(template: template_for_resource(@resource)) : head(406) } end end |
#def ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/controllers/publish_my_data/information_resources_controller.rb', line 21 def def uri = "http://#{PublishMyData.local_domain}/def/#{params[:id]}" resource = PublishMyData::Resource.find(uri, local: true) respond_with(resource) do |format| format.html { render_resource(resource) } end end |