Class: Artk::ComponentsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Artk::ComponentsController
- Defined in:
- app/controllers/artk/components_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'app/controllers/artk/components_controller.rb', line 4 def index @results = Resource.find_by_ead_id(params[:resource_id]).all_series.collect { |s| s.pid_and_title } respond_to do |format| format.html { render :layout => false, :text => @results.to_json } format.json { render :layout => false, :text => @results.to_json } format.js { render :layout => false, :text => @results.to_json } end end |
#show ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/artk/components_controller.rb', line 13 def show @results = Resource.find_by_ead_id(params[:resource_id]).component(params[:id]) respond_to do |format| format.html { render :layout => false, :text => @results.to_json } format.json { render :layout => false, :text => @results.to_json } format.js { render :layout => false, :text => @results.to_json } end end |