Class: Views::PrintHosts::Form

Inherits:
Base
  • Object
show all
Includes:
Phlex::Rails::Helpers::FormWith
Defined in:
app/views/print_hosts/form.rb

Direct Known Subclasses

Edit, New

Instance Method Summary collapse

Constructor Details

#initialize(print_host:) ⇒ Form

Returns a new instance of Form.



6
7
8
# File 'app/views/print_hosts/form.rb', line 6

def initialize(print_host:)
  @print_host = print_host
end

Instance Method Details

#view_template ⇒ Object



10
11
12
13
# File 'app/views/print_hosts/form.rb', line 10

def view_template
  # Using an ERB form otherwise coccooned doesn't work and we might want it later
  render partial("form", print_host: @print_host)
end