Rails query help
In my controller:
@konkurrencer = Konkurrancer.page(params[:page]).per(15)
My view:
<% @ko开发者_如何学运维nkurrencer.find(:all, :order => 'bedom ASC', :limit => 5).each do |vind| %>
<%= link_to(image_tag(vind.banner2, :style => 'border:none; width:125px; height:125px;'), vind.tracking, :target => '_blank') %>
<%= vind.bedom %>
<% end %>
Why does my konkurrancers not sort after the column bedom?
try to inspect the scope page
and per
as the sorting might already be declared in one of those scopes =)
精彩评论