{"action":"created","issue":{"url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/292","labels_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/292/labels{/name}","comments_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/292/comments","events_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/292/events","html_url":"https://github.com/glittergallery/GlitterGallery/pull/292","id":66460639,"number":292,"title":"Refactored issues and other minor improvements","user":{"login":"Alwahsh","id":3496597,"avatar_url":"https://avatars.githubusercontent.com/u/3496597?v=3","gravatar_id":"","url":"https://api.github.com/users/Alwahsh","html_url":"https://github.com/Alwahsh","followers_url":"https://api.github.com/users/Alwahsh/followers","following_url":"https://api.github.com/users/Alwahsh/following{/other_user}","gists_url":"https://api.github.com/users/Alwahsh/gists{/gist_id}","starred_url":"https://api.github.com/users/Alwahsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alwahsh/subscriptions","organizations_url":"https://api.github.com/users/Alwahsh/orgs","repos_url":"https://api.github.com/users/Alwahsh/repos","events_url":"https://api.github.com/users/Alwahsh/events{/privacy}","received_events_url":"https://api.github.com/users/Alwahsh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-05T17:10:17Z","updated_at":"2015-04-06T11:46:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/glittergallery/GlitterGallery/pulls/292","html_url":"https://github.com/glittergallery/GlitterGallery/pull/292","diff_url":"https://github.com/glittergallery/GlitterGallery/pull/292.diff","patch_url":"https://github.com/glittergallery/GlitterGallery/pull/292.patch"},"body":"I've refactored the issues part and done some modifications, following is what I recall:\r\n* Modified the routes to be more rails way.\r\n* Removed the merge button from issues(I found it useless. I can't imagine a way where one can merge issues anyway)\r\n* Report new issue button would not appear if there's an issue already, I fixed that(It was commented out so all I did was to uncomment it.)\r\n* One can now reopen an issue.\r\n* Made adding a new issue redirect you to the created issue. See #285.\r\n* Added tests for that part. Now we're at 90% test coverage.\r\n* Comments would be posted but no javascript response was rendered. I fixed that(Things needed were already there but just not correctly connected.)\r\n* Comments appeared in a cool way only in the logs page... I've now made them like that on issues and others.\r\n* Posting a new comment on an image file would actually post a comment to the project (current page). Fixed that.\r\n* Added rubocop to guard. I made this in the second commit since I felt it's undrelated to improvements.\r\n\r\nI can't remember a lot but as I browsed the files, I fixed whatever I felt wrong :)\r\n\r\nNote that in this I have REMOVED the merge button from issues as noted above. If you want me to put it back please let me know... Also, there was a commented \"Star\" option for projects. I REMOVED that part completely. I think the \"Follow\" for projects does what \"Star\" was made for.\r\n\r\nAlso, I recognize there's #267 which improves the issues... I didn't want to duplicate the work there but I modified the issues model a little bit so that my tests would pass when #267 gets merged.\r\n\r\nI didn't edit any authorization issue till now. Waiting for #244 to get merged to be able to have well defined abilities as any work done now would be overwritten later."},"comment":{"url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/comments/90026824","html_url":"https://github.com/glittergallery/GlitterGallery/pull/292#issuecomment-90026824","issue_url":"https://api.github.com/repos/glittergallery/GlitterGallery/issues/292","id":90026824,"user":{"login":"Alwahsh","id":3496597,"avatar_url":"https://avatars.githubusercontent.com/u/3496597?v=3","gravatar_id":"","url":"https://api.github.com/users/Alwahsh","html_url":"https://github.com/Alwahsh","followers_url":"https://api.github.com/users/Alwahsh/followers","following_url":"https://api.github.com/users/Alwahsh/following{/other_user}","gists_url":"https://api.github.com/users/Alwahsh/gists{/gist_id}","starred_url":"https://api.github.com/users/Alwahsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alwahsh/subscriptions","organizations_url":"https://api.github.com/users/Alwahsh/orgs","repos_url":"https://api.github.com/users/Alwahsh/repos","events_url":"https://api.github.com/users/Alwahsh/events{/privacy}","received_events_url":"https://api.github.com/users/Alwahsh/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T11:46:37Z","updated_at":"2015-04-06T11:46:37Z","body":"@rohitpaulk ok.. I returned it back. I didn't use reverse though. See, reverse would only reverse the currently fetched comments which would normally be the latest 10 comments if there's more. I instead changed the default scope to show comments in ASC order instead of DESC. Remaining issue is when a new comment is posted, which page should I show? What I did was to not paginate comments when you post a new comment and just return all comments. I'm thinking of disabling pagination in the whole comments system till we have our better commenting system."}}