Skip to content

Commit

Permalink
Show context module file creation when using phx.gen (phoenixframewor…
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogi Patel authored and josevalim committed Mar 9, 2017
1 parent c8ff526 commit ff8af18
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/mix/tasks/phx.gen.context.ex
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,9 @@ defmodule Mix.Tasks.Phx.Gen.Context do
context
end

defp inject_schema_access(%Context{dir: dir, file: file} = context, paths, binding) do
defp inject_schema_access(%Context{file: file} = context, paths, binding) do
unless context.pre_existing? do
File.mkdir_p!(dir)
File.write!(file, Mix.Phoenix.eval_from(paths, "priv/templates/phx.gen.context/context.ex", binding))
Mix.Generator.create_file(file, Mix.Phoenix.eval_from(paths, "priv/templates/phx.gen.context/context.ex", binding))
end

schema_content = Mix.Phoenix.eval_from(paths, "priv/templates/phx.gen.context/schema_access.ex", binding)
Expand Down

0 comments on commit ff8af18

Please sign in to comment.