Any way to reduce complexity passing JSON to Vue.js component?
Hi,
I'm trying to figure out a way to reduce the complexity of passing a JSON to a Vue.js component.
Currently I've got something like this placed on a model scope,
scope :to_vue, -> (id) {where(team_id: id).order(position: :asc).to_json(
only: [:id, :name, :position, :team_id], include: {
postits: {
include: [:user, comments: {
include: :actor
}]
}
}
)}
Anyone know a better way to create a Json format without all that amount of includes?
Thanks for your answers.