Sha256: 2cd318114c2f3eb67c188b8cbc9c53b8663fdc291c7a4cdc81ef8dfe3d9eb9c5

Contents?: true

Size: 500 Bytes

Versions: 4

Compression:

Stored size: 500 Bytes

Contents

class TestModel < ActiveRecord::Base

  has_enum :category,           %w[stuff things misc],      :presence       => {:on => :update}

  has_enum :color,              %w[red green blue],         :scopes         => true

  has_enum :size,                                           :query_methods  => false

  has_enum ["status", :state],  [:pending, :failed, :done], :presence       => true

  has_enum :speed,              %w[slow normal fast],       :multiple       => true, :presence => true

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
has_enum-0.8.2 spec/test_model.rb
has_enum-0.8.1.1 spec/test_model.rb
has_enum-0.8.1 spec/test_model.rb
has_enum-0.8.0 spec/test_model.rb