ja_resource v0.3.1 JaResource.Model behaviour
Provides the model/0
callback used to customize the resource served.
This behaviour is used by all JaResource actions.
Summary
Functions
Callbacks
Specs
model :: module
Must return the module implementing Ecto.Schema
to be represented.
Example:
def model, do: MyApp.Models.Post
Defaults to the name of the controller, for example the controller
MyApp.V1.PostController
would serve the MyApp.Post
model.
Used by the default implementations for handle_create/2
, handle_update/3
,
and records/1
.