trying to fix the damn validations

This commit is contained in:
Kyle Drake 2013-06-21 10:01:17 -07:00
parent 2659e2850d
commit 4e1bf0f73d
2 changed files with 6 additions and 8 deletions

View file

@ -74,11 +74,9 @@ class Site < Sequel::Model
# Check for existing user
if new?
user = self.class.select(:username).filter(username: values[:username]).first
if !user.nil? && (user.id != values[:id])
errors.add :username, 'This username is already taken. Try using another one.'
end
user = self.class.select(:username).filter(username: values[:username]).first
if !user.nil? && (user.id != values[:id])
errors.add :username, 'This username is already taken. Try using another one.'
end
if values[:password].nil? || (@password_length && @password_length < MINIMUM_PASSWORD_LENGTH)

View file

@ -14,7 +14,7 @@
td Anything you want! It's just HTML. It's your site, your vision. You can make it as normal or crazy as you want. You're the artist, you're in control. Make a site about you, or make it about cats that play Dungeons and Dragons, or make a Daft Punk Fan Site, or a Daft Punk Sucks Site.
tr
td: b What information can I put on it?
td Anything you wan't, as long as it's not illegal to host it in the United States (note to government: stuff that is <i>actually illegal</i>, not just stuff that embarrasses you or reveals your unconstitutional (and hence illegal) spying programs). We don't care if it offends somebody, or you remain anonymous.
td Anything you want, as long as it's not illegal to host it in the United States (note to government: stuff that is <i>actually illegal</i>, not just stuff that embarrasses you or reveals your unconstitutional (and hence illegal) spying programs). We don't care if it offends somebody, or you remain anonymous.
tr
td: b Do I own my content?
td Yes, you do. It's yours. We're just giving you a place to host it.
@ -23,7 +23,7 @@
td 10 Megabytes. You can have HTML, Images, Text, CSS, Markdown, and JavaScript. That's it.
tr
td: b How are you paying for this?
td Hopefully with donations. If you feel this is a useful service, help us pay the bills to run it. <a href="/about">Click here to contribute!</a>
td With donations. It's not that expensive. If you feel this is a useful service, <a href="/about">click here to contribute!</a>
.row
.span5.offset1
@ -33,4 +33,4 @@
h5 Returning users: <a href="/signin">Sign In</a>
.row
.span6.offset3
h4 style="line-height: 22pt" There are <b>#{Server.first.slots_available}</b> web site spaces remaining.<br>After that, we need your help to get another server.<br><a href="/about">HELP NEOCITIES PROSPER</a>
h4 style="line-height: 22pt" There are <b>#{Server.first.slots_available}</b> web site spaces remaining.<br>After that, we need your help to get another server.<br><a href="/about">HELP NEOCITIES PROSPER</a>