<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="26748" data-post-id="26748">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Hex-Core-Team" data-username="wojtekmach" data-post="82" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>perhaps you somehow looked at outdated code, but we have Hexpm.Web.Plugs defined in lib/hexpm/web/plugs.ex [1] and so the module name perfectly matches the filename.</p>
</blockquote>
</aside>
<p>Yes, that is exactly what I pointed out. What makes <code>Plugs</code> privileged so it doesn’t follow this new, odd structure (base namespace module defined in the folder for the namespace)? <code>plugs.ex</code> should, according to this new idea, be placed in <code>plugs/</code>.</p>
<p>I was pointing out that it’s exactly where it should be, but not where this new convention says it should be.</p>
<p>This is assuming I haven’t misunderstood the new convention to only apply to <code>lib/*</code> directories, in which case it’s actually even worse, as it’s not even internally consistent.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26748" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/84">Post #83</a>
	                </div>
	            </div>
              <div id="likers-container-26748" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26748"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #83"></div>
  </section>
</div>
    <div class="postbit" id="26751" data-post-id="26751">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="wojtekmach" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/120/999_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  wojtekmach
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Hex Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>OK, I see what you mean, I didn’t make the connection that plugs.ex could indeed be in lib/hexpm/web/plugs/, that’s a good point. It does make sense to me to move it there, I’d also like to give this module a more meaningful name, but nothing pops up yet.</p>
<blockquote>
<p>I was pointing out that it’s exactly where it should be, but not where this new convention says it should be.</p>
</blockquote>
<p>As was mentioned in this topic a couple of times (e.g. [1] [2]), Elixir doesn’t care where you place your files. If you don’t like the new structure nobody forces you to use it. I’d say, follow this convention as much or as little as you want.</p>
<p>To give a concrete example from this refactoring effort, I particularly like how e.g. <code>Hexpm.CDN*</code> [3] modules are currently placed. Note this context is a bit different from e.g. Accounts context (which uses Repo, Schemas etc), but similar in a way that it represents a slice of the application. This set of modules is totally independent of Hex.pm, it could easily be a separate package, and so I quite like that all files are in the same directory. Does it break conventions in file structures compared to projects like Ecto, Poison etc? Yes. Does it make it easier <em>for me</em> to navigate Hex.pm project? Yes!</p>
<p>[1] <a href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/44" class="inline-onebox" rel="nofollow">Phoenix v1.3.0-rc.0 released - #44 by josevalim</a><br>
[2] <a href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/45" class="inline-onebox" rel="nofollow">Phoenix v1.3.0-rc.0 released - #45 by rafal-radziszewski</a><br>
[3] <a href="https://github.com/hexpm/hexpm/tree/master/lib/hexpm/cdn" class="inline-onebox" rel="noopener nofollow ugc">hexpm/lib/hexpm/cdn at main · hexpm/hexpm · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26751" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/85">Post #84</a>
	                </div>
	            </div>
              <div id="likers-container-26751" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26751"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #84"></div>
  </section>
</div>
    <div class="postbit" id="26753" data-post-id="26753">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="gon782" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  gon782
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Hex-Core-Team" data-username="wojtekmach" data-post="85" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/wojtekmach/48/999_2.png" class="avatar"> wojtekmach:</div>
<blockquote>
<p>I’d say, follow this convention as much or as little as you want.</p>
</blockquote>
</aside>
<p>I see your point and I’ll have it in mind. I feel awkward about it now, though, because it’ll still feel like I’m now going against convention. The community is likely to adapt one or the other and I usually need good reasons to break convention.</p>
<p>Anyway, thanks for the rationale and example. It’s something to keep in mind.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26753" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/86">Post #85</a>
	                </div>
	            </div>
              <div id="likers-container-26753" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26753"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #85"></div>
  </section>
</div>
    <div class="postbit" id="26773" data-post-id="26773">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shankardevy" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shankardevy/120/1085_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shankardevy
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Phoenix-Core-Team" data-username="chrismccord" data-post="64" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/chrismccord/48/24233_2.png" class="avatar"> chrismccord:</div>
<blockquote>
<p>Changests can be for any source, and I usually go the other way and collocate them close the user input or changes I am modeling. That said, there is nothing stopping you from collocating changeset functions with the schema.</p>
</blockquote>
</aside>
<p><a class="mention" href="/u/chrismccord" rel="nofollow">@chrismccord</a> the way generators now put the changeset functions into context file and not in the schema itself breaks the contract expected by Ecto’s <code>cast_assoc</code>. Since <code>cast_assoc</code> is almost always expected in any most changeset, having the changesets in context file requires users to define additional changesets in schema file just for the association or use the <code>with</code> option in <code>cast_assoc</code>. I think moving the changeset functions to schema can reduce the noise in context file and at the same time relive developers from defining changesets for associations.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26773" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/87">Post #86</a>
	                </div>
	            </div>
              <div id="likers-container-26773" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26773"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #86"></div>
  </section>
</div>
    <div class="postbit" id="26774" data-post-id="26774">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>That’s a very good point we have not considered before. Can you please open up an issue so we are sure to discuss it?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26774" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/88">Post #87</a>
	                </div>
	            </div>
              <div id="likers-container-26774" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26774"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #87"></div>
  </section>
</div>
    <div class="postbit" id="26778" data-post-id="26778">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="michalmuskala" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/michalmuskala/120/20288_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  michalmuskala
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>To be honest, I personally consider <code>cast_assoc</code> defaulting to <code>Schema.changeset/2</code> a mistake - the <code>with</code> option should be obligatory.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26778" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/89">Post #88</a>
	                </div>
	            </div>
              <div id="likers-container-26778" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26778"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #88"></div>
  </section>
</div>
    <div class="postbit" id="26788" data-post-id="26788">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shankardevy" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/shankardevy/120/1085_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shankardevy
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Opened an issue here: <a href="https://github.com/phoenixframework/phoenix/issues/2180" class="inline-onebox" rel="noopener nofollow ugc">Consider moving the changeset functions into schema module · Issue #2180 · phoenixframework/phoenix · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26788" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/90">Post #89</a>
	                </div>
	            </div>
              <div id="likers-container-26788" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26788"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #89"></div>
  </section>
</div>
    <div class="postbit" id="26993" data-post-id="26993">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="robgolding" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/robgolding/120/4563_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  robgolding
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m interested in this topic as I’m developing a Phoenix 1.3 application as a learning tool to get comfortable with the conventions around contexts and API boundaries. Something I’ve noticed is that embedded schemas don’t <em>quite</em> fit into the pattern of code that’s generated by Phoenix. For example, <code>create_&lt;object&gt;</code> doesn’t necessarily make sense for an embedded changeset (say, to validate fields for a login form).</p>
<p>This is also related to the topic in <a href="https://forum.elixirforum.com/t/clarity-needed-on-phoenix-1-3-contexts-and-schema-in-controllers/4097/9" rel="nofollow">https://forum.elixirforum.com/t/clarity-needed-on-phoenix-1-3-contexts-and-schema-in-controllers/4097/7</a>. Since it’s often required to generate an empty changeset, it would be good to have a function for that purpose automatically generated on the context module. <a class="mention" href="/u/shankardevy" rel="nofollow">@shankardevy</a> suggests <code>build_&lt;object&gt;/1</code>, which I find sensible.</p>
<p>Furthermore, I would agree that the private functions to generate changesets (<code>&lt;object&gt;_changeset/2</code>) may be better positioned on the schemas themselves – as this is most likely where developers will be implementing things like required fields, validation etc.</p>
<p>Overall, though, I think the changes are really great - so thank you for all your hard work!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="26993" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/91">Post #90</a>
	                </div>
	            </div>
              <div id="likers-container-26993" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="26993"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #90"></div>
  </section>
</div>
    <div class="postbit" id="27001" data-post-id="27001">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="chrismccord" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/chrismccord/120/24233_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  chrismccord
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="robgolding" data-post="91" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/robgolding/48/4563_2.png" class="avatar"> robgolding:</div>
<blockquote>
<p>For example, create_&lt;object&gt; doesn’t necessarily make sense for an embedded changeset (say, to validate fields for a login form)</p>
</blockquote>
</aside>
<p>Until we can implement strong AI (Phoenix 4.0? :-P), we won’t be able to determine the perfect name for your functions. I agree that crud functions names aren’t always what you want, and I definitely recommend picking other function names that better describe your intent; however, you very well can model a login form from an embedded schema, then persist some other table-backed schema to the DB after validation. In that case, <code>create_user</code> still works, but I would prefer something like <code>Accounts.register_user</code>. <code>create/update/delete/list/get</code> are starting points, but by all means use naming that better describes the intent of your features.</p>
<aside class="quote no-group" data-username="robgolding" data-post="91" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/robgolding/48/4563_2.png" class="avatar"> robgolding:</div>
<blockquote>
<p>Since it’s often required to generate an empty changeset, it would be good to have a function for that purpose automatically generated on the context module. <a class="mention" href="/u/shankardevy" rel="nofollow">@shankardevy</a> suggests build_&lt;object&gt;/1, which I find sensible.</p>
</blockquote>
</aside>
<p>I’m still unsure on this one since <code>change_&lt;type&gt;</code> already serves the purpose of generating an empty changeset. The only way <code>build_whatever</code> would make sense is if it returned a <code>%Whatever{}</code> struct, in which case it wouldn’t be necessary.</p>
<aside class="quote no-group" data-username="robgolding" data-post="91" data-topic="3947">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/robgolding/48/4563_2.png" class="avatar"> robgolding:</div>
<blockquote>
<p>Overall, though, I think the changes are really great - so thank you for all your hard work!</p>
</blockquote>
</aside>
<p>Thanks! Glad to hear it!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="27001" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/92">Post #91</a>
	                </div>
	            </div>
              <div id="likers-container-27001" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="27001"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #91"></div>
  </section>
</div>
    <div class="postbit" id="27065" data-post-id="27065">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="christos" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/christos/120/4425_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  christos
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve been using the new <code>phx.gen</code> generators and I came across a use case that left me wondering if maybe I am not grokking the new context based directory layout correctly.</p>
<p>I want to have a <code>User</code> schema in two contexts, <code>Account</code> and <code>Blog</code>, so I run:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">mix phx.gen.html Accounts User users email:string
mix phx.gen.html Blog User users name:string account_id:references:accounts_users
</code></pre>
<p>The second generator invocation tries to overwrite the <code>web_app</code> resource files created by the first generator invocation:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">* creating lib/phx_sandbox/web/controllers/user_controller.ex
lib/phx_sandbox/web/controllers/user_controller.ex already exists, overwrite? [Yn] 
</code></pre>
<p>Is that intentional?</p>
<p>Should <code>web_app</code> resources also be name spaced, according to the context? (I must admit, that feels odd)</p>
<p>Or should there be a clean separation between context schemas and <code>web_app</code> resources, so that the above generator invocation should not be allowed, requiring instead explicitly linking a resource to a context schema?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">mix phx.gen.html Account User users email:string
# =&gt; Raises exception suggesting you do the following instead

mix phx.gen.context Account User users email:string
mix phx.gen.context Blog User users name:string account_id:references:accounts_users

# Creates CRUD scaffold linked to each contexts User
mix phx.gen.html Account User SignupController
mix phx.gen.html Blog User BlogUserController
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="27065" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/phoenix-v1-3-0-rc-0-released/3947/93">Post #92</a>
	                </div>
	            </div>
              <div id="likers-container-27065" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="27065"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #92"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/3947/load_more?page=10">Load more posts (6 remaining)</a>
</div></template></turbo-stream>