Skip to content

Commit

Permalink
upgraded to rails 3.2.8 and added user registration validations
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismatthieu committed Aug 18, 2012
1 parent 01f006e commit 3cb1c36
Show file tree
Hide file tree
Showing 9 changed files with 603 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Gemfile
@@ -1,6 +1,6 @@
source 'http://rubygems.org'

gem 'rails', '3.2.7'
gem 'rails', '3.2.8'

# gem "will_paginate", :git => "https://github.com/p7r/will_paginate.git", :branch => "rails3"
gem "will_paginate"
Expand Down
64 changes: 32 additions & 32 deletions Gemfile.lock
@@ -1,31 +1,31 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (3.2.7)
actionpack (= 3.2.7)
actionmailer (3.2.8)
actionpack (= 3.2.8)
mail (~> 2.4.4)
actionpack (3.2.7)
activemodel (= 3.2.7)
activesupport (= 3.2.7)
actionpack (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.7)
activesupport (= 3.2.7)
activemodel (3.2.8)
activesupport (= 3.2.8)
builder (~> 3.0.0)
activerecord (3.2.7)
activemodel (= 3.2.7)
activesupport (= 3.2.7)
activerecord (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.7)
activemodel (= 3.2.7)
activesupport (= 3.2.7)
activesupport (3.2.7)
activeresource (3.2.8)
activemodel (= 3.2.8)
activesupport (= 3.2.8)
activesupport (3.2.8)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
Expand All @@ -42,19 +42,19 @@ GEM
event-calendar (2.3.3)
execjs (1.4.0)
multi_json (~> 1.0)
faraday (0.8.1)
faraday (0.8.4)
multipart-post (~> 1.1)
gravatar_image_tag (1.0.0.pre2)
hashie (1.2.0)
hike (1.2.1)
httpauth (0.1)
i18n (0.6.0)
journey (1.0.4)
jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0)
jquery-rails (2.1.1)
railties (>= 3.1.0, < 5.0)
thor (~> 0.14)
jquery_mobile-rails (1.1.0)
json (1.7.4)
json (1.7.5)
jwt (0.1.5)
multi_json (>= 1.0)
mail (2.4.4)
Expand Down Expand Up @@ -95,17 +95,17 @@ GEM
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.7)
actionmailer (= 3.2.7)
actionpack (= 3.2.7)
activerecord (= 3.2.7)
activeresource (= 3.2.7)
activesupport (= 3.2.7)
rails (3.2.8)
actionmailer (= 3.2.8)
actionpack (= 3.2.8)
activerecord (= 3.2.8)
activeresource (= 3.2.8)
activesupport (= 3.2.8)
bundler (~> 1.0)
railties (= 3.2.7)
railties (3.2.7)
actionpack (= 3.2.7)
activesupport (= 3.2.7)
railties (= 3.2.8)
railties (3.2.8)
actionpack (= 3.2.8)
activesupport (= 3.2.8)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
Expand All @@ -115,7 +115,7 @@ GEM
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
sass (3.1.20)
sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
Expand All @@ -125,14 +125,14 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.15.4)
thor (0.16.0)
tilt (1.3.3)
tinymce-rails (3.5.6)
railties (>= 3.1.1)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
twitter (3.4.1)
twitter (3.6.0)
faraday (~> 0.8)
multi_json (~> 1.3)
simple_oauth (~> 0.1.6)
Expand All @@ -158,7 +158,7 @@ DEPENDENCIES
omniauth-facebook
omniauth-twitter
pg
rails (= 3.2.7)
rails (= 3.2.8)
rest-client
sass-rails
tinymce-rails
Expand Down
Binary file modified app/assets/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Expand Up @@ -130,7 +130,7 @@ def create
if @council
@user.council_id = @council.id
else
@newcouncil = Council.find(params[:user][:council_id])
@newcouncil = Council.find(params[:user][:council_id]) rescue nil
if @newcouncil.nil?
@newcouncil = Council.new
@newcouncil.councilnumber = params[:user][:council_id]
Expand Down
4 changes: 3 additions & 1 deletion app/models/user.rb
Expand Up @@ -3,7 +3,9 @@ class User < ActiveRecord::Base
has_secure_password
# validates_uniqueness_of :username, :on => :create
validates :username, :presence =>true,
:uniqueness=>true, :on => :create
:uniqueness=>true, :on => :create
validates_format_of :username, :with => /^[A-Za-z\d_]+$/,
:message => "can only contain letters and numbers (no spaces)."
validates :fullname, :presence =>true,
:uniqueness=>true, :on => :create
validates :email, :presence =>true,
Expand Down
Binary file modified app/views/.DS_Store
Binary file not shown.
566 changes: 566 additions & 0 deletions log/development.log

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

0 comments on commit 3cb1c36

Please sign in to comment.