为“brochure-site”添加页面/主控制器; Rails 应用程序的一部分
我正在开发一个 Rails 应用程序,最终将包含产品、用户和订单。现在我只是想建立他们的“宣传册网站”。我不想构建两次,而是简单地从 Rails 应用程序开始,以便根据需要轻松快速地继续前进。也就是说...我正在寻找有关构建简单页面(例如主页、关于我们等)的最佳方法的建议。
我知道我可以通过简单地将这些页面添加到公共目录中来完成此任务,但知道有一个更好的方法来实现这一点。我尝试过使用这个 创建页面控制器的教程,但简单地生成具有相应视图的控制器似乎并不像教程中那样工作(也许它是一个较旧的图特)。
这里的最佳实践是什么?
I am developing a rails application that will eventually contain products, users, and orders. For now I am just trying to get their 'brochure site' up. Rather than build it twice I thought to simply start with the rails application making it easily to rapidly move on as they need. That said...I am looking for advice on the best way to build out the simple pages like, Home, About Us, etc.
I know that I can accomplish this by simply adding those pages in the public directory but know there is a better way to accomplish this. I have tried using this Tutorial to create a pages controller but simply generating a controller with the corresponding views doesn't seem to work as it does in the tutorial (perhaps it is an older tut).
What are the best practices here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过本指南?
Have you tried this guide?