Class: Spotlight::TagsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::TagsController
- Defined in:
- app/controllers/spotlight/tags_controller.rb
Overview
CRUD actions for document tags
Instance Method Summary collapse
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #default_masthead?, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #search_action_url, #search_facet_url
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#destroy ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/controllers/spotlight/tags_controller.rb', line 21 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
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/spotlight/tags_controller.rb', line 8 def index :tag, @exhibit @tags = @exhibit. t(:'spotlight.exhibits.breadcrumb', title: @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(&:name) } end end |