Class: Spotlight::SitesController
Overview
Global site configuration
Instance Method Summary
collapse
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #current_site, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #resource_masthead?, #search_action_url, #search_facet_url
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#edit ⇒ Object
9
10
|
# File 'app/controllers/spotlight/sites_controller.rb', line 9
def edit
end
|
#edit_exhibits ⇒ Object
12
13
|
# File 'app/controllers/spotlight/sites_controller.rb', line 12
def edit_exhibits
end
|
24
25
26
27
28
29
30
|
# File 'app/controllers/spotlight/sites_controller.rb', line 24
def tags
authorize! :tag, @site
respond_to do |format|
format.json { render json: Spotlight::Exhibit.all_tags.map(&:name) }
end
end
|
#update ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'app/controllers/spotlight/sites_controller.rb', line 15
def update
if @site.update(site_params)
redirect_to exhibits_path, notice: t(:'helpers.submit.site.updated', model: @site.class.model_name.human.downcase)
else
flash[:alert] = @site.errors.full_messages.join('<br>'.html_safe)
render action: :edit
end
end
|