开发者

Does anyone actually use Ruby On Rails scaffolding?

I think I am missing the point of scaffolding, does anyone use RoR scaffolding and if so can they point me to any specific examples of how they u开发者_运维技巧se it?

I am a big sass and compass fan, is it possible to incorporate this into scaffolding?


Yes, scaffolding as a generator is useful. It creates the files you need, then you customize them. I don't think anybody uses the active scaffolding anymore, I for one discourage it. But, as I said, the generator is usesful

rails g scaffold product price:float title:string description:text

as it creates the migration file, model and controller you need either way. I don't like the default tests (rspec has better test generators) as I value tests too much to have stupid autogenerated ones.

As for the sass and/or compass, I don't use generators for that, but you may try something like http://github.com/darthschmoo/rails-compass-sass-generator I don't autogenerate those as the views are always highly customized.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜