I want to create a method which will give me the user’s full name.
the user has a first_name and a sur_name attribute.
I am trying to do something like
def fullname
"#{self.first_name} #{self.sure_name}"
end
but it gives me a method missing error when I try to do @user.fullname
am I missing something?
You have a typo: your method calls sure name (with an “e”), and you want sur name (without an “e”).