ruby on rails 3 - Extend a view with array of models (not join) -
i'm trying extend view reusing views i've made. i've no partials , simplified directory views.
views -- properties -- index.json.rabl -- show.json.rabl -- type -- index.json.rabl -- show.json.rabl
i saw examples on how extend using child method, solution works have relation model. looked extends, in case didn't go far.
here sample code came , not working right now. have suggestions? i've been reading docs , different articles couldn't come out working.
object typedecorator.decorate(@type) attributes :uri, :id, :name, :public node(:properties) |type| collection property.in(_id: type.property_ids) extends 'properties/index' end
i'm trying extend view reusing views i've made. i've no partials , simplified directory views. i saw examples on how extend using child method, solution works have relation model. looked extends, in case didn't go far. here sample code came , not working right now. have suggestions? i've been reading docs , different articles couldn't come out working. | |||||||||
|