Hi,
I need to be able to query on my full_name method. As I know you can’t do that I have seen Rails 7 new virtual column support. Is it possible to convert my current method into a virtual column or should I use an after save callback to update a column called full_name
?
def full_name
parts = [name]
parts << "(#{position})" if position.present?
parts << "(#{version_name})" if (has_versions? && version_name.present?)
parts.join(" ")
end