{"action":"created","comment":{"url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/comments/35295155","id":35295155,"diff_hunk":"@@ -0,0 +1,22 @@\n+class RightController < ApplicationController\n+  # Prevent CSRF attacks by raising an exception.\n+  # For APIs, you may want to use :null_session instead.\n+  protect_from_forgery with: :exception\n+\n+  def index\n+    @users = User.all\n+    @roles = Role.all\n+  end\n+\n+  def save\n+    params[:users].each do |user|\n+\n+      @BDDUser = User.find(user[0])\n+      @BDDUser.roles = [Role.find(user[1]['role'])]\n+      @BDDUser.save\n+\n+    end\n+    redirect_to '/user/administration' , notice: 'Updated accounts.'","path":"app/controllers/right_controller.rb","position":19,"original_position":19,"commit_id":"1e23ac93308dfdc1ee93c7c6749629dbc3d58e9b","original_commit_id":"1e23ac93308dfdc1ee93c7c6749629dbc3d58e9b","user":{"login":"ranska","id":194856,"avatar_url":"https://avatars.githubusercontent.com/u/194856?v=3","gravatar_id":"","url":"https://api.github.com/users/ranska","html_url":"https://github.com/ranska","followers_url":"https://api.github.com/users/ranska/followers","following_url":"https://api.github.com/users/ranska/following{/other_user}","gists_url":"https://api.github.com/users/ranska/gists{/gist_id}","starred_url":"https://api.github.com/users/ranska/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ranska/subscriptions","organizations_url":"https://api.github.com/users/ranska/orgs","repos_url":"https://api.github.com/users/ranska/repos","events_url":"https://api.github.com/users/ranska/events{/privacy}","received_events_url":"https://api.github.com/users/ranska/received_events","type":"User","site_admin":false},"body":"use only route path never use string path","created_at":"2015-07-23T07:16:12Z","updated_at":"2015-07-23T07:16:12Z","html_url":"https://github.com/RynnHeldeD/Ruby-G3/pull/26#discussion_r35295155","pull_request_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/comments/35295155"},"html":{"href":"https://github.com/RynnHeldeD/Ruby-G3/pull/26#discussion_r35295155"},"pull_request":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26","id":37880035,"html_url":"https://github.com/RynnHeldeD/Ruby-G3/pull/26","diff_url":"https://github.com/RynnHeldeD/Ruby-G3/pull/26.diff","patch_url":"https://github.com/RynnHeldeD/Ruby-G3/pull/26.patch","issue_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/26","number":26,"state":"closed","locked":false,"title":"Added backoffice for roles","user":{"login":"ludovic-decampy","id":8804376,"avatar_url":"https://avatars.githubusercontent.com/u/8804376?v=3","gravatar_id":"","url":"https://api.github.com/users/ludovic-decampy","html_url":"https://github.com/ludovic-decampy","followers_url":"https://api.github.com/users/ludovic-decampy/followers","following_url":"https://api.github.com/users/ludovic-decampy/following{/other_user}","gists_url":"https://api.github.com/users/ludovic-decampy/gists{/gist_id}","starred_url":"https://api.github.com/users/ludovic-decampy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ludovic-decampy/subscriptions","organizations_url":"https://api.github.com/users/ludovic-decampy/orgs","repos_url":"https://api.github.com/users/ludovic-decampy/repos","events_url":"https://api.github.com/users/ludovic-decampy/events{/privacy}","received_events_url":"https://api.github.com/users/ludovic-decampy/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-17T09:13:35Z","updated_at":"2015-07-23T07:16:12Z","closed_at":"2015-06-19T12:49:17Z","merged_at":"2015-06-19T12:49:17Z","merge_commit_sha":"30c70bab5b858fd57cad23e5da48037e001a19a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26/commits","review_comments_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26/comments","review_comment_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/26/comments","statuses_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/statuses/1e23ac93308dfdc1ee93c7c6749629dbc3d58e9b","head":{"label":"RynnHeldeD:it-001-improvements","ref":"it-001-improvements","sha":"1e23ac93308dfdc1ee93c7c6749629dbc3d58e9b","user":{"login":"RynnHeldeD","id":3672253,"avatar_url":"https://avatars.githubusercontent.com/u/3672253?v=3","gravatar_id":"","url":"https://api.github.com/users/RynnHeldeD","html_url":"https://github.com/RynnHeldeD","followers_url":"https://api.github.com/users/RynnHeldeD/followers","following_url":"https://api.github.com/users/RynnHeldeD/following{/other_user}","gists_url":"https://api.github.com/users/RynnHeldeD/gists{/gist_id}","starred_url":"https://api.github.com/users/RynnHeldeD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RynnHeldeD/subscriptions","organizations_url":"https://api.github.com/users/RynnHeldeD/orgs","repos_url":"https://api.github.com/users/RynnHeldeD/repos","events_url":"https://api.github.com/users/RynnHeldeD/events{/privacy}","received_events_url":"https://api.github.com/users/RynnHeldeD/received_events","type":"User","site_admin":false},"repo":{"id":36435079,"name":"Ruby-G3","full_name":"RynnHeldeD/Ruby-G3","owner":{"login":"RynnHeldeD","id":3672253,"avatar_url":"https://avatars.githubusercontent.com/u/3672253?v=3","gravatar_id":"","url":"https://api.github.com/users/RynnHeldeD","html_url":"https://github.com/RynnHeldeD","followers_url":"https://api.github.com/users/RynnHeldeD/followers","following_url":"https://api.github.com/users/RynnHeldeD/following{/other_user}","gists_url":"https://api.github.com/users/RynnHeldeD/gists{/gist_id}","starred_url":"https://api.github.com/users/RynnHeldeD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RynnHeldeD/subscriptions","organizations_url":"https://api.github.com/users/RynnHeldeD/orgs","repos_url":"https://api.github.com/users/RynnHeldeD/repos","events_url":"https://api.github.com/users/RynnHeldeD/events{/privacy}","received_events_url":"https://api.github.com/users/RynnHeldeD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RynnHeldeD/Ruby-G3","description":"Sujet pour école des mines Alès 2015, Ruby on Rails","fork":true,"url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3","forks_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/forks","keys_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/teams","hooks_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/hooks","issue_events_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/events{/number}","events_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/events","assignees_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/assignees{/user}","branches_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/branches{/branch}","tags_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/tags","blobs_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/refs{/sha}","trees_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/statuses/{sha}","languages_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/languages","stargazers_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/stargazers","contributors_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/contributors","subscribers_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/subscribers","subscription_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/subscription","commits_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/commits{/sha}","git_commits_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/commits{/sha}","comments_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/comments{/number}","issue_comment_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/comments{/number}","contents_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/contents/{+path}","compare_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/merges","archive_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/downloads","issues_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues{/number}","pulls_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls{/number}","milestones_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/milestones{/number}","notifications_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/labels{/name}","releases_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/releases{/id}","created_at":"2015-05-28T11:52:15Z","updated_at":"2015-05-28T14:27:10Z","pushed_at":"2015-06-24T15:42:00Z","git_url":"git://github.com/RynnHeldeD/Ruby-G3.git","ssh_url":"git@github.com:RynnHeldeD/Ruby-G3.git","clone_url":"https://github.com/RynnHeldeD/Ruby-G3.git","svn_url":"https://github.com/RynnHeldeD/Ruby-G3","homepage":null,"size":3331,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"RynnHeldeD:master","ref":"master","sha":"c29ec60e8a63cd66a0e2f09bb3f02493e56b5e39","user":{"login":"RynnHeldeD","id":3672253,"avatar_url":"https://avatars.githubusercontent.com/u/3672253?v=3","gravatar_id":"","url":"https://api.github.com/users/RynnHeldeD","html_url":"https://github.com/RynnHeldeD","followers_url":"https://api.github.com/users/RynnHeldeD/followers","following_url":"https://api.github.com/users/RynnHeldeD/following{/other_user}","gists_url":"https://api.github.com/users/RynnHeldeD/gists{/gist_id}","starred_url":"https://api.github.com/users/RynnHeldeD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RynnHeldeD/subscriptions","organizations_url":"https://api.github.com/users/RynnHeldeD/orgs","repos_url":"https://api.github.com/users/RynnHeldeD/repos","events_url":"https://api.github.com/users/RynnHeldeD/events{/privacy}","received_events_url":"https://api.github.com/users/RynnHeldeD/received_events","type":"User","site_admin":false},"repo":{"id":36435079,"name":"Ruby-G3","full_name":"RynnHeldeD/Ruby-G3","owner":{"login":"RynnHeldeD","id":3672253,"avatar_url":"https://avatars.githubusercontent.com/u/3672253?v=3","gravatar_id":"","url":"https://api.github.com/users/RynnHeldeD","html_url":"https://github.com/RynnHeldeD","followers_url":"https://api.github.com/users/RynnHeldeD/followers","following_url":"https://api.github.com/users/RynnHeldeD/following{/other_user}","gists_url":"https://api.github.com/users/RynnHeldeD/gists{/gist_id}","starred_url":"https://api.github.com/users/RynnHeldeD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RynnHeldeD/subscriptions","organizations_url":"https://api.github.com/users/RynnHeldeD/orgs","repos_url":"https://api.github.com/users/RynnHeldeD/repos","events_url":"https://api.github.com/users/RynnHeldeD/events{/privacy}","received_events_url":"https://api.github.com/users/RynnHeldeD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RynnHeldeD/Ruby-G3","description":"Sujet pour école des mines Alès 2015, Ruby on Rails","fork":true,"url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3","forks_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/forks","keys_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/teams","hooks_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/hooks","issue_events_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/events{/number}","events_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/events","assignees_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/assignees{/user}","branches_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/branches{/branch}","tags_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/tags","blobs_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/refs{/sha}","trees_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/statuses/{sha}","languages_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/languages","stargazers_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/stargazers","contributors_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/contributors","subscribers_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/subscribers","subscription_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/subscription","commits_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/commits{/sha}","git_commits_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/git/commits{/sha}","comments_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/comments{/number}","issue_comment_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/comments{/number}","contents_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/contents/{+path}","compare_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/merges","archive_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/downloads","issues_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues{/number}","pulls_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls{/number}","milestones_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/milestones{/number}","notifications_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/labels{/name}","releases_url":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/releases{/id}","created_at":"2015-05-28T11:52:15Z","updated_at":"2015-05-28T14:27:10Z","pushed_at":"2015-06-24T15:42:00Z","git_url":"git://github.com/RynnHeldeD/Ruby-G3.git","ssh_url":"git@github.com:RynnHeldeD/Ruby-G3.git","clone_url":"https://github.com/RynnHeldeD/Ruby-G3.git","svn_url":"https://github.com/RynnHeldeD/Ruby-G3","homepage":null,"size":3331,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26"},"html":{"href":"https://github.com/RynnHeldeD/Ruby-G3/pull/26"},"issue":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/26"},"comments":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/RynnHeldeD/Ruby-G3/statuses/1e23ac93308dfdc1ee93c7c6749629dbc3d58e9b"}}}}