29 Feb '16, 10am

An Introduction to APIs with Phoenix - Ruby Phoenix, Rails

# web/controllers/todo_controller.ex defmodule TodoApi.TodoController do use TodoApi.Web, :controller alias TodoApi.Todo plug :scrub_params, "todo" when action in [:create, :update] def index(conn, _params) do todos = Repo.all(Todo) render(conn, "index.json", todos: todos) end def create(conn, %{"todo" => todo_params}) do changeset = Todo.changeset(%Todo{}, todo_params) case Repo.insert(changeset) do {:ok, todo} -> conn |> put_status(:created) |> put_resp_header("location", todo_path(conn, :show, todo)) |> render("show.json", todo: todo) {:error, changeset} -> conn |> put_status(:unprocessable_entity) |> render(TodoApi.ChangesetView, "error.json", changeset: changeset) end end def show(conn, %{"id" => id}) do todo = Repo.get!(Todo, id) render(conn, "show.json", todo: todo) end def update(conn, %{"id" => id, "todo" => todo_params}) do todo = Repo.get!(Todo, id) changeset = ...

Full article: http://www.webcodegeeks.com/ruby/introduction-apis-phoenix/

Tweets

Comparing Rails and Phoenix: Part II - Ruby Pho...

webcodegeeks.com 26 Feb '16, 10am

You may have seen the article that talks about how the Phoenix team achieved two million connections on a single (albeit v...

Comparing Rails and Phoenix: Part I - Ruby Phoenix, Rails

Comparing Rails and Phoenix: Part I - Ruby Phoe...

webcodegeeks.com 24 Feb '16, 10am

One of the things they mentioned on the show was that they were tired of the comparison being made between Rails and Phoen...

Phoenix Solar stärkt Engagement in der Region A...

solarserver.de 29 Feb '16, 8am

Die Phoenix Solar AG (Sulzemoos), ein im Prime Standard der Frankfurter Wertpapierbörse notiertes, international tätiges P...

What Makes Ruby On Rails Special?

What Makes Ruby On Rails Special?

hostgator.com 29 Feb '16, 10am

Ruby on Rails (ROR) was first released on December 12, 2005. Since then, it has been a hot commodity for developers and us...

When You’re LAST To Start the Phoenix Marathon ...

runeatrepeat.com 28 Feb '16, 6pm

The Phoenix Marathon is a point to point course so you have to park near the finish line and take a bus to the start. The ...

Come learn how to code #ruby with @gdidenver at...

meetup.com 01 Mar '16, 7pm

Ready to start programming? Want to learn the basics of a language that you can eventually use to build web apps? Then you...

The Phoenix Suns Colorway of The Nike Air Max CB34 Can Be Yours Tomorrow

The Phoenix Suns Colorway of The Nike Air Max C...

kicksonfire.com 25 Feb '16, 3am

Releasing at select Nike retailers tomorrow is the Nike Air Max CB34 in the Phoenix Suns Home colorway. The shoe features ...

Experienced Ruby on Rails Developer — FullStack...

authjo.bz 26 Feb '16, 5pm

Experienced Ruby on Rails Developer FullStack is looking for an experienced, passionate, and talented Ruby on Rails develo...

Phoenix Solar to build 65MW Nevada project

Phoenix Solar to build 65MW Nevada project

pv-tech.org 22 Feb '16, 11am

Phoenix Solar is to build a 65MW PV project in Nevada for Invenergy. Image: Phoenix Solar. PV integrator Phoenix Solar is ...

#ruby

#ruby

ruby-performance-book.com 25 Feb '16, 9pm

Is Ruby 2.3 Faster? No Significant Improvement In Rails Applications Posted by Alexander Dymo on February 25, 2016 Ruby 2....