Skip to content

Instantly share code, notes, and snippets.

@mrkurt
Created July 29, 2008 18:00
Show Gist options
  • Save mrkurt/3135 to your computer and use it in GitHub Desktop.
Save mrkurt/3135 to your computer and use it in GitHub Desktop.
class User < Model
include CouchObject::Persistable
include Securable
with_attr_reader :username do
min_read_permission :guest
end
with_attr_reader :email, :password do
min_read_permission :owner
end
with_attr_reader :role do
min_read_permission :admin
end
def create_id
"user_#{username}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment