可下载的 Rails 生成器在哪里?

发布于 2024-07-16 04:38:11 字数 433 浏览 5 评论 0原文

当我运行...时,

$ 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小傻瓜 2024-07-23 04:38:11

那个维基在当时是一个很棒的资源,但它早已不复存在了。 我抛出了一个包含该页面的存档从维基开始摇摆不定的时候起。 它已经过时了,但你至少可以看到那里有什么。

就目前而言,寻找 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.

留蓝 2024-07-23 04:38:11

许多插件都带有自己的生成器。 我想到的是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?

断爱 2024-07-23 04:38:11

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文