Sha256: b526cac661aa04e0f3abeb74c675427ae74d803d3893a4de28308101bc770770

Contents?: true

Size: 446 Bytes

Versions: 9

Compression:

Stored size: 446 Bytes

Contents

vendor = Spree::Vendor.first_or_initialize do |v|
  v.name = 'Test Vendor'
end
vendor.save!

puts "Created Vendor with the name \"#{vendor.name}\"!"

user = Spree.user_class.where(email: 'user@vendor.com').first_or_initialize do |u|
  u.password = u.password_confirmation = 'vendor123'
end

vendor.users << user unless vendor.users.include?(user)
puts "Created Vendor Admin User with an email \"#{user.email}\" and password \"#{user.password}\"!"

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_multi_vendor-2.5.0 db/default/vendors.rb
spree_multi_vendor-2.4.1 db/default/vendors.rb
atkhayar-dev-spree-multi-vendor-0.0.0 db/default/vendors.rb
spree_multi_vendor-2.4.0 db/default/vendors.rb
spree_multi_vendor-2.3.0 db/default/vendors.rb
spree_multi_vendor-2.2.0 db/default/vendors.rb
spree_multi_vendor-2.1.0 db/default/vendors.rb
spree_multi_vendor-2.0.2 db/default/vendors.rb
spree_multi_vendor-2.0.1 db/default/vendors.rb