Phoenix error updating dating thai men

Rated 3.86/5 based on 559 customer reviews

The insert function returns a tuple that indicates success or failure.

We’d like to modify the application to return a 404 in the case on a non-existent record. When we perform any operation in the controller, we are just creating a pipeline that modifies the conn structure and returns a modified version of that conn.

In the fail case, an Elixir map is returned with a list of error strings.

If you now use a REST client to perform put operations, you will see that valid data is properly written.

We also apply a constraint that will guarantee the the email address is unique.

We are doing no other input validation at this time, but it’s quite easy to add constraints similar to those on a Rails model.

Leave a Reply