Class: RailsDevtools::Routes::RouteDetails::RoutePathInput
- Inherits:
-
Components::ApplicationComponent
- Object
- Phlex::HTML
- Components::ApplicationComponent
- RailsDevtools::Routes::RouteDetails::RoutePathInput
- Defined in:
- app/views/rails_devtools/routes/route_details/route_path_input.rb
Instance Method Summary collapse
-
#initialize(route:, prefix: "", suffix: "path") ⇒ RoutePathInput
constructor
A new instance of RoutePathInput.
- #view_template ⇒ Object
Methods inherited from Components::ApplicationComponent
Constructor Details
#initialize(route:, prefix: "", suffix: "path") ⇒ RoutePathInput
Returns a new instance of RoutePathInput.
6 7 8 9 10 |
# File 'app/views/rails_devtools/routes/route_details/route_path_input.rb', line 6 def initialize(route:, prefix: "", suffix: "path") @route = route @prefix = prefix @suffix = suffix end |
Instance Method Details
#view_template ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/views/rails_devtools/routes/route_details/route_path_input.rb', line 12 def view_template turbo_frame_tag("route_path_input") do div( class: "join w-full", data_controller: "clipboard", data_clipboard_success_content_value: "Copied!" ) do input( value: input_value, class: "input input-bordered input-primary input-sm w-full join-item", data_clipboard_target: "source" ) ( class: "btn btn-primary btn-outline btn-sm join-item", data_action: "clipboard#copy", data_clipboard_target: "button" ) { "Copy" } end end end |