I'm writing a REST interface in Sinatra where I have two models, a *PhotoSet * and a *Photo, *where *Photo* has a *many_to_one *relationship with * PhotoSet*.
A *Photo* has EXIF data attached including `Float :lat` and `Float :lng` – at some point I need to collect each *lat/ lng *(ordered by the time the photo was taken) to get a poly-line, so from the perspective of the REST, contained in the JSON reply to `/set/:id`. For easy access I wondered if I can store this in the PhotoSet as `String :polyline`, with a hook in the Model? Or I am better off just querying the * Photo*'s on request (i.e. `Photo.where(:set_id => id)` within the route logic)... thought this could be potentially expensive... :/ -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/groups/opt_out.
