Class: Jetski::Router::Host::Crud
- Defined in:
- lib/jetski/router/host/crud.rb
Instance Attribute Summary collapse
-
#custom_route_options ⇒ Object
readonly
Responsible for hosting auto crud routes.
-
#handle_controller_render ⇒ Object
Returns the value of attribute handle_controller_render.
Attributes inherited from Base
#action_name, #all_server_options, #controller_class, #controller_classname, #controller_file_name, #controller_name, #controller_path, #errors, #req, #request_method, #res, #served_url, #server
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(server, controller_routes, **server_options) ⇒ Crud
constructor
A new instance of Crud.
Constructor Details
#initialize(server, controller_routes, **server_options) ⇒ Crud
Returns a new instance of Crud.
8 9 10 11 12 |
# File 'lib/jetski/router/host/crud.rb', line 8 def initialize(server, controller_routes, **) [:url] = [:controller_path] super(server, **) @handle_controller_render = true end |
Instance Attribute Details
#custom_route_options ⇒ Object (readonly)
Responsible for hosting auto crud routes
6 7 8 |
# File 'lib/jetski/router/host/crud.rb', line 6 def end |
#handle_controller_render ⇒ Object
Returns the value of attribute handle_controller_render.
7 8 9 |
# File 'lib/jetski/router/host/crud.rb', line 7 def handle_controller_render @handle_controller_render end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/jetski/router/host/crud.rb', line 14 def call super do = .dup.except(:action_name, :method) determine_action_from_url if handle_controller_render @controller_host = Jetski::Router::Host::Controller.new(server, **) @controller_host.res = res @controller_host.req = req @controller_host.fetch_controller_class @controller_host.call_controller end end end |