可下载的 Rails 生成器在哪里?
当我运行...时,
$ script/generate
我收到已安装生成器的列表和一条消息,显示“更多内容可在 获得http://wiki.rubyonrails.org/rails/pages/AvailableGenerators。” 然而,指定的维基页面显示“该主题尚不存在”。
是否存在一些可下载的 Rails 生成器的中央存储库?
特别是,我想要一个创建 Rails 脚手架的工具,但使用 Haml 而不是 ERB。
如果它能够生成 Test::Unit 测试但使用 Shoulda 增强功能,那也会很整洁。
When I run...
$ script/generate
I get a list of installed generators and a message saying "More are available at http://wiki.rubyonrails.org/rails/pages/AvailableGenerators." However, the indicated wiki page says "This topic does not exist yet."
Does there exist some central repository of downloadable Rails generators?
In particular, I'd like one that creates the Rails scaffolding, but uses Haml instead of ERB.
It would also be neat if it would generate the Test::Unit tests but using the Shoulda enhancements.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
那个维基在当时是一个很棒的资源,但它早已不复存在了。 我抛出了一个包含该页面的存档从维基开始摇摆不定的时候起。 它已经过时了,但你至少可以看到那里有什么。
就目前而言,寻找 gem(尤其是插件)来提供生成器,而不是期望它们作为孤立的资源。 gems 命令可用于查找可用的内容。
That wiki was a wonderful resource back in the day, but it's long gone. I threw up a archive containing that page from when the wiki started wobbling. It's dated but you can at least see what was there.
As for now, look for gems (especially plugins) to provide the generators rather than expecting them as isolated resources. The
gems
command can be used to find whats available.许多插件都带有自己的生成器。 我想到的是restful_authentication,因为我已经用过它很多次了。
编辑:您是否在这里搜索< /a>?
A lot of plugins come with their own generators. The one that springs to mind is restful_authentication because I have used it quite a bit.
Edit: Did you google here?
Rails Boost,它是一个模板生成器。 事实上,您想要的模板已经生成了——该模板使用 HAML 和 Shoulda。
There's Rails Boost, which is a template generator. In fact, the template you want has already been generated -- that one uses HAML and Shoulda.