Guest User

Untitled

a guest
Oct 19th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <% @result.each do |singleAttr| %> <!-- Now the singleAttr is a hash -->
  2. <%= form_tag(change_policy_attr_values_path(singleAttr)) do %>
  3. <tr class="<%= cycle('even', 'odd') %>">
  4. <td><%= label_tag(:attrId,singleAttr["attrId"]) %></td>
  5. <td><%= label_tag(:name,singleAttr["name"]) %></td>
  6. <td style="word-break: break-all;"><%= text_field_tag(:value,singleAttr['value']) %></td>
  7. <td style="text-align: center;">
  8. <%= submit_tag('Update',:id => "update_button") %>
  9. </td>
  10. </tr>
  11. <% end %>
  12. <% end %>
  13.  
  14. def change
  15. attribValue = params[:value]
  16. render text: attribValue
  17. end
  18.  
  19. http://localhost:3000/policy_attr_values/change?attrId=10&name=MAX_LOCAL_MASK_LENGTH&value=18
Add Comment
Please, Sign In to add comment