#1128 ✓resolved
bgentry

dm-types Flag api issue

Reported by bgentry | November 17th, 2009 @ 06:24 PM | in 1.0.0

To me it seems inconsistent and unintuitive that the Flag type will return a symbol when there is only one flag set, and return an array when there are two or more flags.

Example:
property :state, Flag[ :new, :urgent, :closed ], :default => :new

model.state will return :new in the default state.

If I set model.state = [:new, :urgent], then naturally it will return an array.

I would expect that this should return an array in all cases. Any other thoughts?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Referenced by

Pages