Class: Spotlight::TagsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::TagsController
- Defined in:
- app/controllers/spotlight/tags_controller.rb
Instance Method Summary collapse
Methods included from Controller
#blacklight_config, #current_exhibit, #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
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. 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 { |x| x.name } } end end |