Sha256: f107c83ba191c6a9f94a87884ed107b1df75db97edda2c6796e628b63f9ccba7

Contents?: true

Size: 211 Bytes

Versions: 2

Compression:

Stored size: 211 Bytes

Contents

class User < ActiveRecord::Base
  belongs_to_enum :role, [:normal, :admin, :superadmin, :suspended]
end

class Vehicle < ActiveRecord::Base
  belongs_to_enum :make, {:honda => 10, :toyota => 20, :ford => 30}
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
belongs_to_enum-0.2 spec/test_classes.rb
belongs_to_enum-0.1 spec/test_classes.rb