<p>This question is based on <a href="https://stackoverflow.com/questions/150514/custom-method-in-model-to-return-an-object">another question of mine</a>(thankfully answered).</p>

<p>So if in a model I have this:</p>

<pre><code>def self.find_extended
    person = Person.find(:first)
    complete_name = person.firstname + ', ' + person.lastname
    return person
end
</code></pre>

<p>How can I inject complete name in the person object so in my controller/view I can access it by person.complete_name?</p>

<p>Thank you for your time,<br>
Silviu</p>

You could define:
```
```
attr_accessor :complete_name
```
```
in the person model and then just do
```
person.complete_name= person.firstname + ', ' + person.lastname
```