Hello,
I'm so used to oracle where you can simply
concat(field1, ' ', field2)
but if I'm using activerecord to find the field1 and field2, and I need a space in between, how do I accomplish this?
Cheers for all your help
Hello,
I'm so used to oracle where you can simply
concat(field1, ' ', field2)
but if I'm using activerecord to find the field1 and field2, and I need a space in between, how do I accomplish this?
Cheers for all your help
I think virtual attributes are right up your alley. This Railscast explains them, with an example that looks just like your use case.
in your model:
def full_name
[first_name, last_name].join(' ')
end