Closed sagexfors closed 9 months ago
Suppose I have a Person model that has first, middle, and last name.
then i create a new field
:field full_name do |person, options| # concatenate the names end
how to use the full_name field here?
:field full_name_and_id do |person, options| # full_name field that i defined above + id # person.full_name returns nomethod error end
Any reason not to define the full_name method in your Person model? Then it would be accessible in your full_name_and_id field and could just defined as a regular field above...
full_name
full_name_and_id
Suppose I have a Person model that has first, middle, and last name.
then i create a new field
how to use the full_name field here?