timeline updates major ones..

This commit is contained in:
Harry Bomrah committed 2012-06-26 21:09:33 +08:00
1 parent 555ec86403
commit 4aa155a44d
10 files changed
+87 -52

No files matched your search

@@ -4,4 +4,17 @@ class DesktopOrbitController< ApplicationController
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
@@ -12,14 +12,14 @@ class DesktopPublicationsController< ApplicationController
end
def create_journal
Journal.create(user_id: current_user.id, title: "2012, Material Chemistry and Physics Journal")
Journal.create(user_id: current_user.id, title: "2012, Javascript")
b = Array.new
b << {"success"=>"true"}
render :json=>b.to_json
end
def getjournals
@journals = Journal.all
@journals = current_user.journals
data = Array.new
@journals.each do |journal|
@papers = journal.papers.all