> when i try to link to /ip_logs/ip /ip_logs/user I get no route matches
> error I'm guessing I'm missing something but /ip_logs/127.0.0.1 (the
> ip value for both test entries) also shows that error and not a blank
> page or edit me here page
>

I'm guessing that IP is not unique, that there will be more than one
IpLog per IP, right?

In Hobo /ip_logs/1 is a show page that shows the IpLog for id#1.
It's definitely possible to make it into an index page, but you're
probably better off just doing filtering:

/ip_logs?ip=127.0.0.1

def index
  self.this = IpLog.where(:ip => params[:ip]) if params[:ip]
  hobo_index
end

You can set up /ip_logs/ip /ip_logs/user by learning how to do generic
Rails routing or you can use

/users/1-test-user/ip_logs?ip=127.0.0.1  and a similar structure to above.

or if you don't have :owner  etc set up you can just do filtering:

/ip_logs?ip=127.0.0.1&user=1-test-user

cheers,
Bryan

-- 
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