有人真正使用 Ruby On Rails 脚手架吗?
我认为我错过了脚手架的要点,是否有人使用 RoR 脚手架,如果是的话,他们能给我指出他们如何使用它的任何具体示例吗?
我是 sass 和 compass 的忠实粉丝,是否可以将其合并到脚手架中?
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 use it?
I am a big sass and compass fan, is it possible to incorporate this into scaffolding?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,脚手架作为生成器很有用。它会创建您需要的文件,然后您可以自定义它们。我认为没有人再使用主动脚手架了,我个人不鼓励这样做。但是,正如我所说,生成器很有用
,因为它可以创建您需要的迁移文件、模型和控制器。我不喜欢默认测试(rspec 有更好的测试生成器),因为我太看重测试而没有愚蠢的自动生成的测试。
至于 sass 和/或指南针,我不使用生成器,但你可以尝试类似 http://github.com/darthschmoo/rails-compass-sass-generator 我不会自动生成这些,因为视图总是高度定制的。
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
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.