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-1.0.31 app/models/marty/posting_type.rb
marty-1.0.30 app/models/marty/posting_type.rb
marty-1.0.29 app/models/marty/posting_type.rb
marty-1.0.28 app/models/marty/posting_type.rb
marty-1.0.27 app/models/marty/posting_type.rb
marty-1.0.26 app/models/marty/posting_type.rb
marty-1.0.25 app/models/marty/posting_type.rb
marty-1.0.24 app/models/marty/posting_type.rb
marty-1.0.23 app/models/marty/posting_type.rb
marty-1.0.22 app/models/marty/posting_type.rb
marty-1.0.20 app/models/marty/posting_type.rb
marty-1.0.19 app/models/marty/posting_type.rb
marty-1.0.18 app/models/marty/posting_type.rb
marty-1.0.17 app/models/marty/posting_type.rb
marty-1.0.15 app/models/marty/posting_type.rb
marty-1.0.14 app/models/marty/posting_type.rb
marty-1.0.13 app/models/marty/posting_type.rb
marty-1.0.12 app/models/marty/posting_type.rb
marty-1.0.11 app/models/marty/posting_type.rb
marty-1.0.10 app/models/marty/posting_type.rb