Class: Effective::TableRows::Boolean

Inherits:
Effective::TableRow show all
Defined in:
app/models/effective/table_rows/boolean.rb

Instance Attribute Summary

Attributes inherited from Effective::TableRow

#builder, #name, #options, #template

Instance Method Summary collapse

Methods inherited from Effective::TableRow

#initialize, #label, #to_html, #value

Constructor Details

This class inherits a constructor from Effective::TableRow

Instance Method Details

#content ⇒ Object



7
8
9
10
11
12
13
# File 'app/models/effective/table_rows/boolean.rb', line 7

def content
  if value
    template.badge('YES')
  else
    template.badge('NO', class: 'badge badge-light')
  end
end