|
|
|
@ -50,14 +50,14 @@ class ForumsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
def index
|
|
|
|
|
@offset, @limit = api_offset_and_limit({:limit => 10})
|
|
|
|
|
@forums_all = Forum.all
|
|
|
|
|
@forums_all = Forum.where('1=1')
|
|
|
|
|
@forums_count = @forums_all.count
|
|
|
|
|
@forums_pages = Paginator.new @forums_count, @limit, params['page']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@offset ||= @forums_pages.offset
|
|
|
|
|
# @forums = @forums_all.offset(@offset).limit(@limit).all
|
|
|
|
|
@forums = Forum.all
|
|
|
|
|
@forums = @forums_all.offset(@offset).limit(@limit).all
|
|
|
|
|
#@forums = Forum.all
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html # index.html.erb
|
|
|
|
|
format.json { render json: @forums }
|
|
|
|
|