sorting and dates fixed
This commit is contained in:
parent
727ff7cfec
commit
06e866aef5
|
@ -29,6 +29,8 @@ class Lab
|
|||
|
||||
before_validation :add_http
|
||||
|
||||
scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc") }
|
||||
|
||||
def get_plugin_data(fields_to_show)
|
||||
plugin_datas = []
|
||||
fields_to_show.each do |field|
|
||||
|
@ -53,7 +55,7 @@ class Lab
|
|||
}
|
||||
end
|
||||
|
||||
plugin_datas = datas.where(:is_hidden=>false).order_by(:year=>'desc').collect do |p|
|
||||
plugin_datas = datas.sort_for_frontend.collect do |p|
|
||||
|
||||
pd_data = []
|
||||
fields_to_show.collect do |t|
|
||||
|
|
Loading…
Reference in New Issue