[Rails] Filters
Hi,
How I do a filter in a block of code?
example:
I have a block:
<% @notes[(0..3)].each do |note| %>
<li>
<%= notes.note %>
<%= notes.type %>
</li>
<% end %>
Type is a string, I would like to do a block filtering by a value on type.
Thanks!
Fernando Aureliano
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home