Class: Maquina::AcceptInvitations::NewView

Inherits:
Phlex::HTML
  • Object
show all
Includes:
Maquina::ApplicationView, Phlex::Rails::Helpers::FormWith, Phlex::Rails::Helpers::HiddenField, Phlex::Rails::Helpers::Routes
Defined in:
app/views/maquina/accept_invitations/new_view.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:) ⇒ NewView

Returns a new instance of NewView.



11
12
13
# File 'app/views/maquina/accept_invitations/new_view.rb', line 11

def initialize(resource:)
  @resource = resource
end

Instance Method Details

#view_templateObject



15
16
17
18
19
20
21
# File 'app/views/maquina/accept_invitations/new_view.rb', line 15

def view_template
  div(class: "mt-8 sm:mx-auto sm:w-full sm:max-w-md") do
    div(class: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10") do
      @resource.new_record? ? invalid_invitation : build_form
    end
  end
end