New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move generators to Ecto 2.0 #1649

Merged
merged 6 commits into from Apr 18, 2016
Prev

Import all of Ecto.Query by default

  • Loading branch information...
josevalim committed Apr 18, 2016
commit 814cbdfcaa8ca33882e6bd702ed7b010a65d5a2b
@@ -20,7 +20,7 @@ defmodule <%= application_module %>.ModelCase do
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
import Ecto.Query
import <%= application_module %>.ModelCase
end
end
@@ -23,7 +23,7 @@ defmodule <%= application_module %>.ChannelCase do
alias <%= application_module %>.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
import Ecto.Query
<% end %>
# The default endpoint for testing
@@ -23,7 +23,7 @@ defmodule <%= application_module %>.ConnCase do
alias <%= application_module %>.Repo
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]
import Ecto.Query
<% end %>
import <%= application_module %>.Router.Helpers
@@ -22,7 +22,7 @@ defmodule <%= application_module %>.Web do
import Ecto
import Ecto.Changeset
import Ecto.Query, only: [from: 1, from: 2]<%= if adapter_config[:binary_id] do %>
import Ecto.Query<%= if adapter_config[:binary_id] do %>
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id<% end %>
@@ -41,7 +41,7 @@ defmodule <%= application_module %>.Web do
<%= if ecto do %>
alias <%= application_module %>.Repo
import Ecto
import Ecto.Query, only: [from: 1, from: 2]
import Ecto.Query
<% end %>
import <%= application_module %>.Router.Helpers
import <%= application_module %>.Gettext
@@ -76,7 +76,7 @@ defmodule <%= application_module %>.Web do
alias <%= application_module %>.Repo
import Ecto
import Ecto.Query, only: [from: 1, from: 2]<% end %>
import Ecto.Query<% end %>
import <%= application_module %>.Gettext
end
end
ProTip! Use n and p to navigate between commits in a pull request.