active_enum icon indicating copy to clipboard operation
active_enum copied to clipboard

Symbol IDs

Open gsmetal opened this issue 11 years ago • 0 comments

Finally, I've found time to deal with this.

This PR based on https://github.com/adzap/active_enum/pull/28

I completely implemented logic: if ids are symbols, names are not symbols. Added some restrictions of using mixed id types in one enum and added tests.

class Sex < ActiveEnum::Base
  value :id => :m, :name => 'Male'
  value :id => :f, :name => 'Female'
end

gsmetal avatar Feb 28 '14 15:02 gsmetal