I am trying to use sorting for each of them. I get an error
wrong number of arguments (1 to 0)
I understand that I cannot tie them together. Does anyone know other ways to do this.
<% Category.sort(:id).limit(4).each do |type| %>
<%= type.name %>
<% end %>
As a result, I want all categories to be listed from a to z.
source
share