- <!--
- ! Excerpted from "Agile Web Development with Rails, 2nd Ed.",
- ! published by The Pragmatic Bookshelf.
- ! Copyrights apply to this code. It may not be used to create training material,
- ! courses, books, articles, and the like. Contact us if you are in doubt.
- ! We make no guarantees that this code is fit for any purpose.
- ! Visit http://www.pragmaticprogrammer.com/titles/rails2 for more book information.
- -->
- <% for column in Product.content_columns %>
- <p>
- <b><%= column.human_name %>:</b> <%=h @product.send(column.name) %>
- </p>
- <% end %>
- <%= link_to 'Edit', :action => 'edit', :id => @product %> |
- <%= link_to 'Back', :action => 'list' %>
Rails 方法 content_columns send
最新推荐文章于 2024-08-15 22:47:52 发布