scaffolding - How can we understand ruby on rails generate call in layman's term? -
disclaimer : total novice programming , have done c++ stuff . had idea , wanted code preliminary part of website myself. hence , looked around , decided jump on ruby on rails bandwagon. not quite getting grip of generate command , how being different scaffold. again , please pardon me , starting out , thought if on here can guide me tutorials or easy way of making understand . answers, small or big appreciated !
i following intro ror ( berkeley events youtube ) set seems outdated , have been trying follow random youtube videos .
the official rails guides great place learn things rails. in case, there a guide rails command line spells out difference. essentially, rails scaffold "is full set of model, database migration model, controller manipulate it, views view , manipulate data, , test suite each of above." generate, on other hand, used create models , controllers separately.
the obvious thing should here is: both , @ differences. if you're new , find rails and/or command line daunting, play , figure out. create new project (rails new foo) can throw away later. change foo directory, type rails generate scaffold bar, take note of files created , what's in files, go command line , type rails destroy scaffold post. same rails generate controller , rails generate model. best way understand experimenting yourself.
Comments
Post a Comment