{"action":"created","comment":{"url":"https://api.github.com/repos/iamvery/ratchet/pulls/comments/65436438","id":65436438,"diff_hunk":"@@ -12,11 +12,23 @@ defmodule Ratchet.EEx do\n   @doc \"\"\"\n   Build an EEx statement fetching content\n \n-      iex> Ratchet.EEx.eex_content(\"lolwat\")\n-      \"<%= Ratchet.Data.content(lolwat) %>\"\n+      iex> Ratchet.EEx.eex_content(\"lolwat\", [\"Content\"])\n+      [\n+        \"<%= if Ratchet.Data.content?(lolwat) do %>\",\n+        \"<%= Ratchet.Data.content(lolwat) %>\",\n+        \"<% else %>\",\n+        \"Content\",\n+        \"<% end %>\",\n+      ]\n   \"\"\"\n-  def eex_content(property) do\n-    \"<%= Ratchet.Data.content(#{property}) %>\"\n+  def eex_content(property, default) do\n+    [\n+      \"<%= if Ratchet.Data.content?(#{property}) do %>\",\n+      \"<%= Ratchet.Data.content(#{property}) %>\",\n+      \"<% else %>\",\n+      default,\n+      eex_close,\n+    ] |> List.flatten","path":"lib/ratchet/eex.ex","position":24,"original_position":24,"commit_id":"4358c534a2670108c9fb588217c3c043f325cc6b","original_commit_id":"4358c534a2670108c9fb588217c3c043f325cc6b","user":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"body":"Would sort of rather \"splice\" the default content into the list rather than having to flatten. Not sure if that's doable? Perhaps could use `unquote_splicing`, but doesn't feel worth converting this to a macro.","created_at":"2016-06-01T20:31:02Z","updated_at":"2016-06-01T20:31:02Z","html_url":"https://github.com/iamvery/ratchet/pull/38#discussion_r65436438","pull_request_url":"https://api.github.com/repos/iamvery/ratchet/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/iamvery/ratchet/pulls/comments/65436438"},"html":{"href":"https://github.com/iamvery/ratchet/pull/38#discussion_r65436438"},"pull_request":{"href":"https://api.github.com/repos/iamvery/ratchet/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/iamvery/ratchet/pulls/38","id":72244057,"html_url":"https://github.com/iamvery/ratchet/pull/38","diff_url":"https://github.com/iamvery/ratchet/pull/38.diff","patch_url":"https://github.com/iamvery/ratchet/pull/38.patch","issue_url":"https://api.github.com/repos/iamvery/ratchet/issues/38","number":38,"state":"open","locked":false,"title":"Default content","user":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-01T20:10:50Z","updated_at":"2016-06-01T20:31:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bd939d9e0f2b5e8916565c5ed1c2c038b1e6a52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iamvery/ratchet/pulls/38/commits","review_comments_url":"https://api.github.com/repos/iamvery/ratchet/pulls/38/comments","review_comment_url":"https://api.github.com/repos/iamvery/ratchet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iamvery/ratchet/issues/38/comments","statuses_url":"https://api.github.com/repos/iamvery/ratchet/statuses/4358c534a2670108c9fb588217c3c043f325cc6b","head":{"label":"iamvery:default-content","ref":"default-content","sha":"4358c534a2670108c9fb588217c3c043f325cc6b","user":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"repo":{"id":58683970,"name":"ratchet","full_name":"iamvery/ratchet","owner":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamvery/ratchet","description":"Plain HTML Templates","fork":false,"url":"https://api.github.com/repos/iamvery/ratchet","forks_url":"https://api.github.com/repos/iamvery/ratchet/forks","keys_url":"https://api.github.com/repos/iamvery/ratchet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamvery/ratchet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamvery/ratchet/teams","hooks_url":"https://api.github.com/repos/iamvery/ratchet/hooks","issue_events_url":"https://api.github.com/repos/iamvery/ratchet/issues/events{/number}","events_url":"https://api.github.com/repos/iamvery/ratchet/events","assignees_url":"https://api.github.com/repos/iamvery/ratchet/assignees{/user}","branches_url":"https://api.github.com/repos/iamvery/ratchet/branches{/branch}","tags_url":"https://api.github.com/repos/iamvery/ratchet/tags","blobs_url":"https://api.github.com/repos/iamvery/ratchet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamvery/ratchet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamvery/ratchet/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamvery/ratchet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamvery/ratchet/statuses/{sha}","languages_url":"https://api.github.com/repos/iamvery/ratchet/languages","stargazers_url":"https://api.github.com/repos/iamvery/ratchet/stargazers","contributors_url":"https://api.github.com/repos/iamvery/ratchet/contributors","subscribers_url":"https://api.github.com/repos/iamvery/ratchet/subscribers","subscription_url":"https://api.github.com/repos/iamvery/ratchet/subscription","commits_url":"https://api.github.com/repos/iamvery/ratchet/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamvery/ratchet/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamvery/ratchet/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamvery/ratchet/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamvery/ratchet/contents/{+path}","compare_url":"https://api.github.com/repos/iamvery/ratchet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamvery/ratchet/merges","archive_url":"https://api.github.com/repos/iamvery/ratchet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamvery/ratchet/downloads","issues_url":"https://api.github.com/repos/iamvery/ratchet/issues{/number}","pulls_url":"https://api.github.com/repos/iamvery/ratchet/pulls{/number}","milestones_url":"https://api.github.com/repos/iamvery/ratchet/milestones{/number}","notifications_url":"https://api.github.com/repos/iamvery/ratchet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamvery/ratchet/labels{/name}","releases_url":"https://api.github.com/repos/iamvery/ratchet/releases{/id}","deployments_url":"https://api.github.com/repos/iamvery/ratchet/deployments","created_at":"2016-05-12T23:26:49Z","updated_at":"2016-05-19T17:37:20Z","pushed_at":"2016-06-01T20:28:57Z","git_url":"git://github.com/iamvery/ratchet.git","ssh_url":"git@github.com:iamvery/ratchet.git","clone_url":"https://github.com/iamvery/ratchet.git","svn_url":"https://github.com/iamvery/ratchet","homepage":"https://hexdocs.pm/ratchet","size":66,"stargazers_count":3,"watchers_count":3,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":3,"default_branch":"master"}},"base":{"label":"iamvery:master","ref":"master","sha":"f1ea89fb25d647fdda4690d287d7c4e765bb3879","user":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"repo":{"id":58683970,"name":"ratchet","full_name":"iamvery/ratchet","owner":{"login":"iamvery","id":79619,"avatar_url":"https://avatars.githubusercontent.com/u/79619?v=3","gravatar_id":"","url":"https://api.github.com/users/iamvery","html_url":"https://github.com/iamvery","followers_url":"https://api.github.com/users/iamvery/followers","following_url":"https://api.github.com/users/iamvery/following{/other_user}","gists_url":"https://api.github.com/users/iamvery/gists{/gist_id}","starred_url":"https://api.github.com/users/iamvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamvery/subscriptions","organizations_url":"https://api.github.com/users/iamvery/orgs","repos_url":"https://api.github.com/users/iamvery/repos","events_url":"https://api.github.com/users/iamvery/events{/privacy}","received_events_url":"https://api.github.com/users/iamvery/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/iamvery/ratchet","description":"Plain HTML Templates","fork":false,"url":"https://api.github.com/repos/iamvery/ratchet","forks_url":"https://api.github.com/repos/iamvery/ratchet/forks","keys_url":"https://api.github.com/repos/iamvery/ratchet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iamvery/ratchet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iamvery/ratchet/teams","hooks_url":"https://api.github.com/repos/iamvery/ratchet/hooks","issue_events_url":"https://api.github.com/repos/iamvery/ratchet/issues/events{/number}","events_url":"https://api.github.com/repos/iamvery/ratchet/events","assignees_url":"https://api.github.com/repos/iamvery/ratchet/assignees{/user}","branches_url":"https://api.github.com/repos/iamvery/ratchet/branches{/branch}","tags_url":"https://api.github.com/repos/iamvery/ratchet/tags","blobs_url":"https://api.github.com/repos/iamvery/ratchet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iamvery/ratchet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iamvery/ratchet/git/refs{/sha}","trees_url":"https://api.github.com/repos/iamvery/ratchet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iamvery/ratchet/statuses/{sha}","languages_url":"https://api.github.com/repos/iamvery/ratchet/languages","stargazers_url":"https://api.github.com/repos/iamvery/ratchet/stargazers","contributors_url":"https://api.github.com/repos/iamvery/ratchet/contributors","subscribers_url":"https://api.github.com/repos/iamvery/ratchet/subscribers","subscription_url":"https://api.github.com/repos/iamvery/ratchet/subscription","commits_url":"https://api.github.com/repos/iamvery/ratchet/commits{/sha}","git_commits_url":"https://api.github.com/repos/iamvery/ratchet/git/commits{/sha}","comments_url":"https://api.github.com/repos/iamvery/ratchet/comments{/number}","issue_comment_url":"https://api.github.com/repos/iamvery/ratchet/issues/comments{/number}","contents_url":"https://api.github.com/repos/iamvery/ratchet/contents/{+path}","compare_url":"https://api.github.com/repos/iamvery/ratchet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iamvery/ratchet/merges","archive_url":"https://api.github.com/repos/iamvery/ratchet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iamvery/ratchet/downloads","issues_url":"https://api.github.com/repos/iamvery/ratchet/issues{/number}","pulls_url":"https://api.github.com/repos/iamvery/ratchet/pulls{/number}","milestones_url":"https://api.github.com/repos/iamvery/ratchet/milestones{/number}","notifications_url":"https://api.github.com/repos/iamvery/ratchet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iamvery/ratchet/labels{/name}","releases_url":"https://api.github.com/repos/iamvery/ratchet/releases{/id}","deployments_url":"https://api.github.com/repos/iamvery/ratchet/deployments","created_at":"2016-05-12T23:26:49Z","updated_at":"2016-05-19T17:37:20Z","pushed_at":"2016-06-01T20:28:57Z","git_url":"git://github.com/iamvery/ratchet.git","ssh_url":"git@github.com:iamvery/ratchet.git","clone_url":"https://github.com/iamvery/ratchet.git","svn_url":"https://github.com/iamvery/ratchet","homepage":"https://hexdocs.pm/ratchet","size":66,"stargazers_count":3,"watchers_count":3,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":14,"forks":1,"open_issues":14,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iamvery/ratchet/pulls/38"},"html":{"href":"https://github.com/iamvery/ratchet/pull/38"},"issue":{"href":"https://api.github.com/repos/iamvery/ratchet/issues/38"},"comments":{"href":"https://api.github.com/repos/iamvery/ratchet/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/iamvery/ratchet/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/iamvery/ratchet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iamvery/ratchet/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/iamvery/ratchet/statuses/4358c534a2670108c9fb588217c3c043f325cc6b"}}}}
{"actor":{"display_login":"iamvery"}}