db/samples/variants.rb in solidus_sample-2.2.2 vs db/samples/variants.rb in solidus_sample-2.3.0.beta1
- old
+ new
@@ -1,25 +1,25 @@
Spree::Sample.load_sample("option_values")
Spree::Sample.load_sample("products")
-ror_baseball_jersey = Spree::Product.find_by_name!("Ruby on Rails Baseball Jersey")
-ror_tote = Spree::Product.find_by_name!("Ruby on Rails Tote")
-ror_bag = Spree::Product.find_by_name!("Ruby on Rails Bag")
-ror_jr_spaghetti = Spree::Product.find_by_name!("Ruby on Rails Jr. Spaghetti")
-ror_mug = Spree::Product.find_by_name!("Ruby on Rails Mug")
-ror_ringer = Spree::Product.find_by_name!("Ruby on Rails Ringer T-Shirt")
-ror_stein = Spree::Product.find_by_name!("Ruby on Rails Stein")
-ruby_baseball_jersey = Spree::Product.find_by_name!("Ruby Baseball Jersey")
-apache_baseball_jersey = Spree::Product.find_by_name!("Apache Baseball Jersey")
+ror_baseball_jersey = Spree::Product.find_by!(name: "Ruby on Rails Baseball Jersey")
+ror_tote = Spree::Product.find_by!(name: "Ruby on Rails Tote")
+ror_bag = Spree::Product.find_by!(name: "Ruby on Rails Bag")
+ror_jr_spaghetti = Spree::Product.find_by!(name: "Ruby on Rails Jr. Spaghetti")
+ror_mug = Spree::Product.find_by!(name: "Ruby on Rails Mug")
+ror_ringer = Spree::Product.find_by!(name: "Ruby on Rails Ringer T-Shirt")
+ror_stein = Spree::Product.find_by!(name: "Ruby on Rails Stein")
+ruby_baseball_jersey = Spree::Product.find_by!(name: "Ruby Baseball Jersey")
+apache_baseball_jersey = Spree::Product.find_by!(name: "Apache Baseball Jersey")
-small = Spree::OptionValue.find_by_name!("Small")
-medium = Spree::OptionValue.find_by_name!("Medium")
-large = Spree::OptionValue.find_by_name!("Large")
-extra_large = Spree::OptionValue.find_by_name!("Extra Large")
+small = Spree::OptionValue.find_by!(name: "Small")
+medium = Spree::OptionValue.find_by!(name: "Medium")
+large = Spree::OptionValue.find_by!(name: "Large")
+extra_large = Spree::OptionValue.find_by!(name: "Extra Large")
-red = Spree::OptionValue.find_by_name!("Red")
-blue = Spree::OptionValue.find_by_name!("Blue")
-green = Spree::OptionValue.find_by_name!("Green")
+red = Spree::OptionValue.find_by!(name: "Red")
+blue = Spree::OptionValue.find_by!(name: "Blue")
+green = Spree::OptionValue.find_by!(name: "Green")
variants = [
{
product: ror_baseball_jersey,
option_values: [small, red],