Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/tonnysk823/railsmg
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvlopes committed Mar 23, 2010
2 parents f8823cd + bdf2fbb commit d3610e6
Show file tree
Hide file tree
Showing 5 changed files with 20,065 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ public/system/**
.settings
tmp/
.DS_Store
*.swp
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class User < ActiveRecord::Base
with_options :allow_blank => true do |u|
u.validates_length_of :name, :city, :github, :in => 1..255
u.validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
u.validates_format_of :github, :with => /^[a-z_]+$/
u.validates_format_of :github, :with => /^[a-z_0-9]+$/
u.validates_uniqueness_of :email, :github, :case_sensitive => false
end

Expand Down
2 changes: 1 addition & 1 deletion spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
should_allow_values_for :email, '[email protected]', '[email protected]'
should_not_allow_values_for :email, 'john@doe', 'john.doe'

should_allow_values_for :github, 'john', 'jonh_doe'
should_allow_values_for :github, 'john', 'jonh_doe', 'jonh0909'
should_not_allow_values_for :github, 'jonhn doe', 'john.doe'

it 'active should be on protected attributes' do
Expand Down
20,062 changes: 20,062 additions & 0 deletions tags

Large diffs are not rendered by default.

Binary file not shown.

0 comments on commit d3610e6

Please sign in to comment.