Created
January 3, 2015 16:40
-
-
Save dbarrionuevo/f3336a9a16e401570e2c to your computer and use it in GitHub Desktop.
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
# db/seeds/01_service_categories.rb | |
puts "====================================================" | |
puts "Service Categories" | |
puts "====================================================" | |
jobs = ServiceCategory.where(name: "Jobs", code: "J").first_or_create | |
education = ServiceCategory.where(name: "Education", code: "E").first_or_create | |
business = ServiceCategory.where(name: "Business", code: "B").first_or_create | |
social = ServiceCategory.where(name: "Social", code: "S").first_or_create | |
# ............. | |
# ............. | |
# ............. |
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
# Load individual seed files from seeds directory | |
Dir[File.join(Rails.root, 'db', 'seeds', '*.rb')].sort.each { |seed| load seed } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment