Defining application models with Cream

1 view
Skip to first unread message

Kenny Meyer

unread,
Jul 8, 2011, 9:57:33 PM7/8/11
to rails...@googlegroups.com
Hi all,

in my web application I will need these user types: Contestant, Judge, Administrator.

What is the best way to represent them in a model or models in Cream?

Should I create a model for each user type, or is it enough to create a single User model and manage them with roles?

Kristian Mandrup

unread,
Jul 9, 2011, 10:46:51 AM7/9/11
to Cream
It all depends on your requirements. The User Types should be
considered User Accounts. If you have a case where you have different
system requirements for each type of user, such as different data,
registration flow, registration page or similar, then have multiple
accounts. For simpler cases you can handle it with roles.

I am working with @stanislaw on a new project called "tango" which is
meant as a replacement for Cream. I also have a project called
"troles" in the works, which is a new and better roles solution.

Kristian

Kenny Meyer

unread,
Jul 9, 2011, 11:46:55 AM7/9/11
to rails...@googlegroups.com
> It all depends on your requirements. The User Types should be
> considered User Accounts. If you have a case where you have different
> system requirements for each type of user, such as different data,
> registration flow, registration page or similar, then have multiple
> accounts. For simpler cases you can handle it with roles.
I figured out, that my application didn't require so fine-grained
authorization as in Cream, so I just went with CanCan after digging
into it.

> I am working with @stanislaw on a new project called "tango" which is
> meant as a replacement for Cream. I also have a project called
> "troles" in the works, which is a new and better roles solution

Troles really looks much better and easier to use. You should make a
big fat disclaimer on the GitHub project index referring to that
project.

Thanks a lot for your answer.

Kenny

Reply all
Reply to author
Forward
0 new messages