diff --git a/app/models/journal_paper.rb b/app/models/journal_paper.rb index acf7ed3..74cd7be 100644 --- a/app/models/journal_paper.rb +++ b/app/models/journal_paper.rb @@ -48,6 +48,8 @@ class JournalPaper before_validation :add_http # validates :paper_title, presence: true + scope :sort_for_frontend, ->{ where(:is_hidden=>false).order_by(:year => "desc", :publication_date => "desc") } + def create_link title = [] diff --git a/app/views/admin/journal_papers/_form.html.erb b/app/views/admin/journal_papers/_form.html.erb index 8677de1..9beca17 100644 --- a/app/views/admin/journal_papers/_form.html.erb +++ b/app/views/admin/journal_papers/_form.html.erb @@ -248,7 +248,7 @@