Select and session

I’m trying to get a decent design for handling a notion like queues in
Netflix. On Netflix each user can have multiple movie queues. The
user selects the queue he wants to work with from a dropdown at the
top of any page and the entire session is then restricted to that
queue.

It seems clear that something like queue_id would go in the session,
but how would you construct, say, a to map to
session[:queue_id]? Or would you? All of the select builders seem to
want to operate on a member using the dot accessor. I realize I could
cobble something up that maps @object.method to session[:queue_id],
but this feels like I’m fighting Rails. Am I missing something? Is
there a more natural way to go about something like this?

Thanks,
Kevin Donn

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs