Class: DummyFormObject
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- DummyFormObject
- Defined in:
- app/models/dummy_form_object.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.human_attribute_name(attribute) ⇒ Object
9 10 11 |
# File 'app/models/dummy_form_object.rb', line 9 def self.human_attribute_name(attribute) attribute.to_s.titleize end |
.model_name ⇒ Object
2 3 4 5 6 7 |
# File 'app/models/dummy_form_object.rb', line 2 def self.model_name OpenStruct.new({ to_s: "Test Dummy", param_key: "test_dummy" }) end |
Instance Method Details
#errors ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/models/dummy_form_object.rb', line 13 def errors if self.has_errors HashWithIndifferentAccess.new(["has an error"]) else HashWithIndifferentAccess.new([]) end end |