# test_helper.rb
def select_date_and_time(date, **options)
return nil unless date
field = options[:from]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inherit_from: ../.rubocop.yml | |
# Checks if uses of quotes match the configured preference. | |
Style/StringLiterals: | |
Enabled: false | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We need to use 'remote_<object>_url' as attribute instead of '<object>'. | |
# Having Image, we would use 'remote_image_url: <url>'. | |
titles = [Faker::RockBand.name, Faker::BossaNova.artist, Faker::Book.title] | |
54.times do |n| | |
start_date = Faker::Date.between(1.day.from_now, 6.months.from_now) | |
end_date = start_date + 1.day | |
Event.create!(title: titles.sample + " ##{n}", |
OlderNewer