Skip to content

Commit

Permalink
Tweaking User model
Browse files Browse the repository at this point in the history
  • Loading branch information
jcnetdev committed Aug 30, 2008
1 parent 495d3a8 commit fef3b08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/models/user.rb
Expand Up @@ -27,7 +27,7 @@ def rated_projects
return project_list
end

named_scope :registered, :conditions => {:state => "active"}
named_scope :registered, :conditions => ["state = 'active' OR state = 'pending'"]
named_scope :nil_password, :conditions => {:crypted_password => nil}

# Virtual attribute for the unencrypted password
Expand Down
9 changes: 5 additions & 4 deletions app/views/users/show.html.haml
Expand Up @@ -12,13 +12,14 @@

#body_right
- if current_or_anon_user == @user
- if @user.active?
- if @user.anonymous?
- right_box do
= partial "users/parts/about_user", :user => @user
= br
%h2= link_to "Create an Account!", new_user_url
%p In order to save your bookmarks, and share your profile with others, sign up now!
- else
- right_box do
= br
%h2= link_to "Make an Account!", new_user_url
= partial "users/parts/about_user", :user => @user
- else
- right_box do
%h3== #{name_display(@user)} Profile
Expand Down

0 comments on commit fef3b08

Please sign in to comment.