Sha256: d0f24b434b0e6e73f4288eb5675028041ee265e833bccf9c24c618f389b8a803

Contents?: true

Size: 272 Bytes

Versions: 97

Compression:

Stored size: 272 Bytes

Contents

class Marty::PostingType < Marty::Base
  extend Marty::Enum

  validates_presence_of :name
  validates_uniqueness_of :name

  # NOTE: lookup fn for backward compat -- to index enums, use []
  delorean_fn :lookup, sig: 1 do
    |name|
    self.find_by_name(name)
  end
end

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
marty-2.0.0 app/models/marty/posting_type.rb
marty-1.2.9 app/models/marty/posting_type.rb
marty-1.2.8 app/models/marty/posting_type.rb
marty-1.2.7 app/models/marty/posting_type.rb
marty-1.2.6 app/models/marty/posting_type.rb
marty-1.2.5 app/models/marty/posting_type.rb
marty-1.2.4 app/models/marty/posting_type.rb
marty-1.2.3 app/models/marty/posting_type.rb
marty-1.2.2 app/models/marty/posting_type.rb
marty-1.2.1 app/models/marty/posting_type.rb
marty-1.2.0 app/models/marty/posting_type.rb
marty-1.1.9 app/models/marty/posting_type.rb
marty-1.1.8 app/models/marty/posting_type.rb
marty-1.1.7 app/models/marty/posting_type.rb
marty-1.1.6 app/models/marty/posting_type.rb
marty-1.1.5 app/models/marty/posting_type.rb
marty-1.1.4 app/models/marty/posting_type.rb
marty-1.1.3 app/models/marty/posting_type.rb
marty-1.1.2 app/models/marty/posting_type.rb
marty-1.1.1 app/models/marty/posting_type.rb