app/controllers/spotlight/pages_controller.rb in blacklight-spotlight-3.0.0 vs app/controllers/spotlight/pages_controller.rb in blacklight-spotlight-3.0.1
- old
+ new
@@ -63,11 +63,12 @@
def create
@page.attributes = page_params
@page.last_edited_by = @page.created_by = current_user
if @page.save
- redirect_to [spotlight, @page.exhibit, page_collection_name], notice: t(:'helpers.submit.page.created', model: @page.class.model_name.human.downcase)
+ redirect_to [spotlight, @page.exhibit, page_collection_name.to_sym],
+ notice: t(:'helpers.submit.page.created', model: @page.class.model_name.human.downcase)
else
render action: 'new'
end
end
@@ -84,10 +85,10 @@
# DELETE /pages/1
def destroy
@page.destroy
- redirect_to [spotlight, @page.exhibit, page_collection_name], flash: { html_safe: true }, notice: undo_notice(:destroyed)
+ redirect_to [spotlight, @page.exhibit, page_collection_name.to_sym], flash: { html_safe: true }, notice: undo_notice(:destroyed)
end
def update_all
notice = if @exhibit.update update_all_page_params
t(:'helpers.submit.page.batch_updated', model: human_name)