Displaying 1 result from an estimated 1 matches for "fullstandard".
Did you mean:
full_standard
2009 Nov 18
2
Composing Data from THREE models with Aggregation
...ake
this work or for a new strategy?
class Standard < ActiveRecord::Base
composed_of :full_standard,
:mapping =>
[
%w[grade_id grade_id],
%w[strand_id strand_id]
%w[number number]
]
class FullStandard < ActiveRecord::Base
attr_reader :grade_id, :strand_id, :number
def initialize(grade_id, strand, number)
@grade_id = grade_id
@strand_id = strand_id
@number = number
end
def to_s
[ @grade_id, @strand_id, @number ].compact.join(" ")
end
end
--
You received...