routes - Sinatra on Rails '/' mapping -


i might missing how can map "/" in rails execute sinatra application? have:

class core < sinatra::base '/' "this root caput." end '/test' "this test , works" end end 

so if routing that:

match '/test' => core match '/'=>core 

only '/test' fires sinatra app '/' runs rails. want every route handled sinatra app.

you need remove index.html public folder.

you can mount whole app mount core, :at => '/' in order let sinatra routing.


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -