Topic: Aggregation Troubles
I am trying to use composed_of to merge first name and last name from my users table.
class User < ActiveRecord::Base
:mapping =>[ [:first_name,:first],[:last_name,:last] ]
name.rb ( does it belong in the lib directory? )
attr_reader :first, :last
def initialize(first, last)
@first_name = first
@last_name = last
[ @first, @last ].compact.join(" ")
I have not been able to get Aggregation to work so far.