mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add dfc_name field on Spree::Taxons
This will let us map OFN product taxons to DFC product types
This commit is contained in:
@@ -117,8 +117,8 @@ module Spree
|
||||
|
||||
def taxon_params
|
||||
params.require(:taxon).permit(
|
||||
:name, :parent_id, :position, :icon, :description, :permalink,
|
||||
:taxonomy_id, :meta_description, :meta_keywords, :meta_title
|
||||
:name, :parent_id, :position, :icon, :description, :permalink, :taxonomy_id,
|
||||
:meta_description, :meta_keywords, :meta_title, :dfc_name
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
= f.label :meta_keywords, t(".meta_keywords")
|
||||
%br/
|
||||
= f.text_field :meta_keywords, class: 'fullwidth', rows: 6
|
||||
= f.field_container :dfc_name do
|
||||
= f.label :dfc_name, t(".dfc_name")
|
||||
%br/
|
||||
= f.text_field :dfc_name, class: 'fullwidth', rows: 6
|
||||
.omega.seven.columns
|
||||
= f.field_container :description do
|
||||
= f.label :description, t(".description")
|
||||
|
||||
@@ -4487,6 +4487,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
|
||||
meta_description: Meta Description
|
||||
meta_keywords: Meta Keywords
|
||||
description: Description
|
||||
dfc_name: DFC name
|
||||
general_settings:
|
||||
edit:
|
||||
legal_settings: "Legal Settings"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddDfcNameToSpreeTaxons < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
add_column :spree_taxons, :dfc_name, :string
|
||||
end
|
||||
end
|
||||
@@ -881,6 +881,7 @@ ActiveRecord::Schema[7.0].define(version: 20231003000823494) do
|
||||
t.string "meta_title", limit: 255
|
||||
t.string "meta_description", limit: 255
|
||||
t.string "meta_keywords", limit: 255
|
||||
t.string "dfc_name"
|
||||
t.index ["parent_id"], name: "index_taxons_on_parent_id"
|
||||
t.index ["permalink"], name: "index_taxons_on_permalink"
|
||||
t.index ["taxonomy_id"], name: "index_taxons_on_taxonomy_id"
|
||||
|
||||
Reference in New Issue
Block a user