Last active
August 29, 2015 14:05
-
-
Save didlix/aa2838143d89716fe795 to your computer and use it in GitHub Desktop.
an idea for a ruby forums dsl
This file contains 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
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