Class: Maquina::Application::New

Inherits:
Phlex::HTML
  • Object
show all
Includes:
Maquina::ApplicationView
Defined in:
app/views/maquina/application/new.rb

Instance Method Summary collapse

Methods included from Maquina::ApplicationView

#attribute_human_name, #button_to, #image_tag, #link_to, #model_human_name, #svg_icon

Constructor Details

#initialize(resource:, modal: false) ⇒ New

Returns a new instance of New.



8
9
10
11
# File 'app/views/maquina/application/new.rb', line 8

def initialize(resource:, modal: false)
  @resource = resource
  @modal = modal
end

Instance Method Details

#view_templateObject



13
14
15
# File 'app/views/maquina/application/new.rb', line 13

def view_template
  render Maquina::Application::Form.new(resource: @resource, modal: @modal)
end