Skip to content

Instantly share code, notes, and snippets.

@didlix
Last active August 29, 2015 14:05
Show Gist options
  • Save didlix/aa2838143d89716fe795 to your computer and use it in GitHub Desktop.
Save didlix/aa2838143d89716fe795 to your computer and use it in GitHub Desktop.
an idea for a ruby forums dsl
class Admins do
include Users
include Forums::UserTemplate
def all
Users.admins.all.to_h
end
end
group :admin do
members Admins
end
group :members do
members ['jon', 'jane']
end
group :public do
members :anonymous
end
forum :gender_discussion do
title 'Gender Discussions'
description 'A forum on gender politics'
grant :members, :readwrite
grant :public, :readonly
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment