Class: Backend::TranslationForm
- Inherits:
-
Udongo::Form
- Object
- Udongo::Form
- Backend::TranslationForm
- Defined in:
- app/forms/backend/translation_form.rb
Direct Known Subclasses
EmailTemplateTranslationForm, FormFieldTranslationForm, FormTranslationForm, NavigationItemTranslationForm, SnippetTranslationForm
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#translation ⇒ Object
readonly
Returns the value of attribute translation.
Instance Method Summary collapse
-
#initialize(model, translation) ⇒ TranslationForm
constructor
A new instance of TranslationForm.
- #persisted? ⇒ Boolean
Methods inherited from Udongo::Form
#init_attribute_values, #init_object_values, #save, #save!
Constructor Details
#initialize(model, translation) ⇒ TranslationForm
Returns a new instance of TranslationForm.
5 6 7 8 9 10 |
# File 'app/forms/backend/translation_form.rb', line 5 def initialize(model, translation) @model = model @translation = translation init_attribute_values(@translation) end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
2 3 4 |
# File 'app/forms/backend/translation_form.rb', line 2 def model @model end |
#translation ⇒ Object (readonly)
Returns the value of attribute translation.
2 3 4 |
# File 'app/forms/backend/translation_form.rb', line 2 def translation @translation end |
Instance Method Details
#persisted? ⇒ Boolean
12 13 14 |
# File 'app/forms/backend/translation_form.rb', line 12 def persisted? true end |