Skip to content

Commit

Permalink
some small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvlopes committed Jan 5, 2010
1 parent 2f35fc4 commit 44150ba
Show file tree
Hide file tree
Showing 19 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/controllers/members_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def index
end

def show
@user = User.find params[:id]
@user = User.find(params[:id], :include=>:projects)
end
end

3 changes: 1 addition & 2 deletions app/helpers/meetings_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ def content_links meeting
link_to h(content), content.url, :popup => true
end.to_sentence
end
end

end
2 changes: 1 addition & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Project < ActiveRecord::Base
default_scope :order => 'projects.name'

# Validations
validates_presence_of :user, :name, :description
validates_presence_of :user, :name

with_options :allow_blank => true do |u|
u.validates_length_of :name, :description, :in => 1..255
Expand Down
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class User < ActiveRecord::Base

with_options :allow_blank => true do |u|
u.validates_length_of :name, :city, :github, :in => 1..255
# FIXME: u.validates_as_email :email
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_uniqueness_of :email, :github, :case_sensitive => false
end
Expand All @@ -47,7 +47,7 @@ def fetch_projects!
def to_s
name
end

def github_url
"http://github.com/#{github}"
end
Expand Down
4 changes: 2 additions & 2 deletions app/views/members/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
usando Ruby desde #{@user.using_ruby_since}

.about
!= simple_format h(@user.about)
!= simple_format auto_link(h(@user.about), :link => :urls, :target => "_blank")

%ul.links
- if @user.site?
Expand All @@ -41,4 +41,4 @@
= link_to h(project), project.github_url

%p
= project.description
= project.description
3 changes: 1 addition & 2 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@
config.gem 'rspec', :lib => false, :version => '1.2.9'
config.gem 'rspec-rails', :lib => false, :version => '1.2.9'
config.gem 'remarkable_rails', :lib => false, :version => '3.1.11'
config.gem 'machinist', :lib => false, :version => '1.0.6'

config.gem 'machinist', :lib => false, :version => '1.0.6'
Empty file modified script/about
100644 → 100755
Empty file.
Empty file modified script/autospec
100644 → 100755
Empty file.
Empty file modified script/console
100644 → 100755
Empty file.
Empty file modified script/dbconsole
100644 → 100755
Empty file.
Empty file modified script/destroy
100644 → 100755
Empty file.
Empty file modified script/generate
100644 → 100755
Empty file.
Empty file modified script/performance/benchmarker
100644 → 100755
Empty file.
Empty file modified script/performance/profiler
100644 → 100755
Empty file.
Empty file modified script/plugin
100644 → 100755
Empty file.
Empty file modified script/runner
100644 → 100755
Empty file.
Empty file modified script/server
100644 → 100755
Empty file.
Empty file modified script/spec
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion spec/models/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
should_belong_to :user, :counter_cache => true

# Validations
should_validate_presence_of :user, :name, :description
should_validate_presence_of :user, :name

with_options :allow_blank => true do |p|
p.should_validate_length_of :name, :description, :in => 1..255
Expand Down

0 comments on commit 44150ba

Please sign in to comment.