Class: Flexite::BoolEntry

Inherits:
Entry
  • Object
show all
Defined in:
app/models/flexite/bool_entry.rb

Instance Method Summary collapse

Methods inherited from Entry

#dig, form, service, #t_node

Methods included from WithHistory

#restore

Instance Method Details

#formObject



7
8
9
# File 'app/models/flexite/bool_entry.rb', line 7

def form
  Entry::Form.new(attributes.merge(value: self[:value].to_i))
end

#valueObject



3
4
5
# File 'app/models/flexite/bool_entry.rb', line 3

def value
  self[:value].to_i == 1 ? true : false
end