try fix error
This commit is contained in:
parent
6b0b4598ce
commit
e4b1761651
|
@ -22,12 +22,12 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
@categories = current_user.approved_categories.select{|c| c.module_app_id == @module_app.id} rescue []
|
@categories = current_user.approved_categories.select{|c| c.module_app_id == @module_app.id} rescue []
|
||||||
@filter_fields = filter_fields(@categories, @tags)
|
@filter_fields = filter_fields(@categories, @tags)
|
||||||
@event_news = EventNews.where(:category_id.ne=>nil, :create_user_id=>current_user.id,:is_preview.in=>[false,nil])
|
@event_news = EventNews.where(:category_id.ne=>nil, :create_user_id=>current_user.id,:is_preview.in=>[false,nil])
|
||||||
.order_by(sort)
|
.order_by(sort || :event_date)
|
||||||
.with_categories(filters("category"))
|
.with_categories(filters("category"))
|
||||||
.with_tags(filters("tag"))
|
.with_tags(filters("tag"))
|
||||||
.with_status(filters("status"))
|
.with_status(filters("status"))
|
||||||
else
|
else
|
||||||
@event_news = EventNews.where(:category_id.ne=>nil, :uid=>nil)
|
@event_news = EventNews.where(:category_id.ne=>nil, :uid=>nil).order_by(sort || :event_date)
|
||||||
@categories = @module_app.categories.enabled
|
@categories = @module_app.categories.enabled
|
||||||
@filter_fields = filter_fields(@categories, @tags)
|
@filter_fields = filter_fields(@categories, @tags)
|
||||||
end
|
end
|
||||||
|
@ -35,7 +35,7 @@ class Admin::EventNewsController < OrbitAdminController
|
||||||
@categories = @module_app.categories.enabled
|
@categories = @module_app.categories.enabled
|
||||||
@filter_fields = filter_fields(@categories, @tags)
|
@filter_fields = filter_fields(@categories, @tags)
|
||||||
@event_news = EventNews.where(:category_id.ne=>nil, :is_preview.in=>[false,nil])
|
@event_news = EventNews.where(:category_id.ne=>nil, :is_preview.in=>[false,nil])
|
||||||
.order_by(sort)
|
.order_by(sort || :event_date)
|
||||||
.with_categories(filters("category"))
|
.with_categories(filters("category"))
|
||||||
.with_tags(filters("tag"))
|
.with_tags(filters("tag"))
|
||||||
.with_status(filters("status"))
|
.with_status(filters("status"))
|
||||||
|
|
Loading…
Reference in New Issue