I am trying to figure out the best way to combine a first_name and last_name field in Ecto.
In rail's active record I can create an instance method like:
def name
self.first_name + self.last_name
end
then when I create an active record instance I can use User.name. If I need to combine the first and last name or do some other logic to my Ecto model how would I go about doing that? This is a simple example and I could just concatenate it on the fly, but what if there was more complicated logic?