Mount Sinatra app inside a rails app and sharing layout

后端 未结 3 2100
南旧
南旧 2020-12-12 18:27

I would like to mount a sinatra application in my rails app. But I would like this one to share the same layout.

The iframe could work but do you have any other idea

3条回答
  •  一向
    一向 (楼主)
    2020-12-12 19:07

    I think that using the append_view_path in your rails application will work a little bit better. Just append the Sinatra views to your Rails app and it will look there after looking in app/views.

    The Crafting Rails Applications book by José Valim has a lot of documentation on that topic (rendering views from other sources), you may want to look at that.

    Also, this Railscasts can help: http://railscasts.com/episodes/222-rack-in-rails-3

提交回复
热议问题