app/controllers/spotlight/pages_controller.rb in blacklight-spotlight-4.1.2 vs app/controllers/spotlight/pages_controller.rb in blacklight-spotlight-4.2.0
- old
+ new
@@ -160,11 +160,11 @@
alias page_collection_name controller_name
def attach_breadcrumbs
if view_context.current_page? '/'
- add_breadcrumb t(:'spotlight.curation.nav.home', title: current_exhibit.title), main_app.root_path
+ add_breadcrumb(t(:'spotlight.curation.nav.home', title: current_exhibit.title), main_app.root_path)
elsif @page
# Use curator-accessible i18n key for user-facing breadcrumb
breadcrumb_to_exhibit_root(:'spotlight.curation.nav.home')
else
# Use admin interface language for dashboard breadcrumb
@@ -185,10 +185,10 @@
pages_attributes: %i[id published]
)
end
def breadcrumb_to_exhibit_root(key)
- add_breadcrumb t(key, title: current_exhibit.title), spotlight.exhibit_root_path(current_exhibit)
+ add_breadcrumb(t(key, title: current_exhibit.title), spotlight.exhibit_root_path(current_exhibit))
end
# Only allow trusted parameters through.
def page_params
params.require(controller_name.singularize).permit(allowed_page_params)