ruby on rails - new layout vs MVC in ror -


i learning ror, , wanted know if want make page google's homepage, must use model+controller+view? or can use new layout (this because dont need db or entity save search query)

thanks

you don't need generate model, still need controller , relevant views. if want bunch of static pages, might have pages controller , in there you'll have methods set different pages want. match each of methods views of same name.

layouts more base view templates. simple app might have 1 layout.

see layouts , rendering in rails more info.

first though if you're serious learning rails i'd suggest working through tutorial hartle's rails tutorial: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book - it'll take through basics , more.


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -