Created
December 12, 2013 03:39
-
-
Save spiegela/7922851 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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