Sha256: 7ee9a3aee2e0085ac39d56a8f8832e1d31a460d9e9adb96f976547b5ef67d68b
Contents?: true
Size: 465 Bytes
Versions: 1
Compression:
Stored size: 465 Bytes
Contents
module Feeder module Concerns::Controllers::ItemsController extend ActiveSupport::Concern included do respond_to :html, :json def index @items = Item.order(sticky: :desc) Feeder.config.scopes.each do |scope| @items = @items.instance_eval &scope end @items = @items.page(params[:page] || 1) @items = @items.per(params[:limit] || 25) respond_with @items end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
feeder-0.5.1 | lib/feeder/concerns/controllers/items_controller.rb |