Created
May 1, 2012 00:59
-
-
Save hmans/2564075 to your computer and use it in GitHub Desktop.
Work in progress...
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
require 'freddie' | |
class Event | |
include Mongoid::Document | |
# ... | |
end | |
class App < Freddie::App | |
resource :events do | |
permit do |user| | |
can :read | |
can :create if user.admin? | |
can :update, :destroy, :user_id => user.id | |
end | |
end | |
root :events | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment