summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/stylesheets/scaffolds.css.scss2
-rw-r--r--app/models/game.rb1
-rw-r--r--app/models/user.rb18
-rw-r--r--app/views/games/index.html.erb4
4 files changed, 6 insertions, 19 deletions
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 @@
<h1>Listing games</h1>
-<table>
+<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
@@ -32,4 +32,4 @@
<br>
-<%= link_to 'New Game', new_game_path %>
+<%= link_to 'New Game', new_game_path, {:class => "btn btn-warning"} %>