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 Concerns::ApplicationController
#enabled_in_spotlight_view_type_configuration?, #field_enabled?
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #current_site, #default_url_options, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #resource_masthead?, #search_action_url, #search_facet_url, #set_exhibit_locale_scope, #set_locale
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 |