app/controllers/spotlight/custom_fields_controller.rb in blacklight-spotlight-0.3.1 vs app/controllers/spotlight/custom_fields_controller.rb in blacklight-spotlight-0.4.1

- old
+ new

@@ -4,10 +4,11 @@ load_and_authorize_resource :exhibit, class: Spotlight::Exhibit load_and_authorize_resource through: :exhibit before_filter :attach_breadcrumbs, only: [:new, :edit] def new + @custom_field.field_type ||= "text" 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) @@ -44,8 +45,8 @@ add_breadcrumb t(:'spotlight.curation.sidebar.header'), exhibit_dashboard_path(@exhibit) add_breadcrumb t(:'spotlight.blacklight_configurations.edit_metadata_fields.header'), exhibit_edit_metadata_path(@exhibit) end def custom_field_params - params.require(:custom_field).permit(:label, :short_description) + params.require(:custom_field).permit(:label, :short_description, :field_type) end end