Class: Oversee::Resources::New
- Inherits:
-
Base
- Object
- Base
- Oversee::Resources::New
- Defined in:
- app/components/oversee/resources/new.rb
Instance Method Summary collapse
- #around_template ⇒ Object
-
#initialize(resource:, resource_class:, params:) ⇒ New
constructor
A new instance of New.
- #view_template ⇒ Object
Constructor Details
#initialize(resource:, resource_class:, params:) ⇒ New
Returns a new instance of New.
4 5 6 7 8 |
# File 'app/components/oversee/resources/new.rb', line 4 def initialize(resource:, resource_class:, params:) @resource = resource @resource_class = resource_class @params = params end |
Instance Method Details
#around_template ⇒ Object
10 11 12 |
# File 'app/components/oversee/resources/new.rb', line 10 def around_template render Oversee::Layout::Application.new { super } end |
#view_template ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/components/oversee/resources/new.rb', line 14 def view_template render Oversee::Dashboard::Header.new(title: @resource_class.to_s, subtitle: "Creating new record") hr(class: "my-4") render Oversee::Resources::Form.new(resource: @resource) end |