app/controllers/spotlight/custom_fields_controller.rb in blacklight-spotlight-4.1.2 vs app/controllers/spotlight/custom_fields_controller.rb in blacklight-spotlight-4.2.0
- old
+ new
@@ -10,15 +10,15 @@
load_and_authorize_resource through: :exhibit
before_action :attach_breadcrumbs, only: %i[new edit]
def new
@custom_field.field_type ||= 'text'
- add_breadcrumb t(:'helpers.action.spotlight/custom_field.create'), new_exhibit_custom_field_path(@exhibit)
+ add_breadcrumb(t(:'helpers.action.spotlight/custom_field.create'), new_exhibit_custom_field_path(@exhibit))
end
def edit
- add_breadcrumb @custom_field.label, edit_exhibit_custom_field_path(@custom_field.exhibit, @custom_field)
+ add_breadcrumb(@custom_field.label, edit_exhibit_custom_field_path(@custom_field.exhibit, @custom_field))
end
def create
@custom_field.attributes = custom_field_params
@custom_field.exhibit = current_exhibit
@@ -48,12 +48,12 @@
end
protected
def attach_breadcrumbs
- add_breadcrumb t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit
- add_breadcrumb t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)
- add_breadcrumb t(:'spotlight.metadata_configurations.edit.header'), edit_exhibit_metadata_configuration_path(@exhibit)
+ add_breadcrumb(t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit)
+ add_breadcrumb(t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit))
+ add_breadcrumb(t(:'spotlight.metadata_configurations.edit.header'), edit_exhibit_metadata_configuration_path(@exhibit))
end
def custom_field_params
params.require(:custom_field).permit(:label, :short_description, :field_type, :is_multiple)
end