Class: Forms::Plain::Radio

Inherits:
Radio
  • Object
show all
Defined in:
lib/forms/plain/radio.rb

Overview

Bare radio input.

Instance Method Summary collapse

Instance Method Details

#view_templateObject



7
8
9
10
11
# File 'lib/forms/plain/radio.rb', line 7

def view_template
  attrs = unstyled_attributes
  attrs[:checked] = true if @checked
  input(type: "radio", value: @value, **attrs)
end