{"action":"created","comment":{"url":"https://api.github.com/repos/sorachantha/project-readme/pulls/comments/41824772","id":41824772,"diff_hunk":"@@ -0,0 +1,62 @@\n+require \"json\"\n+\n+class LessonsController < ApplicationController\n+  def index\n+    @char_array = Character.all\n+    gon.charArray = @char_array\n+    @length = @char_array.length\n+    gon.length = @length\n+    answer_array = @char_array.shuffle\n+    @array_of_questions = []\n+    @array_of_answers = []\n+    @length.times do\n+      @array_of_questions << @char_array.shuffle\n+      @array_of_answers << answer_array.pop\n+    end\n+    gon.arrayOfQuestions = @array_of_questions\n+    gon.arrayOfAnswers = @array_of_answers\n+    @div_count = 0\n+    @todos = Todo.all\n+    @todo = Todo.new\n+\n+    respond_to do |format|\n+      format.html\n+      format.json { render json: {\n+        :answers => @array_of_answers,\n+        :questions => @array_of_questions\n+        } }\n+    end\n+  end\n+\n+  def update\n+    @f = Todo.last.description\n+    @f.update_attributes(params[:todo])\n+    respond_to do |format|\n+      format.html { redirect_to language_lessons_path }\n+      format.js\n+    end\n+  end\n+\n+  def new\n+    @todos = Todo.all\n+    @todo = Todo.new\n+  end\n+\n+  def create\n+    @todo = Todo.new(todo_params)\n+    respond_to do |format|\n+      if @todo.valid?\n+        format.json { render json: @todo, status: :created}\n+      else\n+        format.json { render json: @todo.errors, status: :unprocessable_entity }\n+      end\n+    end\n+  end\n+\n+  private\n+\n+  def todo_params\n+    params.require(:todo).permit(:title, :description)\n+  end\n+","path":"app/controllers/lessons_controller.rb","position":61,"original_position":61,"commit_id":"1255ac62a4159c768be063565ba19ce53d1fe8c2","original_commit_id":"1255ac62a4159c768be063565ba19ce53d1fe8c2","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Extra empty line detected at class body end.","created_at":"2015-10-13T03:58:02Z","updated_at":"2015-10-13T03:58:02Z","html_url":"https://github.com/sorachantha/project-readme/pull/4#discussion_r41824772","pull_request_url":"https://api.github.com/repos/sorachantha/project-readme/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/sorachantha/project-readme/pulls/comments/41824772"},"html":{"href":"https://github.com/sorachantha/project-readme/pull/4#discussion_r41824772"},"pull_request":{"href":"https://api.github.com/repos/sorachantha/project-readme/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/sorachantha/project-readme/pulls/4","id":47378344,"html_url":"https://github.com/sorachantha/project-readme/pull/4","diff_url":"https://github.com/sorachantha/project-readme/pull/4.diff","patch_url":"https://github.com/sorachantha/project-readme/pull/4.patch","issue_url":"https://api.github.com/repos/sorachantha/project-readme/issues/4","number":4,"state":"open","locked":false,"title":"Add start lesson","user":{"login":"sorachantha","id":13143507,"avatar_url":"https://avatars.githubusercontent.com/u/13143507?v=3","gravatar_id":"","url":"https://api.github.com/users/sorachantha","html_url":"https://github.com/sorachantha","followers_url":"https://api.github.com/users/sorachantha/followers","following_url":"https://api.github.com/users/sorachantha/following{/other_user}","gists_url":"https://api.github.com/users/sorachantha/gists{/gist_id}","starred_url":"https://api.github.com/users/sorachantha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorachantha/subscriptions","organizations_url":"https://api.github.com/users/sorachantha/orgs","repos_url":"https://api.github.com/users/sorachantha/repos","events_url":"https://api.github.com/users/sorachantha/events{/privacy}","received_events_url":"https://api.github.com/users/sorachantha/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-11T23:38:36Z","updated_at":"2015-10-13T03:58:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77851970675bbc0b55e4585a0219d38245688e94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sorachantha/project-readme/pulls/4/commits","review_comments_url":"https://api.github.com/repos/sorachantha/project-readme/pulls/4/comments","review_comment_url":"https://api.github.com/repos/sorachantha/project-readme/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sorachantha/project-readme/issues/4/comments","statuses_url":"https://api.github.com/repos/sorachantha/project-readme/statuses/1255ac62a4159c768be063565ba19ce53d1fe8c2","head":{"label":"sorachantha:add_start_lesson","ref":"add_start_lesson","sha":"1255ac62a4159c768be063565ba19ce53d1fe8c2","user":{"login":"sorachantha","id":13143507,"avatar_url":"https://avatars.githubusercontent.com/u/13143507?v=3","gravatar_id":"","url":"https://api.github.com/users/sorachantha","html_url":"https://github.com/sorachantha","followers_url":"https://api.github.com/users/sorachantha/followers","following_url":"https://api.github.com/users/sorachantha/following{/other_user}","gists_url":"https://api.github.com/users/sorachantha/gists{/gist_id}","starred_url":"https://api.github.com/users/sorachantha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorachantha/subscriptions","organizations_url":"https://api.github.com/users/sorachantha/orgs","repos_url":"https://api.github.com/users/sorachantha/repos","events_url":"https://api.github.com/users/sorachantha/events{/privacy}","received_events_url":"https://api.github.com/users/sorachantha/received_events","type":"User","site_admin":false},"repo":{"id":43765427,"name":"project-readme","full_name":"sorachantha/project-readme","owner":{"login":"sorachantha","id":13143507,"avatar_url":"https://avatars.githubusercontent.com/u/13143507?v=3","gravatar_id":"","url":"https://api.github.com/users/sorachantha","html_url":"https://github.com/sorachantha","followers_url":"https://api.github.com/users/sorachantha/followers","following_url":"https://api.github.com/users/sorachantha/following{/other_user}","gists_url":"https://api.github.com/users/sorachantha/gists{/gist_id}","starred_url":"https://api.github.com/users/sorachantha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorachantha/subscriptions","organizations_url":"https://api.github.com/users/sorachantha/orgs","repos_url":"https://api.github.com/users/sorachantha/repos","events_url":"https://api.github.com/users/sorachantha/events{/privacy}","received_events_url":"https://api.github.com/users/sorachantha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sorachantha/project-readme","description":"","fork":false,"url":"https://api.github.com/repos/sorachantha/project-readme","forks_url":"https://api.github.com/repos/sorachantha/project-readme/forks","keys_url":"https://api.github.com/repos/sorachantha/project-readme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sorachantha/project-readme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sorachantha/project-readme/teams","hooks_url":"https://api.github.com/repos/sorachantha/project-readme/hooks","issue_events_url":"https://api.github.com/repos/sorachantha/project-readme/issues/events{/number}","events_url":"https://api.github.com/repos/sorachantha/project-readme/events","assignees_url":"https://api.github.com/repos/sorachantha/project-readme/assignees{/user}","branches_url":"https://api.github.com/repos/sorachantha/project-readme/branches{/branch}","tags_url":"https://api.github.com/repos/sorachantha/project-readme/tags","blobs_url":"https://api.github.com/repos/sorachantha/project-readme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sorachantha/project-readme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sorachantha/project-readme/git/refs{/sha}","trees_url":"https://api.github.com/repos/sorachantha/project-readme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sorachantha/project-readme/statuses/{sha}","languages_url":"https://api.github.com/repos/sorachantha/project-readme/languages","stargazers_url":"https://api.github.com/repos/sorachantha/project-readme/stargazers","contributors_url":"https://api.github.com/repos/sorachantha/project-readme/contributors","subscribers_url":"https://api.github.com/repos/sorachantha/project-readme/subscribers","subscription_url":"https://api.github.com/repos/sorachantha/project-readme/subscription","commits_url":"https://api.github.com/repos/sorachantha/project-readme/commits{/sha}","git_commits_url":"https://api.github.com/repos/sorachantha/project-readme/git/commits{/sha}","comments_url":"https://api.github.com/repos/sorachantha/project-readme/comments{/number}","issue_comment_url":"https://api.github.com/repos/sorachantha/project-readme/issues/comments{/number}","contents_url":"https://api.github.com/repos/sorachantha/project-readme/contents/{+path}","compare_url":"https://api.github.com/repos/sorachantha/project-readme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sorachantha/project-readme/merges","archive_url":"https://api.github.com/repos/sorachantha/project-readme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sorachantha/project-readme/downloads","issues_url":"https://api.github.com/repos/sorachantha/project-readme/issues{/number}","pulls_url":"https://api.github.com/repos/sorachantha/project-readme/pulls{/number}","milestones_url":"https://api.github.com/repos/sorachantha/project-readme/milestones{/number}","notifications_url":"https://api.github.com/repos/sorachantha/project-readme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sorachantha/project-readme/labels{/name}","releases_url":"https://api.github.com/repos/sorachantha/project-readme/releases{/id}","created_at":"2015-10-06T17:11:14Z","updated_at":"2015-10-07T21:15:25Z","pushed_at":"2015-10-13T03:57:56Z","git_url":"git://github.com/sorachantha/project-readme.git","ssh_url":"git@github.com:sorachantha/project-readme.git","clone_url":"https://github.com/sorachantha/project-readme.git","svn_url":"https://github.com/sorachantha/project-readme","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sorachantha:master","ref":"master","sha":"c1fad0d51c3e2d1b3ca554aaeaba9a765f2e5de2","user":{"login":"sorachantha","id":13143507,"avatar_url":"https://avatars.githubusercontent.com/u/13143507?v=3","gravatar_id":"","url":"https://api.github.com/users/sorachantha","html_url":"https://github.com/sorachantha","followers_url":"https://api.github.com/users/sorachantha/followers","following_url":"https://api.github.com/users/sorachantha/following{/other_user}","gists_url":"https://api.github.com/users/sorachantha/gists{/gist_id}","starred_url":"https://api.github.com/users/sorachantha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorachantha/subscriptions","organizations_url":"https://api.github.com/users/sorachantha/orgs","repos_url":"https://api.github.com/users/sorachantha/repos","events_url":"https://api.github.com/users/sorachantha/events{/privacy}","received_events_url":"https://api.github.com/users/sorachantha/received_events","type":"User","site_admin":false},"repo":{"id":43765427,"name":"project-readme","full_name":"sorachantha/project-readme","owner":{"login":"sorachantha","id":13143507,"avatar_url":"https://avatars.githubusercontent.com/u/13143507?v=3","gravatar_id":"","url":"https://api.github.com/users/sorachantha","html_url":"https://github.com/sorachantha","followers_url":"https://api.github.com/users/sorachantha/followers","following_url":"https://api.github.com/users/sorachantha/following{/other_user}","gists_url":"https://api.github.com/users/sorachantha/gists{/gist_id}","starred_url":"https://api.github.com/users/sorachantha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorachantha/subscriptions","organizations_url":"https://api.github.com/users/sorachantha/orgs","repos_url":"https://api.github.com/users/sorachantha/repos","events_url":"https://api.github.com/users/sorachantha/events{/privacy}","received_events_url":"https://api.github.com/users/sorachantha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sorachantha/project-readme","description":"","fork":false,"url":"https://api.github.com/repos/sorachantha/project-readme","forks_url":"https://api.github.com/repos/sorachantha/project-readme/forks","keys_url":"https://api.github.com/repos/sorachantha/project-readme/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sorachantha/project-readme/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sorachantha/project-readme/teams","hooks_url":"https://api.github.com/repos/sorachantha/project-readme/hooks","issue_events_url":"https://api.github.com/repos/sorachantha/project-readme/issues/events{/number}","events_url":"https://api.github.com/repos/sorachantha/project-readme/events","assignees_url":"https://api.github.com/repos/sorachantha/project-readme/assignees{/user}","branches_url":"https://api.github.com/repos/sorachantha/project-readme/branches{/branch}","tags_url":"https://api.github.com/repos/sorachantha/project-readme/tags","blobs_url":"https://api.github.com/repos/sorachantha/project-readme/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sorachantha/project-readme/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sorachantha/project-readme/git/refs{/sha}","trees_url":"https://api.github.com/repos/sorachantha/project-readme/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sorachantha/project-readme/statuses/{sha}","languages_url":"https://api.github.com/repos/sorachantha/project-readme/languages","stargazers_url":"https://api.github.com/repos/sorachantha/project-readme/stargazers","contributors_url":"https://api.github.com/repos/sorachantha/project-readme/contributors","subscribers_url":"https://api.github.com/repos/sorachantha/project-readme/subscribers","subscription_url":"https://api.github.com/repos/sorachantha/project-readme/subscription","commits_url":"https://api.github.com/repos/sorachantha/project-readme/commits{/sha}","git_commits_url":"https://api.github.com/repos/sorachantha/project-readme/git/commits{/sha}","comments_url":"https://api.github.com/repos/sorachantha/project-readme/comments{/number}","issue_comment_url":"https://api.github.com/repos/sorachantha/project-readme/issues/comments{/number}","contents_url":"https://api.github.com/repos/sorachantha/project-readme/contents/{+path}","compare_url":"https://api.github.com/repos/sorachantha/project-readme/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sorachantha/project-readme/merges","archive_url":"https://api.github.com/repos/sorachantha/project-readme/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sorachantha/project-readme/downloads","issues_url":"https://api.github.com/repos/sorachantha/project-readme/issues{/number}","pulls_url":"https://api.github.com/repos/sorachantha/project-readme/pulls{/number}","milestones_url":"https://api.github.com/repos/sorachantha/project-readme/milestones{/number}","notifications_url":"https://api.github.com/repos/sorachantha/project-readme/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sorachantha/project-readme/labels{/name}","releases_url":"https://api.github.com/repos/sorachantha/project-readme/releases{/id}","created_at":"2015-10-06T17:11:14Z","updated_at":"2015-10-07T21:15:25Z","pushed_at":"2015-10-13T03:57:56Z","git_url":"git://github.com/sorachantha/project-readme.git","ssh_url":"git@github.com:sorachantha/project-readme.git","clone_url":"https://github.com/sorachantha/project-readme.git","svn_url":"https://github.com/sorachantha/project-readme","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sorachantha/project-readme/pulls/4"},"html":{"href":"https://github.com/sorachantha/project-readme/pull/4"},"issue":{"href":"https://api.github.com/repos/sorachantha/project-readme/issues/4"},"comments":{"href":"https://api.github.com/repos/sorachantha/project-readme/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/sorachantha/project-readme/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/sorachantha/project-readme/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sorachantha/project-readme/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/sorachantha/project-readme/statuses/1255ac62a4159c768be063565ba19ce53d1fe8c2"}}}}