Hi, all.
I'm relatively new to Rails though I have completed the Depot app in the
book 'Agile Web Development with Rails 4' & I'm looking for advice.
I'm attempting to construct RailsBootstrap & have used Passenger to
install nginx & have installed the rails gem & have issued the 'rails
new' command to start with.
I'm looking for a generic scaffolding command I can run for the project.
It's going to be a personal web site but it will carry a lot of info.
Firstly, do I really need to use scaffolding as Bootstrap in itself may
be enough & if I have to use scaffolding, what's a safe general command
to run for a personal web site? All I could turn up on Google was stuff
related to stores & the like.
Any help appreciated,
Cheers,
Phil...
Phil,
To create CRUD application you can use Rails scaffolding which saves your most of the time instead of coding same stuff yourself. Of-course its a better approach when something is already build why would you waste your time on it unless you have to make it more customizable?
Bootstrap basically helps to improve your look & feel. Scaffold also gives you basic css style but you can skip to generate stylesheet while generating scaffold and integrate bootstrap.
Assuming you have integrated bootstrap already. To generate scaffold and use bootstrap with it, commands would be:
*rails g scaffold Post title:string description:text* *--skip-stylesheets
rake db:migrate
rails g bootstrap:themed Posts*
Hope this is what you were looking for?
Phil,
To create CRUD application you can use Rails scaffolding which saves
your most of the time instead of coding same stuff yourself. Of-course
its a better approach when something is already build why would you
waste your time on it unless you have to make it more customizable?
Bootstrap basically helps to improve your look & feel. Scaffold also
gives you basic css style but you can skip to generate stylesheet while
generating scaffold and integrate bootstrap.
Assuming you have integrated bootstrap already. To generate scaffold and
use bootstrap with it, commands would be:
/|rails g scaffold Post title:string description:text |//|--skip-stylesheets
rake db:migrate
rails g bootstrap:themed Posts
>/
Hope this is what you were looking for?
Hi, Ehtsham.
That looks pretty good to me. I'll try it. I have the project in a Git
repo so I can always roll it back if needed.
Thanks very much for your help.
Cheers,
Phil...