From ba0b145820b29719e6bc9724d9d91682e4118686 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 4 Mar 2014 15:29:16 -0500 Subject: foo --- app/assets/stylesheets/scaffolds.css.scss | 2 +- app/models/game.rb | 1 + app/models/user.rb | 18 ++---------------- app/views/games/index.html.erb | 4 ++-- 4 files changed, 6 insertions(+), 19 deletions(-) (limited to 'app') diff --git a/app/assets/stylesheets/scaffolds.css.scss b/app/assets/stylesheets/scaffolds.css.scss index da26e90..39b6845 100644 --- a/app/assets/stylesheets/scaffolds.css.scss +++ b/app/assets/stylesheets/scaffolds.css.scss @@ -1,5 +1,5 @@ body { - background-color: #fff; + background-color: #EEEEEE; color: #333; font-family: verdana, arial, helvetica, sans-serif; font-size: 13px; diff --git a/app/models/game.rb b/app/models/game.rb index a181c26..b3b6977 100644 --- a/app/models/game.rb +++ b/app/models/game.rb @@ -1,2 +1,3 @@ class Game < ActiveRecord::Base + has_many :game_attributes end diff --git a/app/models/user.rb b/app/models/user.rb index 23caf84..bd96223 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -13,26 +13,12 @@ class User < ActiveRecord::Base ## # VAILD_EMAIL is the regex used to validate a user given email. - # - # A break down of the regex is listed below. - # - # / -------------> Start of the regex - # \A ------------> match start of a string - # [\w+\-.]+ -----> at least one word character, plus, hyphen, - # or dot - # @ -------------> literal ampersand - # [a-z\d\-.]+ ---> at least one letter, digit, hyphen, or dot - # (?:\.[a-z]+) --> ensures that the error of example@foo..com - # does not occur - # \z ------------> match end of a string - # / -------------> end of the regex - # i -------------> case insensitive - VALID_EMAIL_REG = /\A[\w+\-.]+@[a-z\d\-.]+(?:\.[a-z]+)\z/i + VALID_EMAIL_REG = /^\S+@\S+\.\S+$/i ## # VALID_USER_NAME checks to make sure a user's user_name # is in the proper format. - VALID_USER_NAME_REG = /[a-zA-Z0-9\-]/ + VALID_USER_NAME_REG = /^[a-zA-Z0-9\-]+$/ ## # The following lines put a user account through a series of diff --git a/app/views/games/index.html.erb b/app/views/games/index.html.erb index ccd0f63..6779307 100644 --- a/app/views/games/index.html.erb +++ b/app/views/games/index.html.erb @@ -1,6 +1,6 @@

Listing games

- +
@@ -32,4 +32,4 @@
-<%= link_to 'New Game', new_game_path %> +<%= link_to 'New Game', new_game_path, {:class => "btn btn-warning"} %> -- cgit v1.2.3-2-g168b
Name