Skip to content

Commit

Permalink
set_permalink and set_theme belong in user_extension
Browse files Browse the repository at this point in the history
  • Loading branch information
radar committed Oct 23, 2009
1 parent c0098b2 commit 45693b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 0 additions & 10 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,4 @@ def encrypt_password
def password_required?
crypted_password.blank? || !password.blank?
end

private

def set_permalink
self.permalink = to_s.parameterize
end

def set_theme
self.theme = Theme.find(:first)
end
end
8 changes: 8 additions & 0 deletions lib/rboard/user_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ def set_permissions
groups << Group.find_by_identifier("registered_users")
end
end

def set_permalink
self.permalink = to_s.parameterize
end

def set_theme
self.theme = Theme.find(:first)
end
end
end

Expand Down

0 comments on commit 45693b6

Please sign in to comment.