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

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -