Skip to content

Commit

Permalink
seed db so that Curl example works
Browse files Browse the repository at this point in the history
  • Loading branch information
suprjinx committed Sep 4, 2024
1 parent 75b064a commit a86e926
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"forwardPorts": [3000, 5432, 8200],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bundle install && rake vault:setup",
"postCreateCommand": "bundle install && rake db:setup && rake vault:setup",

// Configure tool-specific properties.
// "customizations": {},
Expand Down
2 changes: 1 addition & 1 deletion app/models/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ class Domain < ApplicationRecord
before_save :clean_groups

def clean_groups
this.groups = groups.sort.uniq
self.groups = groups.sort.uniq
end
end
5 changes: 5 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end

# this is seed is for development only
if Rails.env.development?
Domain.first_or_create!(fqdn: "example.com", owner: "[email protected]")
end

0 comments on commit a86e926

Please sign in to comment.