Class: Forms::Plain::Submit

Inherits:
Submit
  • Object
show all
Defined in:
lib/forms/plain/submit.rb

Overview

Bare

Instance Method Summary collapse

Instance Method Details

#view_template(&block) ⇒ Object



8
9
10
11
12
# File 'lib/forms/plain/submit.rb', line 8

def view_template(&block)
  attrs = { type: "submit", **@attributes }
  attrs[:disabled] = true if @disabled
  button(**attrs) { block ? yield : button_text }
end