开发者

Web app and sales/marketing website in a single rails app, any advice on seperation?

I am familiar wi开发者_高级运维th rails engines, but was wondering for a more simple alternative.

A web application is the main rails 3 application in my project. I have a simple sales/marketing website that has a main page, pricing page, about/contact, tour pages. I could put most of these pages in 1 or 2 controllers.

I want to keep the css/js seperate, and was thinking of simply adding a folder inside the stylesheet and javascript folder.

Any other advice?

The 2 applications are linked in many ways, plus I don't want to manage/deploy 2 seperate websites seeing as the sales/marketing site is very simple and just contains some for the most part static pages.


If they are truly static pages, you can just throw them in the public directory and be done. If you want them to utilize layouts etc, just go ahead and make a couple of controllers.

You can make a simple PagesController to deal with most of the static pages, and perhaps a separate controller to deal with the contact page submissions. In these controllers, just specify the other layout file that you want to use for the marketing pages.

For the css/js, if there are multiple files and you want to keep them separate from the rest of the app, then adding subdirs under each is not a bad way to go. If there is only one css and javascript file, I'd just name them different.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜