{"action":"created","comment":{"url":"https://api.github.com/repos/olimart/yamail/pulls/comments/27558366","id":27558366,"diff_hunk":"@@ -50,13 +51,68 @@ def destroy\n     end\n   end\n \n+  def import\n+    @list.import_members(params[:file])\n+    @list.save\n+    redirect_to @list, notice: \"List members imported.\"\n+  rescue StandardError => exc\n+    flash.alert = exc.message\n+    redirect_to @list\n+  end\n+\n+  def header_update\n+    update_headers\n+    if @list.save\n+      render json: { :\"#{@header}\" => @new_header }\n+    else\n+      render json: {}\n+    end\n+\n+  end\n+\n+  def liquid_tags\n+  end\n+\n+  def update_liquid_tags\n+    update_tags\n+\n+    if @list.save\n+      redirect_to @list\n+    else\n+      redirect_to liquid_tags_list_path(@list)\n+    end\n+  end\n+\n+  def member_remove\n+    members = @list.list_members.reject { |m| m.fetch(\"email\") == params[:email] }\n+    @list.update_column('list_members', members)\n+    redirect_to @list\n+  end\n+\n+  def clear\n+    @list.update_column('list_members', nil)\n+    redirect_to @list\n+  end\n+\n   private\n \n   def set_list\n-    @list = List.find(params[:id])\n+    @list = current_user.lists.find(params[:id])\n   end\n \n   def safe_params\n-    params.require(:list).permit(:name)\n+    params.require(:list).permit(:name, :from_email, :from_name, :reminder, :company)\n   end\n-end\n+\n+  def prepare_liquid_tags_params\n+    query = []\n+    params[:segment][:query_params].values.each do |el|\n+      if el.fetch(\"_destroy\") == \"\"\n+        el.delete(\"_destroy\")\n+        query << el\n+      end\n+    end\n+    query\n+  end\n+","path":"app/controllers/lists_controller.rb","position":87,"original_position":87,"commit_id":"c3837ac88c2714878f971398e5c2bd603be3b6d8","original_commit_id":"c3837ac88c2714878f971398e5c2bd603be3b6d8","user":{"login":"codeguardci","id":9791874,"avatar_url":"https://avatars.githubusercontent.com/u/9791874?v=3","gravatar_id":"","url":"https://api.github.com/users/codeguardci","html_url":"https://github.com/codeguardci","followers_url":"https://api.github.com/users/codeguardci/followers","following_url":"https://api.github.com/users/codeguardci/following{/other_user}","gists_url":"https://api.github.com/users/codeguardci/gists{/gist_id}","starred_url":"https://api.github.com/users/codeguardci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeguardci/subscriptions","organizations_url":"https://api.github.com/users/codeguardci/orgs","repos_url":"https://api.github.com/users/codeguardci/repos","events_url":"https://api.github.com/users/codeguardci/events{/privacy}","received_events_url":"https://api.github.com/users/codeguardci/received_events","type":"User","site_admin":false},"body":"Extra empty line detected at class body end.","created_at":"2015-04-01T10:26:23Z","updated_at":"2015-04-01T10:26:23Z","html_url":"https://github.com/olimart/yamail/pull/4#discussion_r27558366","pull_request_url":"https://api.github.com/repos/olimart/yamail/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/olimart/yamail/pulls/comments/27558366"},"html":{"href":"https://github.com/olimart/yamail/pull/4#discussion_r27558366"},"pull_request":{"href":"https://api.github.com/repos/olimart/yamail/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/olimart/yamail/pulls/4","id":31634624,"html_url":"https://github.com/olimart/yamail/pull/4","diff_url":"https://github.com/olimart/yamail/pull/4.diff","patch_url":"https://github.com/olimart/yamail/pull/4.patch","issue_url":"https://api.github.com/repos/olimart/yamail/issues/4","number":4,"state":"open","locked":false,"title":"Sending email","user":{"login":"croko","id":333912,"avatar_url":"https://avatars.githubusercontent.com/u/333912?v=3","gravatar_id":"","url":"https://api.github.com/users/croko","html_url":"https://github.com/croko","followers_url":"https://api.github.com/users/croko/followers","following_url":"https://api.github.com/users/croko/following{/other_user}","gists_url":"https://api.github.com/users/croko/gists{/gist_id}","starred_url":"https://api.github.com/users/croko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croko/subscriptions","organizations_url":"https://api.github.com/users/croko/orgs","repos_url":"https://api.github.com/users/croko/repos","events_url":"https://api.github.com/users/croko/events{/privacy}","received_events_url":"https://api.github.com/users/croko/received_events","type":"User","site_admin":false},"body":"May be need some cosmetic changes","created_at":"2015-03-20T17:31:16Z","updated_at":"2015-04-01T10:26:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/olimart/yamail/pulls/4/commits","review_comments_url":"https://api.github.com/repos/olimart/yamail/pulls/4/comments","review_comment_url":"https://api.github.com/repos/olimart/yamail/pulls/comments{/number}","comments_url":"https://api.github.com/repos/olimart/yamail/issues/4/comments","statuses_url":"https://api.github.com/repos/olimart/yamail/statuses/c3837ac88c2714878f971398e5c2bd603be3b6d8","head":{"label":"olimart:sending_email","ref":"sending_email","sha":"c3837ac88c2714878f971398e5c2bd603be3b6d8","user":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"repo":{"id":30719187,"name":"yamail","full_name":"olimart/yamail","owner":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/olimart/yamail","description":"","fork":false,"url":"https://api.github.com/repos/olimart/yamail","forks_url":"https://api.github.com/repos/olimart/yamail/forks","keys_url":"https://api.github.com/repos/olimart/yamail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/olimart/yamail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/olimart/yamail/teams","hooks_url":"https://api.github.com/repos/olimart/yamail/hooks","issue_events_url":"https://api.github.com/repos/olimart/yamail/issues/events{/number}","events_url":"https://api.github.com/repos/olimart/yamail/events","assignees_url":"https://api.github.com/repos/olimart/yamail/assignees{/user}","branches_url":"https://api.github.com/repos/olimart/yamail/branches{/branch}","tags_url":"https://api.github.com/repos/olimart/yamail/tags","blobs_url":"https://api.github.com/repos/olimart/yamail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/olimart/yamail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/olimart/yamail/git/refs{/sha}","trees_url":"https://api.github.com/repos/olimart/yamail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/olimart/yamail/statuses/{sha}","languages_url":"https://api.github.com/repos/olimart/yamail/languages","stargazers_url":"https://api.github.com/repos/olimart/yamail/stargazers","contributors_url":"https://api.github.com/repos/olimart/yamail/contributors","subscribers_url":"https://api.github.com/repos/olimart/yamail/subscribers","subscription_url":"https://api.github.com/repos/olimart/yamail/subscription","commits_url":"https://api.github.com/repos/olimart/yamail/commits{/sha}","git_commits_url":"https://api.github.com/repos/olimart/yamail/git/commits{/sha}","comments_url":"https://api.github.com/repos/olimart/yamail/comments{/number}","issue_comment_url":"https://api.github.com/repos/olimart/yamail/issues/comments{/number}","contents_url":"https://api.github.com/repos/olimart/yamail/contents/{+path}","compare_url":"https://api.github.com/repos/olimart/yamail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/olimart/yamail/merges","archive_url":"https://api.github.com/repos/olimart/yamail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/olimart/yamail/downloads","issues_url":"https://api.github.com/repos/olimart/yamail/issues{/number}","pulls_url":"https://api.github.com/repos/olimart/yamail/pulls{/number}","milestones_url":"https://api.github.com/repos/olimart/yamail/milestones{/number}","notifications_url":"https://api.github.com/repos/olimart/yamail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/olimart/yamail/labels{/name}","releases_url":"https://api.github.com/repos/olimart/yamail/releases{/id}","created_at":"2015-02-12T19:20:58Z","updated_at":"2015-02-24T06:07:43Z","pushed_at":"2015-04-01T10:26:11Z","git_url":"git://github.com/olimart/yamail.git","ssh_url":"git@github.com:olimart/yamail.git","clone_url":"https://github.com/olimart/yamail.git","svn_url":"https://github.com/olimart/yamail","homepage":null,"size":420,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"olimart:master","ref":"master","sha":"4cece0b4658cf95a5df91a832099b6c4891d4f49","user":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"repo":{"id":30719187,"name":"yamail","full_name":"olimart/yamail","owner":{"login":"olimart","id":547754,"avatar_url":"https://avatars.githubusercontent.com/u/547754?v=3","gravatar_id":"","url":"https://api.github.com/users/olimart","html_url":"https://github.com/olimart","followers_url":"https://api.github.com/users/olimart/followers","following_url":"https://api.github.com/users/olimart/following{/other_user}","gists_url":"https://api.github.com/users/olimart/gists{/gist_id}","starred_url":"https://api.github.com/users/olimart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olimart/subscriptions","organizations_url":"https://api.github.com/users/olimart/orgs","repos_url":"https://api.github.com/users/olimart/repos","events_url":"https://api.github.com/users/olimart/events{/privacy}","received_events_url":"https://api.github.com/users/olimart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/olimart/yamail","description":"","fork":false,"url":"https://api.github.com/repos/olimart/yamail","forks_url":"https://api.github.com/repos/olimart/yamail/forks","keys_url":"https://api.github.com/repos/olimart/yamail/keys{/key_id}","collaborators_url":"https://api.github.com/repos/olimart/yamail/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/olimart/yamail/teams","hooks_url":"https://api.github.com/repos/olimart/yamail/hooks","issue_events_url":"https://api.github.com/repos/olimart/yamail/issues/events{/number}","events_url":"https://api.github.com/repos/olimart/yamail/events","assignees_url":"https://api.github.com/repos/olimart/yamail/assignees{/user}","branches_url":"https://api.github.com/repos/olimart/yamail/branches{/branch}","tags_url":"https://api.github.com/repos/olimart/yamail/tags","blobs_url":"https://api.github.com/repos/olimart/yamail/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/olimart/yamail/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/olimart/yamail/git/refs{/sha}","trees_url":"https://api.github.com/repos/olimart/yamail/git/trees{/sha}","statuses_url":"https://api.github.com/repos/olimart/yamail/statuses/{sha}","languages_url":"https://api.github.com/repos/olimart/yamail/languages","stargazers_url":"https://api.github.com/repos/olimart/yamail/stargazers","contributors_url":"https://api.github.com/repos/olimart/yamail/contributors","subscribers_url":"https://api.github.com/repos/olimart/yamail/subscribers","subscription_url":"https://api.github.com/repos/olimart/yamail/subscription","commits_url":"https://api.github.com/repos/olimart/yamail/commits{/sha}","git_commits_url":"https://api.github.com/repos/olimart/yamail/git/commits{/sha}","comments_url":"https://api.github.com/repos/olimart/yamail/comments{/number}","issue_comment_url":"https://api.github.com/repos/olimart/yamail/issues/comments{/number}","contents_url":"https://api.github.com/repos/olimart/yamail/contents/{+path}","compare_url":"https://api.github.com/repos/olimart/yamail/compare/{base}...{head}","merges_url":"https://api.github.com/repos/olimart/yamail/merges","archive_url":"https://api.github.com/repos/olimart/yamail/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/olimart/yamail/downloads","issues_url":"https://api.github.com/repos/olimart/yamail/issues{/number}","pulls_url":"https://api.github.com/repos/olimart/yamail/pulls{/number}","milestones_url":"https://api.github.com/repos/olimart/yamail/milestones{/number}","notifications_url":"https://api.github.com/repos/olimart/yamail/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/olimart/yamail/labels{/name}","releases_url":"https://api.github.com/repos/olimart/yamail/releases{/id}","created_at":"2015-02-12T19:20:58Z","updated_at":"2015-02-24T06:07:43Z","pushed_at":"2015-04-01T10:26:11Z","git_url":"git://github.com/olimart/yamail.git","ssh_url":"git@github.com:olimart/yamail.git","clone_url":"https://github.com/olimart/yamail.git","svn_url":"https://github.com/olimart/yamail","homepage":null,"size":420,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/olimart/yamail/pulls/4"},"html":{"href":"https://github.com/olimart/yamail/pull/4"},"issue":{"href":"https://api.github.com/repos/olimart/yamail/issues/4"},"comments":{"href":"https://api.github.com/repos/olimart/yamail/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/olimart/yamail/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/olimart/yamail/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/olimart/yamail/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/olimart/yamail/statuses/c3837ac88c2714878f971398e5c2bd603be3b6d8"}}}}