Static pages in rails

Static site using rails As we know rails is mainly used for dynamic website.we can also display static web pages or we can deploy full static website using rails. The following code can help us to display static pages. Step 1:-Create Rails project Step 2:-Generate StaticPage Controller Step 3:- Create StaticPage Class in Model Step 4:- Add following line in routes.rb Here we are passing filename as parameter which is static file name. This will generate url as http://sitename/page/static_filename.html Step

Continue Reading

Site Footer