Skip to content

Commit

Permalink
rubocop適用
Browse files Browse the repository at this point in the history
  • Loading branch information
KOH6 committed Sep 13, 2023
1 parent 88feb02 commit 3b94354
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/tasks/promotion_code.rake
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# frozen_string_literal: true

namespace :promotion_code do
task generate: :environment do
10.times do |n|
10.times do
code = SecureRandom.alphanumeric(7)
discount = rand(1..10) * 100
PromotionCode.create(code: ,discount:)
PromotionCode.create(code:, discount:)
puts "コード #{code}#{discount}円割引"
end
end
Expand Down

0 comments on commit 3b94354

Please sign in to comment.