Permalink
Browse files

Added joining of name function to User model.

  • Loading branch information...
1 parent 02d988a commit 49986660399cba1d75cad5cc0ff9b0e34ec533a7 Rian Rainey committed Jan 12, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/models/user.rb
View
@@ -27,5 +27,10 @@ class User < ActiveRecord::Base
def has_role?(*role_names)
self.roles.where(:name => role_names).present?
end
+
+ # Join first and last names of user
+ def name
+ [firstName, lastName].join(" ")
+ end
end

0 comments on commit 4998666

Please sign in to comment.