Class: DownloadsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- DownloadsController
- Includes:
- Sufia::Noid
- Defined in:
- app/controllers/downloads_controller.rb
Overview
Copyright © 2012 The Pennsylvania State University
Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Direct Known Subclasses
Instance Method Summary collapse
Methods included from Sufia::Noid
namespaceize, #noid, noidify, #normalize_identifier
Instance Method Details
#show ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/downloads_controller.rb', line 23 def show if can? :read, (params["id"]) logger.info "Can read #{params['id']}" send_content (params["id"]) return else logger.info "Can not read #{params['id']}" redirect_to "/assets/NoAccess.png" end end |