Thanks Matt --- I continue to be amazed at how simple Hobo makes
certain things!

Assuming that I don't actually have an event model (there is only one
type of event, everything about my app revolves around the event),
would I just use something like this:

def attending
  hobo_index :scope => attending
end

map.attending '/attending', :controller => 'contacts', :action =>
'attending'

--jeremy

On May 9, 10:34 am, Matt Jones <[email protected]> wrote:
> On May 9, 2010, at 10:02 AM, Jeremy Savoy wrote:
>
> > I have a contacts model that contains naturally a set of contacts for
> > each user. I also have the need to have a list of attendees to an
> > event. Attendees must already be contacts. The contact model has an
> > "attending" boolean field.
>
> > The net net is that attendees are simply contacts that have the
> > "attending" field set to true. I need a separate page for viewing or
> > managing attendees, but want to have access to all of their data,
> > name, address, etc etc from the contact model ... I guess what I'm
> > asking is how to I set up an Attendees page that shows the contacts
> > model but only contacts that have "attending" set to true?
>
> hobo_index_for will almost do what you're looking for:
>
> def attending
>    hobo_index_for :event, :scope => :attending
> end
>
> With the provision that (for now) you'll need to hook up the route  
> explicitly: (ABOVE the Hobo.add_routes call):
>
> map.attending_event '/events/:event_id/attending', :controller =>  
> 'contacts', :action => 'attending'
>
> Ideally, this whole mess would be shortened to:
>
> index_action :attending, :for => :event, :scope => :attending # WILL  
> NOT WORK ON CURRENT HOBO
>
> But that's something that's still on the drawing board.
>
> --Matt Jones
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Hobo Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/hobousers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to