Scaffolding question

23 views
Skip to first unread message

Phil Dobbin

unread,
Feb 10, 2014, 5:04:14 PM2/10/14
to rubyonra...@googlegroups.com
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...

--
currently (ab)using
Arch Linux, CentOS 6.5, Debian Squeeze & Wheezy, Fedora 19 & 20, OS X
Snow Leopard, RHEL 7, Ubuntu Saucy
GnuGPG Key : http://phildobbin.org/publickey.asc

Ehtsham Abbas

unread,
Feb 11, 2014, 6:40:32 AM2/11/14
to rubyonra...@googlegroups.com, phild...@gmail.com
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 Dobbin

unread,
Feb 11, 2014, 7:32:40 AM2/11/14
to Ehtsham Abbas, Ruby on Rails: Talk
On 11/02/2014 11:40, Ehtsham Abbas wrote:

> 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...

> On Tuesday, February 11, 2014 3:04:14 AM UTC+5, Phil Dobbin wrote:
>
> 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.


Reply all
Reply to author
Forward
0 new messages