Skip to content

Commit

Permalink
simple validation on report model
Browse files Browse the repository at this point in the history
  • Loading branch information
evsasse committed Dec 10, 2024
1 parent 422797a commit c46e2da
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,41 @@

/app/assets/builds/*
!/app/assets/builds/.keep

# Created by https://www.toptal.com/developers/gitignore/api/macos
# Edit at https://www.toptal.com/developers/gitignore?templates=macos

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

# End of https://www.toptal.com/developers/gitignore/api/macos
6 changes: 6 additions & 0 deletions app/models/report.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
class Report < ApplicationRecord
KINDS = %w[simplecov].freeze

enum :kind, KINDS.index_with(&:to_s)

belongs_to :organization
belongs_to :project

has_one_attached :bundled_html

validates :name, :kind, presence: true
end

0 comments on commit c46e2da

Please sign in to comment.