Sha256: 45979c6ae19e121370f14740c2980e0b0768beece2a11d3a86770016f7fc03b0

Contents?: true

Size: 396 Bytes

Versions: 5

Compression:

Stored size: 396 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

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
has_enum-0.7.3 spec/test_model.rb
has_enum-0.7.2.1 spec/test_model.rb
has_enum-0.7.2 spec/test_model.rb
has_enum-0.7.1 spec/test_model.rb
has_enum-0.7.0 spec/test_model.rb