Class: Flexite::Entry::Form

Inherits:
BaseForm show all
Defined in:
app/forms/flexite/entry/form.rb

Direct Known Subclasses

ArrayForm

Instance Attribute Summary collapse

Attributes inherited from BaseForm

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseForm

#initialize, #new_record?, #persisted?

Constructor Details

This class inherits a constructor from Flexite::BaseForm

Instance Attribute Details

#idObject

Returns the value of attribute id.



5
6
7
# File 'app/forms/flexite/entry/form.rb', line 5

def id
  @id
end

#parent_idObject

Returns the value of attribute parent_id.



5
6
7
# File 'app/forms/flexite/entry/form.rb', line 5

def parent_id
  @parent_id
end

#parent_typeObject

Returns the value of attribute parent_type.



5
6
7
# File 'app/forms/flexite/entry/form.rb', line 5

def parent_type
  @parent_type
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'app/forms/flexite/entry/form.rb', line 5

def type
  @type
end

#valueObject

Returns the value of attribute value.



5
6
7
# File 'app/forms/flexite/entry/form.rb', line 5

def value
  @value
end

Class Method Details

.model_nameObject



8
9
10
# File 'app/forms/flexite/entry/form.rb', line 8

def self.model_name
  Entry.model_name
end

Instance Method Details

#history_typeObject



16
17
18
# File 'app/forms/flexite/entry/form.rb', line 16

def history_type
  Entry.name.underscore
end

#view_typeObject



12
13
14
# File 'app/forms/flexite/entry/form.rb', line 12

def view_type
  type.demodulize.underscore
end

#with_history?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/forms/flexite/entry/form.rb', line 20

def with_history?
  persisted?
end