Add option 'allow guest orders' to enterprise

An enterprise manager can choose to allow guest orders (default) or
require a valid login for checkout.
This commit is contained in:
Maikel Linke
2016-09-23 08:36:58 +10:00
parent 92694c729f
commit c59cd21698
5 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
class AddAllowGuestOrdersToEnterprise < ActiveRecord::Migration
def change
add_column :enterprises, :allow_guest_orders, :boolean, default: true, null: false
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160819065331) do
ActiveRecord::Schema.define(:version => 20160921060442) do
create_table "account_invoices", :force => true do |t|
t.integer "user_id", :null => false
@@ -248,6 +248,7 @@ ActiveRecord::Schema.define(:version => 20160819065331) do
t.boolean "charges_sales_tax", :default => false, :null => false
t.string "email_address"
t.boolean "require_login", :default => false, :null => false
t.boolean "allow_guest_orders", :default => true, :null => false
end
add_index "enterprises", ["address_id"], :name => "index_enterprises_on_address_id"