diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2015-10-10 15:16:13 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2015-10-10 15:18:54 +0200 |
commit | d9696a5eb4aa8638b757ca95b4cc2a4d5b8ae4f6 (patch) | |
tree | 94859f172dbc3ecf831d13aab9263696793df122 /lib | |
parent | 2b664060f45efd7329b53f87f83cc764a5a53bdb (diff) | |
download | norsk-urskog-registrations-d9696a5eb4aa8638b757ca95b4cc2a4d5b8ae4f6.tar.gz norsk-urskog-registrations-d9696a5eb4aa8638b757ca95b4cc2a4d5b8ae4f6.tar.bz2 norsk-urskog-registrations-d9696a5eb4aa8638b757ca95b4cc2a4d5b8ae4f6.zip |
Reject bands with no name
Diffstat (limited to 'lib')
-rw-r--r-- | lib/band.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/band.rb b/lib/band.rb index e75dd6e..59e7541 100644 --- a/lib/band.rb +++ b/lib/band.rb @@ -41,6 +41,10 @@ class Band end def validate! + if @name.nil? || @name.strip.empty? + errors << "Bandnavn mangler" + end + if @songs.length <= 0 errors << "Du må ha med minst én låt!" end |