add rough user attributes API
This commit is contained in:
1 parent
29ee4585b2
commit
a40b117fbe
6 files changed
+32
-11
No files matched your search
@@ -1,7 +1,13 @@
|
||||
<p>
|
||||
<%= label_tag :name %>
|
||||
<%= text_field_tag "user[name]" %>
|
||||
</p>
|
||||
<% @user_attributes.each do |ua| %>
|
||||
<h3><%= ua.name %></h3>
|
||||
|
||||
<% ua.attrs.each do |attr| %>
|
||||
<p>
|
||||
<%= f.label attr["name"] %>
|
||||
<%= f.send(attr["type"], "#{ua.key}_#{attr["key"]}" )%>
|
||||
</p>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
||||
<p>
|
||||
<%= f.label :email %>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<% @users.each do |user| %>
|
||||
<tr>
|
||||
<td><%= user.use_attributes.join(",") %></td>
|
||||
<td><%#= user.name %></td>
|
||||
<td><%= user.name %></td>
|
||||
<td><%= user.email %></td>
|
||||
<td>
|
||||
<%= link_to 'Show', panel_user_path(user) %>
|
||||
|
||||
Reference in new issue
Block a user