diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-30 13:29:08 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-30 13:29:08 -0500 |
commit | 0929719a845897cc8567cf972e07a69a71f0fa6f (patch) | |
tree | 2b6f69c1d906abb6e0abf8a0f1d51725bc78087d /app/models/score.rb | |
parent | 01c1947537e4e23ded0c16812a7cd9d49ad88356 (diff) | |
download | wittle-0929719a845897cc8567cf972e07a69a71f0fa6f.tar.gz wittle-0929719a845897cc8567cf972e07a69a71f0fa6f.tar.bz2 wittle-0929719a845897cc8567cf972e07a69a71f0fa6f.zip |
Migrate to a full rails app
Diffstat (limited to 'app/models/score.rb')
-rw-r--r-- | app/models/score.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/score.rb b/app/models/score.rb new file mode 100644 index 0000000..1958389 --- /dev/null +++ b/app/models/score.rb | |||
@@ -0,0 +1,7 @@ | |||
1 | class Score < ApplicationRecord | ||
2 | belongs_to :puzzle | ||
3 | |||
4 | validates :name, presence: true | ||
5 | validates :ip, presence: true | ||
6 | validates_uniqueness_of :name, scope: :puzzle_id | ||
7 | end | ||