【文件属性】:
文件名称:helmsman:引导您的导航
文件大小:10KB
文件格式:ZIP
更新时间:2021-06-07 16:16:36
Ruby
舵手
安装
将此行添加到应用程序的 Gemfile 中:
gem 'helmsman'
然后执行:
$ bundle
用法
Helmsman 将helm helper 添加到 Rails 应用程序视图中。 以下是您如何使用它:
helm :pictures , url : 'http://defiant.ncc/pictures'
上述调用将产生以下 html 输出
< li>
< a href =' http://defiant.ncc/pictures '> Pictures a>
li>
建立链接
建立链接的方法有多种:
提供 url 参数。 然后将使用翻译和该 url 构建链接。
helm :pictures , url : 'http://randompictures.com'
在块中设置舵值。 (这仅适用于名称和网址。)
he
【文件预览】:
helmsman-master
----.travis.yml(95B)
----Rakefile(265B)
----Gemfile(93B)
----helmsman.gemspec(1KB)
----spec()
--------lib()
--------spec_helper.rb(212B)
----.gitignore(154B)
----lib()
--------helmsman.rb(438B)
--------helmsman()
----README.md(4KB)
----LICENSE.txt(483B)