public
Description: A collection of UI widgets for RubyOnRails
Homepage:
Clone URL: git://github.com/paolodona/rails-widgets.git
rails-widgets / Documentation.txt
100644 31 lines (25 sloc) 0.688 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- - Tableizer - -
<% tableize :customers, @customers,
:header => 'Listing Customers',
:generate_css => 'true' do |customer| %>
 
<h3><%= customer.name %></h3>
<p>
Code: <%= customer.code %>
Place order: <%= customer.order %>
<%= link_to 'show', .... %>
<%= link_to 'Edit', .... %>
<%= link_to 'Destroy', .... %>
</p>
<% end %>
 
- - ShowHide - -
 
usage in view, array usage
 
<% for user in @users %>
<%=h user.login %>
<%= show_detail_for user %>
 
<% detail_for user do %>
details ....
<%=h user.email %>
more details....
<%= hide_detail_for user %>
<% end %>
<% end %>