Skip to content

Instantly share code, notes, and snippets.

@spiegela
Created December 12, 2013 03:39
Show Gist options
  • Select an option

  • Save spiegela/7922851 to your computer and use it in GitHub Desktop.

Select an option

Save spiegela/7922851 to your computer and use it in GitHub Desktop.
defmodule Dynamo.Ecto.Resource do
def object
conn.fetch :params
id = conn.params[:id]
query = # Ecto DB Query creation
object = Ecto.execute query
end
end
defmodule Fruit do
use Dynamo.Ecto.Resource
use Dynamo.JSON.Presentation
defp to_json do
object
end
defp from_json do
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment