I’m a little bit new to Rails development and I am looking for a solution for this issue.
Let’s say that I have a model called Person and the person has an attribute name. But I want to put a surname with this name. Something like this:
class Unit < ActiveRecord::Base
def name= name
@name = name + ‘bla bla’
In Ruby I could do this, but this doesn’t affect my object at all…
How can I do that?
Thanks in advance