G’day folks. My RentalMap model uses ym4r_gm to generate a Google map
and plot markers on the map. However, a marker’s body contains HTML.
It feels dirty to put HTML in the model, but the markers should be
plotted by the model. Any suggestions for how I can move the marker
HTML template out of the RentalMap model?
G’day folks. My RentalMap model uses ym4r_gm to generate a Google map
and plot markers on the map. However, a marker’s body contains HTML.
It feels dirty to put HTML in the model, but the markers should be
plotted by the model. Any suggestions for how I can move the marker
HTML template out of the RentalMap model?
I think something like the acts_as_renderer plugin maybe what you need:
Also… there’s some validity to the argument that a model’s domain
might very well be creating markup and in such cases, HTML generation
in the model could be quite justified. YMMV and HTH.