Guest User

Untitled

a guest
Feb 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. ## method in controller
  2.  
  3. def listcolors
  4. @colors = Wcolor.find(:all)
  5. end
  6.  
  7. ## view listcolors.rhtml
  8.  
  9. <% i = 0%>
  10. <% for wcolor in @colors %>
  11. <%= link_to "#{@colors[i]['colorname']}", { :action => 'colorpage' } %>
  12. <% i = i + 1 %>
  13. <br />
  14. <% end %>
Add Comment
Please, Sign In to add comment