It would seem a simple thing to do but I''m not finding it... all I want to do is to serve my ''doc/app/index.html'' API within my Rails application. I can''t figure out what to add to routes.rb to allow this to happen. Someone toss me a bone please Craig <%= link_to ''Software API'', ''http://localhost/../doc/app/index.html'', {:target => "_new"} %> Routing Error no route found to match "/doc/app/index.html" with {:method=>:get} --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
You could just do: map.connect "doc/app", :controller => ''[insert whatever controller you''re serving this from]'', :action => ''index'' And then <%= link_to ''Software API'', ''http://localhost/../doc/app/'', {:target => "_new"} %> On Apr 17, 11:12 am, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote:> It would seem a simple thing to do but I''m not finding it... > > all I want to do is to serve my ''doc/app/index.html'' API within my Rails > application. > > I can''t figure out what to add to routes.rb to allow this to happen. > > Someone toss me a bone please > > Craig > > <%= link_to ''Software API'', ''http://localhost/../doc/app/index.html'', > {:target => "_new"} %> > > Routing Error > no route found to match "/doc/app/index.html" with {:method=>:get}--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
in code, this: <%= link_to ''Here'', ''http://espn.go.com/index.html'', :target => ''_new'' %> renders this: <a href="http://espn.go.com/index.html" target="_new">Here</a> On Apr 17, 11:12 am, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote:> It would seem a simple thing to do but I''m not finding it... > > all I want to do is to serve my ''doc/app/index.html'' API within my Rails > application. > > I can''t figure out what to add to routes.rb to allow this to happen. > > Someone toss me a bone please > > Craig > > <%= link_to ''Software API'', ''http://localhost/../doc/app/index.html'', > {:target => "_new"} %> > > Routing Error > no route found to match "/doc/app/index.html" with {:method=>:get}--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Sorry. You can actually do: map.connect "doc/app/index.html", :controller => ''[insert whatever controller you''re serving this from]'', :action => ''index'' If you want to include the actual html page in there... On Apr 17, 3:20 pm, "ESPN...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ESPN3.DL- Community...-xX8xgfAcNKEAvxtiuMwx3w@public.gmane.org> wrote:> You could just do: > > map.connect "doc/app", :controller => ''[insert whatever controller > you''re serving this from]'', :action => ''index'' > > And then > > <%= link_to ''Software API'', ''http://localhost/../doc/app/'', {:target > => "_new"} %> > > On Apr 17, 11:12 am, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote: > > > It would seem a simple thing to do but I''m not finding it... > > > all I want to do is to serve my ''doc/app/index.html'' API within my Rails > > application. > > > I can''t figure out what to add to routes.rb to allow this to happen. > > > Someone toss me a bone please > > > Craig > > > <%= link_to ''Software API'', ''http://localhost/../doc/app/index.html'', > > {:target => "_new"} %> > > > Routing Error > > no route found to match "/doc/app/index.html" with {:method=>:get}--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
that doesn''t work at all...perhaps it''s just me but routes.rb, I inserted... map.connect ''doc/app/index.html'', :controller => ''help'', :action => ''index'' and when I try to go to http://localhost/doc/app/index.html I get this error... Unknown action No action responded to index which makes sense because I commented out the ''index'' method in help controller but I just want to route a single, static page, no method, not controller. Craig On Thu, 2008-04-17 at 15:39 -0700, ESPNDev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Sorry. You can actually do: > > map.connect "doc/app/index.html", :controller => ''[insert whatever > controller you''re serving this from]'', :action => ''index'' > > If you want to include the actual html page in there... > > On Apr 17, 3:20 pm, "ESPN...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <ESPN3.DL- > Community...-xX8xgfAcNKEAvxtiuMwx3w@public.gmane.org> wrote: > > You could just do: > > > > map.connect "doc/app", :controller => ''[insert whatever controller > > you''re serving this from]'', :action => ''index'' > > > > And then > > > > <%= link_to ''Software API'', ''http://localhost/../doc/app/'', {:target > > => "_new"} %> > > > > On Apr 17, 11:12 am, Craig White <cr...-CnJ8jr4MGtxl57MIdRCFDg@public.gmane.org> wrote: > > > > > It would seem a simple thing to do but I''m not finding it... > > > > > all I want to do is to serve my ''doc/app/index.html'' API within my Rails > > > application. > > > > > I can''t figure out what to add to routes.rb to allow this to happen. > > > > > Someone toss me a bone please > > > > > Craig > > > > > <%= link_to ''Software API'', ''http://localhost/../doc/app/index.html'', > > > {:target => "_new"} %> > > > > > Routing Error > > > no route found to match "/doc/app/index.html" with {:method=>:get} > >--~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---