Any Ideas?
On Jan 9, 3:11 pm, dhf <dhf0...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I am working on a inventory system that allows duplicate PartNumbers.
> Different vendors can use the same part number. I know I can make them
> unique by using the vendor as part of teh number but that would
> require the end user to know that id also. Also I do not have much
> control over the DB it is pre-existing.
>
> I had several choices as to URL I wanted to use but so far have
> settled on /search/:item_number but would rather have
> had /:item_number. When I specify the url as previously, is it
> actually /search/1234 or /search?item_number=1234
>
> I have set up a couple of routes to test these things. Will any of
> them work? Draw backs on each and what would the internal path name be
> for use in a form_tag?
>
> map.resources :items , :collection => {:lost => :get}
> map.find "/search/:item_number", :controller =>
"public", :action
> => "search", :method => ''get''
> map.resources :public, :collection => {:search => :get} #on this
one
> how do I specify that it requires a value
>
> I know GETs are to either return a collection with out any parameters
> or return one resource. In this case I am returning a collection based
> upon a parameter.
>
> Any ideas?
>
> Don French
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---