projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added first full working version of embeddable elections
[selectricity-live]
/
app
/
models
/
election.rb
diff --git
a/app/models/election.rb
b/app/models/election.rb
index 7d8ad80d883ee45ab6bee1a875ed446478d68151..08ef1a57c025d7fe5192d0dc396b828ada9a12f0 100644
(file)
--- a/
app/models/election.rb
+++ b/
app/models/election.rb
@@
-73,7
+73,7
@@
class Election < ActiveRecord::Base
reasons << "You must have at least two candidates."
end
reasons << "You must have at least two candidates."
end
- if self.voters.length <= 1
+ if self.voters.length <= 1
and self.authenticated?
reasons << "You must have at least two voters."
end
reasons << "You must have at least two voters."
end
@@
-97,6
+97,10
@@
class Election < ActiveRecord::Base
active == 2
end
active == 2
end
+ def authenticated?
+ authenticated
+ end
+
def shortdesc
shortdesc = description.split(/\n/)[0]
end
def shortdesc
shortdesc = description.split(/\n/)[0]
end
Benjamin Mako Hill
||
Want to submit a patch?