simple_show:SimpleShow 是 #show 就像 SimpleForm 是 #edit

时间:2021-06-08 11:51:28
【文件属性】:
文件名称:simple_show:SimpleShow 是 #show 就像 SimpleForm 是 #edit
文件大小:13KB
文件格式:ZIP
更新时间:2021-06-08 11:51:28
Ruby simple_show 说明: SimpleShow 是#show,就像SimpleForm 是#edit 一样。 要求: 导轨 3 安装: 将其添加到您的 Gemfile 中: gem "simple_show" 更新您的捆绑包: bundle update simple_show 运行生成器: rails generate simple_show: install 用法示例: 假设我们有一个带有姓名、电话、电子邮件、born_on 等的 Person 对象。在我们的 show 动作中,我们可以这样做: <%= simple_show_for @johndoe do |s| %> <%= s.show :name %> <%= s.show :phone, :label => 'Telephone' %> <%= s.show(:email) {
【文件预览】:
simple_show-master
----lib()
--------simple_show.rb(2KB)
--------simple_show()
--------generators()
----Gemfile(212B)
----README.rdoc(4KB)
----Rakefile(218B)
----test()
--------test_helper.rb(3KB)
--------test_simple_show_label.rb(448B)
--------test_simple_show_for.rb(1KB)
--------skip_helper.rb(4KB)
--------test_simple_show.rb(1KB)
--------test_simple_show_show_collection.rb(1KB)
--------test_simple_show_show.rb(149B)
--------test_simple_show_value.rb(2KB)
----simple_show.gemspec(856B)
----.gitignore(39B)

网友评论