Sha256: 66f29c7f2d187850545e62c85a5b003d3b2f99bc7809926f48d1fb1e1f671e84

Contents?: true

Size: 459 Bytes

Versions: 2

Compression:

Stored size: 459 Bytes

Contents

class DummyFormObject < OpenStruct
  def self.model_name
    OpenStruct.new({
      to_s: "Test Dummy",
      param_key: "test_dummy"
    })
  end

  def self.human_attribute_name(attribute)
    attribute.to_s.titleize
  end

  def errors
    if self.has_errors
      HashWithIndifferentAccess.new(["has an error"])
    else
      HashWithIndifferentAccess.new([])
    end
  end
end

class NameDummyFormObject < DummyFormObject
  SUFFIXES = ["MR", "MRS"]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
undercase-0.2.57 app/models/dummy_form_object.rb
undercase-0.2.29 app/models/dummy_form_object.rb