added scope for index
This commit is contained in:
parent
85722dbdde
commit
0ba5fea219
|
@ -1,7 +1,7 @@
|
||||||
class PersonalBooksController < ApplicationController
|
class PersonalBooksController < ApplicationController
|
||||||
def index
|
def index
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
books = Book.where(:is_hidden=>false).order_by(:year=>'desc').page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
|
books = Book.where(:is_hidden=>false).sort_for_frontend.page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
|
||||||
page = Page.where(:page_id => params[:page_id]).first rescue nil
|
page = Page.where(:page_id => params[:page_id]).first rescue nil
|
||||||
|
|
||||||
if page.custom_string_field == "table"
|
if page.custom_string_field == "table"
|
||||||
|
|
Loading…
Reference in New Issue