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/app/controllers/desktop_orbit_controller.rb

20 lines
390 B
Ruby

class DesktopOrbitController< ApplicationController
def orbit
render "desktop/orbit", :layout => false
end
def getevents
@event = params["event"]
@data = Array.new
case @event
when "papers"
@journals = current_user.journals
@journals.each do |journal|
@data << {"title"=> journal.title,"papers"=> journal.papers}
end
end
render :json=>@data.to_json
end
end