mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-02 21:57:17 +00:00
Revert "Adding primary taxon to admin forms"
This reverts commit 110a6f2d14.
This commit is contained in:
@@ -4,3 +4,4 @@
|
||||
= f.label :notes, t(:notes)
|
||||
= f.text_area :notes, { :class => 'fullwidth', rows: 5 }
|
||||
= f.error_message_on :notes
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
class AddPrimaryTaxonToProducts < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :spree_products, :primary_taxon_id, :integer
|
||||
add_index :spree_products, :primary_taxon_id
|
||||
add_foreign_key :spree_products, :spree_taxons, column: :primary_taxon_id
|
||||
end
|
||||
end
|
||||
|
||||
@@ -689,7 +689,6 @@ ActiveRecord::Schema.define(:version => 20140522044009) do
|
||||
add_index "spree_products", ["name"], :name => "index_products_on_name"
|
||||
add_index "spree_products", ["permalink"], :name => "index_products_on_permalink"
|
||||
add_index "spree_products", ["permalink"], :name => "permalink_idx_unique", :unique => true
|
||||
add_index "spree_products", ["primary_taxon_id"], :name => "index_spree_products_on_primary_taxon_id"
|
||||
|
||||
create_table "spree_products_promotion_rules", :id => false, :force => true do |t|
|
||||
t.integer "product_id"
|
||||
@@ -1094,7 +1093,6 @@ ActiveRecord::Schema.define(:version => 20140522044009) do
|
||||
add_foreign_key "spree_products", "enterprises", name: "spree_products_supplier_id_fk", column: "supplier_id"
|
||||
add_foreign_key "spree_products", "spree_shipping_categories", name: "spree_products_shipping_category_id_fk", column: "shipping_category_id"
|
||||
add_foreign_key "spree_products", "spree_tax_categories", name: "spree_products_tax_category_id_fk", column: "tax_category_id"
|
||||
add_foreign_key "spree_products", "spree_taxons", name: "spree_products_primary_taxon_id_fk", column: "primary_taxon_id"
|
||||
|
||||
add_foreign_key "spree_products_promotion_rules", "spree_products", name: "spree_products_promotion_rules_product_id_fk", column: "product_id"
|
||||
add_foreign_key "spree_products_promotion_rules", "spree_promotion_rules", name: "spree_products_promotion_rules_promotion_rule_id_fk", column: "promotion_rule_id"
|
||||
|
||||
@@ -6,7 +6,6 @@ feature %q{
|
||||
} do
|
||||
include AuthenticationWorkflow
|
||||
include WebHelper
|
||||
let!(:taxon) { create(:taxon) }
|
||||
|
||||
background do
|
||||
@supplier = create(:supplier_enterprise, :name => 'New supplier')
|
||||
@@ -23,7 +22,6 @@ feature %q{
|
||||
|
||||
fill_in 'product_name', with: 'A new product !!!'
|
||||
fill_in 'product_price', with: '19.99'
|
||||
select taxon.name, from: "product_primary_taxon_id"
|
||||
select 'New supplier', from: 'product_supplier_id'
|
||||
|
||||
click_button 'Create'
|
||||
@@ -45,8 +43,6 @@ feature %q{
|
||||
|
||||
product.reload
|
||||
product.distributors.sort.should == [@distributors[0], @distributors[2]].sort
|
||||
|
||||
|
||||
product.product_distributions.map { |pd| pd.enterprise_fee }.sort.should == [@enterprise_fees[0], @enterprise_fees[2]].sort
|
||||
end
|
||||
|
||||
@@ -59,7 +55,6 @@ feature %q{
|
||||
|
||||
fill_in 'product_name', :with => 'A new product !!!'
|
||||
fill_in 'product_price', :with => '19.99'
|
||||
select taxon.name, from: "product_primary_taxon_id"
|
||||
select 'New supplier', :from => 'product_supplier_id'
|
||||
choose 'product_group_buy_1'
|
||||
fill_in 'Group buy unit size', :with => '10'
|
||||
@@ -104,7 +99,6 @@ feature %q{
|
||||
|
||||
page.should have_selector('#product_supplier_id')
|
||||
select 'Another Supplier', :from => 'product_supplier_id'
|
||||
select taxon.name, from: "product_primary_taxon_id"
|
||||
|
||||
# Should only have suppliers listed which the user can manage
|
||||
within "#product_supplier_id" do
|
||||
|
||||
Reference in New Issue
Block a user