Closed adamcrown closed 4 years ago
Currently if you want to do anything other than return the value directly (or casted to another data type) you need to define a method for it.
class UserSerializer < CacheCrispies::Base serialize :full_name def full_name "#{model.first_name} #{model.last_name}" end end
It would be nice to be able to do this more succinctly like
class UserSerializer < CacheCrispies::Base serialize :full_name { |user| "#{user.first_name} #{user.last_name}" } end
But testing needs to be done to make sure there is little to no performance impact.
Currently if you want to do anything other than return the value directly (or casted to another data type) you need to define a method for it.
It would be nice to be able to do this more succinctly like
But testing needs to be done to make sure there is little to no performance impact.