Orbit/app/controllers/desktop_orbit_controller.rb

20 lines
390 B
Ruby
Raw Normal View History

2012-06-26 07:59:28 +00:00
class DesktopOrbitController< ApplicationController
def orbit
render "desktop/orbit", :layout => false
end
2012-06-26 13:09:33 +00:00
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
2012-06-26 07:59:28 +00:00
end