Hi,
I have a folder structure see below which basically has a fodler for
the
main pages of the site(main) and another folder which contains a
ajax_scaffold grid to allow a user to view/sort/download documents:
views
main
documents
Controllers
main_controller
documents_controller
routes.rb
map.connect '':controller/service.wsdl'', :action =>
''wsdl''
map.connect ''documents/:action/:id'', :controller =>
''documents'',
:action => ''index''
map.connect '':action/:id'', :controller => main'',
:action => ''home''
map.connect '':controller/:action/:id''
on my home page i have put the follwoing code in the view to test if i
can download a document and this works fine:
<a href
="Documents/document/document/13/tableless_contact_form.pdf"
target="_blank"> Document test</a>
insie my documents folder i have a partial called _form and i have put
the exact same code and i get a routing error or if i put the following
with a forward slash in front
<a href
="/Documents/document/document/13/tableless_contact_form.pdf"
target="_blank"> Document test</a>
i get an Object not found! error.
I have put the site on a test server so you can see for yourself
http://www.savantis.co.uk:9000/sv/
And for the documents
http://www.savantis.co.uk:9000/sv/documents/list
Click on show and then choose either of the docuemnts for download, they
gave the errors i explained above.
Ive tried everything i can think off, including named routes so if
anyone could help me i would be gratefull.
JB
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---