I'm new to Elixir so I'm probably doing something wrong, but I cant get registrations working.
I have tried a eex form and the ajax form but keep getting:
Request: POST /register ** (exit) an exception was raised: ** (ErlangError) erlang error: {:nocatch, "Unable to create user, invalid hash. Required params: email, password, username"}
But it seems like it should work?
[info] POST /register [debug] Processing by Addict.Controller.register/2 Parameters: %{"email" => "johndoe@me.com", "password" => "[FILTERED]", "username" => "johndoe"} Pipelines: []
This is my Schema:
schema "users" do
field :first_name, :string
field :last_name, :string
field :username, :string
field :email, :string
field :subdomain, :string
field :custom_domain, :string
field :hash, :string
field :recovery_hash, :string
has_many :posts, Agentport.Post
has_many :testimonials, Agentport.Testimonial
The only thing I can think of is that I had trouble installing addict due to conflicting requirements on ecto so I had to add {:ecto, "~> 1.0.0", override: true}, to get it to install. Could this be the issue?
I'm new to Elixir so I'm probably doing something wrong, but I cant get registrations working.
I have tried a eex form and the ajax form but keep getting:
Request: POST /register ** (exit) an exception was raised: ** (ErlangError) erlang error: {:nocatch, "Unable to create user, invalid hash. Required params: email, password, username"}
But it seems like it should work?
[info] POST /register [debug] Processing by Addict.Controller.register/2 Parameters: %{"email" => "johndoe@me.com", "password" => "[FILTERED]", "username" => "johndoe"} Pipelines: []
This is my Schema:
schema "users" do field :first_name, :string field :last_name, :string field :username, :string field :email, :string field :subdomain, :string field :custom_domain, :string field :hash, :string field :recovery_hash, :string has_many :posts, Agentport.Post has_many :testimonials, Agentport.Testimonial
end
@required_fields ~w(username email hash recovery_hash timestamps) @optional_fields ~w(first_name last_name, subdomain, custom_domain)
The only thing I can think of is that I had trouble installing addict due to conflicting requirements on ecto so I had to add
{:ecto, "~> 1.0.0", override: true},
to get it to install. Could this be the issue?