cpjk / canary

:hatching_chick: Elixir authorization and resource-loading library for Plug applications.
MIT License
474 stars 51 forks source link

Ability to specify name of resource id #22

Closed timoteus closed 8 years ago

timoteus commented 8 years ago

Instead of assuming resource id is named "id" this PR let's you override it and specify the name of the resource id while defaulting to "id" if none is specified.

Use it like so:

 plug :load_resource, model: User, id: "user_id", only: :show
cpjk commented 8 years ago

Just a few small comments! :smiley:

timoteus commented 8 years ago

:v:

I see you added Travis integration! Great!

cpjk commented 8 years ago

Beauty! Merged :ok_hand: