{"action":"created","issue":{"url":"https://api.github.com/repos/szymon33/dhtmlxgantt/issues/1","labels_url":"https://api.github.com/repos/szymon33/dhtmlxgantt/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/szymon33/dhtmlxgantt/issues/1/comments","events_url":"https://api.github.com/repos/szymon33/dhtmlxgantt/issues/1/events","html_url":"https://github.com/szymon33/dhtmlxgantt/issues/1","id":55603529,"number":1,"title":"rendering json data","user":{"login":"rageshpillai","id":5021230,"avatar_url":"https://avatars.githubusercontent.com/u/5021230?v=3","gravatar_id":"","url":"https://api.github.com/users/rageshpillai","html_url":"https://github.com/rageshpillai","followers_url":"https://api.github.com/users/rageshpillai/followers","following_url":"https://api.github.com/users/rageshpillai/following{/other_user}","gists_url":"https://api.github.com/users/rageshpillai/gists{/gist_id}","starred_url":"https://api.github.com/users/rageshpillai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rageshpillai/subscriptions","organizations_url":"https://api.github.com/users/rageshpillai/orgs","repos_url":"https://api.github.com/users/rageshpillai/repos","events_url":"https://api.github.com/users/rageshpillai/events{/privacy}","received_events_url":"https://api.github.com/users/rageshpillai/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-27T11:01:36Z","updated_at":"2015-01-27T12:43:45Z","closed_at":"2015-01-27T11:15:20Z","body":"how to render multiple model data in single json call."},"comment":{"url":"https://api.github.com/repos/szymon33/dhtmlxgantt/issues/comments/71642034","html_url":"https://github.com/szymon33/dhtmlxgantt/issues/1#issuecomment-71642034","issue_url":"https://api.github.com/repos/szymon33/dhtmlxgantt/issues/1","id":71642034,"user":{"login":"rageshpillai","id":5021230,"avatar_url":"https://avatars.githubusercontent.com/u/5021230?v=3","gravatar_id":"","url":"https://api.github.com/users/rageshpillai","html_url":"https://github.com/rageshpillai","followers_url":"https://api.github.com/users/rageshpillai/followers","following_url":"https://api.github.com/users/rageshpillai/following{/other_user}","gists_url":"https://api.github.com/users/rageshpillai/gists{/gist_id}","starred_url":"https://api.github.com/users/rageshpillai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rageshpillai/subscriptions","organizations_url":"https://api.github.com/users/rageshpillai/orgs","repos_url":"https://api.github.com/users/rageshpillai/repos","events_url":"https://api.github.com/users/rageshpillai/events{/privacy}","received_events_url":"https://api.github.com/users/rageshpillai/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T12:43:45Z","updated_at":"2015-01-27T12:43:45Z","body":"sry\r\nbut only render tasks project does not appear in chart\r\nhoshin=Hoshin.hoshins_in_business_unit(get_or_set_session_business_unit_id(@@bu_id_in_session))\r\nhoshin_task=Hoshin.gantt_chart_report(current_user,@@bu_id_in_session)\r\nrender :json => {\r\ndata: hoshin.map do |h|\r\n\r\n          {\r\n           id: h.id,\r\n           text: h.name,\r\n           open:true,\r\n            leader: \"nnpq\"\r\n\r\n                  }\r\n\r\n    end,\r\n\r\n\r\n  data: hoshin_task.map do |hoshin|\r\n\r\n     hoshin_start_date=hoshin.task_start_date ? hoshin.task_start_date.to_date.strftime(\"%m/%d/%Y\") : nil\r\n     hoshin_end_date=hoshin.etc ? hoshin.etc.to_date.strftime(\"%m/%d/%Y\") : nil\r\n     p \"parent id\",hoshin.hoshin_id\r\n    # parent_id=hoshin.hoshin_id==78 ?  0 : 78\r\n\r\n         {\r\n          # id: hoshin.hoshin_id,\r\n          text: hoshin.hoshin_name,\r\n          start_date: hoshin_start_date,\r\n          end_date:  hoshin_end_date,\r\n          leader: hoshin.task_leader\r\n          #parent: parent_id\r\n\r\n        }   \r\n\r\n\r\n        end\r\n  }, status: :ok \r\n"}}