Closed adamcrown closed 4 years ago
Currently if you want to pull an attribute from a tested object, you need to do something like this.
class UserSerializer < CacheCrispies::Base serialize :manager_name def manager_name model.manager.name end end
It would be nice to be able to do this more succinctly like the below or something similar.
class UserSerializer < CacheCrispies::Base serialize :manager_name, from: :name, through: :manager # or possibly serialize :manager_name, from: { manager: :name } end
But testing needs to be done to make sure there is little to no performance impact.
Currently if you want to pull an attribute from a tested object, you need to do something like this.
It would be nice to be able to do this more succinctly like the below or something similar.
But testing needs to be done to make sure there is little to no performance impact.