Closed jbodah closed 8 years ago
Can you expand on that a bit? I'm not quite following what you're asking for.
Would you be able to just define a method instead? Like:
module GenericMetadata
include Virtus.module
attribute :id
def google_id
id
end
end
Yeah this is the solution we wound up going with
It would be nice to have some substitute for the
alias
keyword. In the example below let's assume I have two Virtus modules each used in many places (e.g. it's hard to just rename a field). It would be awesome in the short term to just be able addalias :id :google_id
allowing me to just duck-type onid
in my generic code, but Virtus maintains an internal variable for attributes which meansalias
doesn't work properly since we never define that method