Class: Spotlight::TagsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::TagsController
- Defined in:
- app/controllers/spotlight/tags_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#destroy ⇒ Object
19 20 21 22 23 24 25 |
# File 'app/controllers/spotlight/tags_controller.rb', line 19 def destroy :tag, @exhibit # warning: this causes every solr document with this tag to reindex. That could be slow. @exhibit.owned_taggings.where(tag_id: params[:id]).destroy_all redirect_to (@exhibit) end |
#index ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/spotlight/tags_controller.rb', line 6 def index :tag, @exhibit @tags = @exhibit. @exhibit.title, @exhibit t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit) t(:'spotlight.curation.sidebar.tags'), (@exhibit) respond_to do |format| format.html format.json { render json: @exhibit..map { |x| x.name } } end end |