Possible Duplicate:
String concatenation and Ruby
I would like to combine two string in rails. My database is Postgre and I want the string first_name and last_name to become one string called full_name.
How can I best achieve this? Thx
Possible Duplicate:
String concatenation and Ruby
I would like to combine two string in rails. My database is Postgre and I want the string first_name and last_name to become one string called full_name.
How can I best achieve this? Thx
class User < ActiveRecord::Base
def full_name
"#{first_name} #{last_name}"
end
end