This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/lib/desktopapp/desktop_app_publications.rb

25 lines
496 B
Ruby

class Desktopapp::DesktopAppPublications < Sinatra::Base
get "/desktop/journal_p" do
erb :journal_p
end
get "/desktop/journal_p_list" do
erb :'journal_pages/list'
end
get '/desktop/journal_p_add' do
erb :'journal_pages/add'
end
get '/desktop_publications/getjournals' do
@journals = Journal.all
data = Array.new
@journals.each do |journal|
@papers = journal.papers.all
data << {"title" => journal.title, "papers" => @papers}
end
data.to_json
end
end