{"action":"created","comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/101234673","pull_request_review_id":21955098,"id":101234673,"diff_hunk":"@@ -0,0 +1,97 @@\n+\n+  alias <%= inspect schema.module %>\n+\n+  @doc \"\"\"\n+  Returns the list of <%= schema.plural %>.\n+\n+  ## Examples\n+\n+      iex> list_<%= schema.plural %>()\n+      [%<%= inspect schema.alias %>{}, ...]\n+  \"\"\"\n+  def list_<%= schema.plural %> do\n+    Repo.all(<%= inspect schema.alias %>)\n+  end\n+\n+  @doc \"\"\"\n+  Gets a single <%= schema.singular %>.\n+\n+  Raises `Ecto.NoResultsError` if the <%= schema.human_singular %> does not exist.\n+\n+  ## Examples\n+\n+      iex> get_<%= schema.singular %>!(123)\n+      %<%= inspect schema.alias %>{}\n+\n+      iex> get_<%= schema.singular %>!(456)\n+      ** (Ecto.NoResultsError)\n+  \"\"\"\n+  def get_<%= schema.singular %>!(id), do: Repo.get!(<%= inspect schema.alias %>, id)\n+\n+  @doc \"\"\"\n+  Creates a <%= schema.singular %>.\n+\n+  ## Examples\n+\n+      iex> create_<%= schema.singular %>(<%= schema.singular %>, %{field: value})\n+      {:ok, %<%= inspect schema.alias %>{}}\n+\n+      iex> create_<%= schema.singular %>(<%= schema.singular %>, %{field: bad_value})\n+      {:error, %Ecto.Changeset{}}\n+  \"\"\"\n+  def create_<%= schema.singular %>(attrs \\\\ %{}) do\n+    %<%= inspect schema.alias %>{}\n+    |> <%= schema.singular %>_changeset(attrs)\n+    |> Repo.insert()\n+  end\n+\n+  @doc \"\"\"\n+  Updates a <%= schema.singular %>.\n+\n+  ## Examples\n+\n+      iex> update_<%= schema.singular %>(<%= schema.singular %>, %{field: new_value})\n+      {:ok, %<%= inspect schema.alias %>{}}\n+\n+      iex> update_<%= schema.singular %>(<%= schema.singular %>, %{field: bad_value})\n+      {:error, %Ecto.Changeset{}}\n+  \"\"\"\n+  def update_<%= schema.singular %>(%<%= inspect schema.alias %>{} = <%= schema.singular %>, attrs) do\n+    <%= schema.singular %>\n+    |> <%= schema.singular %>_changeset(attrs)\n+    |> Repo.update()\n+  end\n+\n+  @doc \"\"\"\n+  Deletes a <%= inspect schema.alias %>.\n+\n+  ## Examples\n+\n+      iex> delete_<%= schema.singular %>(<%= schema.singular %>)\n+      {:ok, %<%= inspect schema.alias %>{}}\n+\n+      iex> delete_<%= schema.singular %>(<%= schema.singular %>)\n+      {:error, %Ecto.Changeset{}}\n+  \"\"\"\n+  def delete_<%= schema.singular %>(%<%= inspect schema.alias %>{} = <%= schema.singular %>) do\n+    Repo.delete(<%= schema.singular %>)\n+  end\n+\n+  @doc \"\"\"\n+  Returns an `%Ecto.Changeset{}` for tracking <%= schema.singular %> changes.","path":"priv/templates/phx.gen.html/schema_access.ex","position":81,"original_position":81,"commit_id":"0f3472ca34adb30815f5a1891a8471b05bf7a1aa","original_commit_id":"4e14d7cf07a05873d3fc83d83b6f6bb91bce9533","user":{"login":"josevalim","id":9582,"avatar_url":"https://avatars.githubusercontent.com/u/9582?v=3","gravatar_id":"","url":"https://api.github.com/users/josevalim","html_url":"https://github.com/josevalim","followers_url":"https://api.github.com/users/josevalim/followers","following_url":"https://api.github.com/users/josevalim/following{/other_user}","gists_url":"https://api.github.com/users/josevalim/gists{/gist_id}","starred_url":"https://api.github.com/users/josevalim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josevalim/subscriptions","organizations_url":"https://api.github.com/users/josevalim/orgs","repos_url":"https://api.github.com/users/josevalim/repos","events_url":"https://api.github.com/users/josevalim/events{/privacy}","received_events_url":"https://api.github.com/users/josevalim/received_events","type":"User","site_admin":false},"body":"@chrismccord I would also keep for backwards compat purposes. The imports won't hurt. :)","created_at":"2017-02-15T09:31:36Z","updated_at":"2017-02-15T09:31:36Z","html_url":"https://github.com/phoenixframework/phoenix/pull/1927#discussion_r101234673","pull_request_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927","_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments/101234673"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/1927#discussion_r101234673"},"pull_request":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927"}}},"pull_request":{"url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927","id":86056615,"html_url":"https://github.com/phoenixframework/phoenix/pull/1927","diff_url":"https://github.com/phoenixframework/phoenix/pull/1927.diff","patch_url":"https://github.com/phoenixframework/phoenix/pull/1927.patch","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1927","number":1927,"state":"open","locked":false,"title":"Enhance new generators","user":{"login":"chrismccord","id":576796,"avatar_url":"https://avatars.githubusercontent.com/u/576796?v=3","gravatar_id":"","url":"https://api.github.com/users/chrismccord","html_url":"https://github.com/chrismccord","followers_url":"https://api.github.com/users/chrismccord/followers","following_url":"https://api.github.com/users/chrismccord/following{/other_user}","gists_url":"https://api.github.com/users/chrismccord/gists{/gist_id}","starred_url":"https://api.github.com/users/chrismccord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrismccord/subscriptions","organizations_url":"https://api.github.com/users/chrismccord/orgs","repos_url":"https://api.github.com/users/chrismccord/repos","events_url":"https://api.github.com/users/chrismccord/events{/privacy}","received_events_url":"https://api.github.com/users/chrismccord/received_events","type":"User","site_admin":false},"body":"WIP\r\n- [x] Add MyApp.Application\r\n- [x] ensure all model references are gone\r\n- [x] remove errors_on\r\n- [x] add `cd assets` to npm install instructions\r\n- [x] `mix phoenix.routes` should check for `MyApp.Web.Router` and fallback to `MyApp.Router` \r\n- [x] ensure repo is added to ecto_repos, in apps/my_app_web\r\n- [x] add phx.new.web / phx.new.ecto\r\n- [x] add phx.gen.schema (needs docs)\r\n- [x] add phx.gen.html (needs docs)\r\n- [x] add mix phx.gen.json\r\n- [x] add action_fallback\r\n- [x] add function plug support to action_fallback\r\n- [x] normalize MyApp.Web app module across single and umbrella apps\r\n- [x] ensure gen.\\* cannot run from umbrella root\r\n- [ ] Remove shortdoc + deprecate 1.2 generators\r\n- [ ] reconcile --module and --app options when combined with --umbrella\r\n","created_at":"2016-09-20T21:07:45Z","updated_at":"2017-02-15T09:31:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bc06dc1453f5e8149ae8c4bb02bc0afef7b24fe","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927/commits","review_comments_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927/comments","review_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1927/comments","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/0f3472ca34adb30815f5a1891a8471b05bf7a1aa","head":{"label":"phoenixframework:cm-phx-gen-next","ref":"cm-phx-gen-next","sha":"0f3472ca34adb30815f5a1891a8471b05bf7a1aa","user":{"login":"phoenixframework","id":6510388,"avatar_url":"https://avatars.githubusercontent.com/u/6510388?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"repo":{"id":16072585,"name":"phoenix","full_name":"phoenixframework/phoenix","owner":{"login":"phoenixframework","id":6510388,"avatar_url":"https://avatars.githubusercontent.com/u/6510388?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phoenixframework/phoenix","description":"Productive. Reliable. Fast.","fork":false,"url":"https://api.github.com/repos/phoenixframework/phoenix","forks_url":"https://api.github.com/repos/phoenixframework/phoenix/forks","keys_url":"https://api.github.com/repos/phoenixframework/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phoenixframework/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phoenixframework/phoenix/teams","hooks_url":"https://api.github.com/repos/phoenixframework/phoenix/hooks","issue_events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/phoenixframework/phoenix/events","assignees_url":"https://api.github.com/repos/phoenixframework/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/phoenixframework/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/phoenixframework/phoenix/tags","blobs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phoenixframework/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/phoenixframework/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/phoenixframework/phoenix/languages","stargazers_url":"https://api.github.com/repos/phoenixframework/phoenix/stargazers","contributors_url":"https://api.github.com/repos/phoenixframework/phoenix/contributors","subscribers_url":"https://api.github.com/repos/phoenixframework/phoenix/subscribers","subscription_url":"https://api.github.com/repos/phoenixframework/phoenix/subscription","commits_url":"https://api.github.com/repos/phoenixframework/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/phoenixframework/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/phoenixframework/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/phoenixframework/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phoenixframework/phoenix/merges","archive_url":"https://api.github.com/repos/phoenixframework/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phoenixframework/phoenix/downloads","issues_url":"https://api.github.com/repos/phoenixframework/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/phoenixframework/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/phoenixframework/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/phoenixframework/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/phoenixframework/phoenix/deployments","created_at":"2014-01-20T14:14:11Z","updated_at":"2017-02-15T08:08:55Z","pushed_at":"2017-02-15T00:41:15Z","git_url":"git://github.com/phoenixframework/phoenix.git","ssh_url":"git@github.com:phoenixframework/phoenix.git","clone_url":"https://github.com/phoenixframework/phoenix.git","svn_url":"https://github.com/phoenixframework/phoenix","homepage":"http://www.phoenixframework.org","size":5681,"stargazers_count":8755,"watchers_count":8755,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":997,"mirror_url":null,"open_issues_count":28,"forks":997,"open_issues":28,"watchers":8755,"default_branch":"master"}},"base":{"label":"phoenixframework:master","ref":"master","sha":"0aaea792a46084735726c3893b7609da5baf1f65","user":{"login":"phoenixframework","id":6510388,"avatar_url":"https://avatars.githubusercontent.com/u/6510388?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"repo":{"id":16072585,"name":"phoenix","full_name":"phoenixframework/phoenix","owner":{"login":"phoenixframework","id":6510388,"avatar_url":"https://avatars.githubusercontent.com/u/6510388?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixframework","html_url":"https://github.com/phoenixframework","followers_url":"https://api.github.com/users/phoenixframework/followers","following_url":"https://api.github.com/users/phoenixframework/following{/other_user}","gists_url":"https://api.github.com/users/phoenixframework/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixframework/subscriptions","organizations_url":"https://api.github.com/users/phoenixframework/orgs","repos_url":"https://api.github.com/users/phoenixframework/repos","events_url":"https://api.github.com/users/phoenixframework/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phoenixframework/phoenix","description":"Productive. Reliable. Fast.","fork":false,"url":"https://api.github.com/repos/phoenixframework/phoenix","forks_url":"https://api.github.com/repos/phoenixframework/phoenix/forks","keys_url":"https://api.github.com/repos/phoenixframework/phoenix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phoenixframework/phoenix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phoenixframework/phoenix/teams","hooks_url":"https://api.github.com/repos/phoenixframework/phoenix/hooks","issue_events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/events{/number}","events_url":"https://api.github.com/repos/phoenixframework/phoenix/events","assignees_url":"https://api.github.com/repos/phoenixframework/phoenix/assignees{/user}","branches_url":"https://api.github.com/repos/phoenixframework/phoenix/branches{/branch}","tags_url":"https://api.github.com/repos/phoenixframework/phoenix/tags","blobs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phoenixframework/phoenix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phoenixframework/phoenix/git/refs{/sha}","trees_url":"https://api.github.com/repos/phoenixframework/phoenix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phoenixframework/phoenix/statuses/{sha}","languages_url":"https://api.github.com/repos/phoenixframework/phoenix/languages","stargazers_url":"https://api.github.com/repos/phoenixframework/phoenix/stargazers","contributors_url":"https://api.github.com/repos/phoenixframework/phoenix/contributors","subscribers_url":"https://api.github.com/repos/phoenixframework/phoenix/subscribers","subscription_url":"https://api.github.com/repos/phoenixframework/phoenix/subscription","commits_url":"https://api.github.com/repos/phoenixframework/phoenix/commits{/sha}","git_commits_url":"https://api.github.com/repos/phoenixframework/phoenix/git/commits{/sha}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/comments{/number}","issue_comment_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments{/number}","contents_url":"https://api.github.com/repos/phoenixframework/phoenix/contents/{+path}","compare_url":"https://api.github.com/repos/phoenixframework/phoenix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phoenixframework/phoenix/merges","archive_url":"https://api.github.com/repos/phoenixframework/phoenix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phoenixframework/phoenix/downloads","issues_url":"https://api.github.com/repos/phoenixframework/phoenix/issues{/number}","pulls_url":"https://api.github.com/repos/phoenixframework/phoenix/pulls{/number}","milestones_url":"https://api.github.com/repos/phoenixframework/phoenix/milestones{/number}","notifications_url":"https://api.github.com/repos/phoenixframework/phoenix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/labels{/name}","releases_url":"https://api.github.com/repos/phoenixframework/phoenix/releases{/id}","deployments_url":"https://api.github.com/repos/phoenixframework/phoenix/deployments","created_at":"2014-01-20T14:14:11Z","updated_at":"2017-02-15T08:08:55Z","pushed_at":"2017-02-15T00:41:15Z","git_url":"git://github.com/phoenixframework/phoenix.git","ssh_url":"git@github.com:phoenixframework/phoenix.git","clone_url":"https://github.com/phoenixframework/phoenix.git","svn_url":"https://github.com/phoenixframework/phoenix","homepage":"http://www.phoenixframework.org","size":5681,"stargazers_count":8755,"watchers_count":8755,"language":"Elixir","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":997,"mirror_url":null,"open_issues_count":28,"forks":997,"open_issues":28,"watchers":8755,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927"},"html":{"href":"https://github.com/phoenixframework/phoenix/pull/1927"},"issue":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/1927"},"comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/issues/1927/comments"},"review_comments":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927/comments"},"review_comment":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phoenixframework/phoenix/pulls/1927/commits"},"statuses":{"href":"https://api.github.com/repos/phoenixframework/phoenix/statuses/0f3472ca34adb30815f5a1891a8471b05bf7a1aa"}}}}
{"actor":{"display_login":"josevalim"}}