summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-06 20:18:11 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-06 20:24:04 +0200
commit5c36e7c3247c205b2bc2455f95f38fe01616498e (patch)
tree7b484291b6fb4ebbb5e22afc67bdca50ba8ff3f5 /lib
parent8294dc68e3021525a27e68e8e9e51f372a71e85b (diff)
downloadnorsk-urskog-registrations-5c36e7c3247c205b2bc2455f95f38fe01616498e.tar.gz
norsk-urskog-registrations-5c36e7c3247c205b2bc2455f95f38fe01616498e.tar.bz2
norsk-urskog-registrations-5c36e7c3247c205b2bc2455f95f38fe01616498e.zip
Test that we get an error message when submitting an empty form
Diffstat (limited to 'lib')
-rw-r--r--lib/band.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/band.rb b/lib/band.rb
index 49180d8..ac0a9db 100644
--- a/lib/band.rb
+++ b/lib/band.rb
@@ -17,8 +17,10 @@ class Band
@contact = Contact.new(params['contact'])
@members = []
- params['members'].each do |k, m|
- @members << Member.new(m)
+ if params['members']
+ params['members'].each do |k, m|
+ @members << Member.new(m)
+ end
end
@songs = []