Class: Relay::Routes::Base
- Inherits:
-
Object
- Object
- Relay::Routes::Base
- Includes:
- Concerns::Attachment, Concerns::Context, Concerns::Roda, Concerns::View, Models
- Defined in:
- app/routes/base.rb
Direct Known Subclasses
MCP::Base, ClearAttachment, ListChat, ListContexts, ListControls, ListMCP, ListModels, ListProviders, ListTools, SignIn, ThemeStylesheet, UploadAttachment, Websocket
Instance Method Summary collapse
- #cache ⇒ Relay::InMemoryCache
- #htmx? ⇒ Boolean
-
#params ⇒ Hash
Returns a Hash or Hash-like object of request parameters.
-
#root ⇒ String
Returns the root path.
Methods included from Concerns::View
#cancellable?, #context_window, #format_cost, #format_name, #initials, #markdown, #status_bar, #theme, #theme_href
Methods included from Concerns::Roda
#initialize, #method_missing, #r, #respond_to_missing?
Methods included from Concerns::Context
#contexts, #ctx, #current_context, #default_context, #default_model, #llm, #llms, #mcps, #model, #models, #normalize_model, #provider, #sync_context!, #user, #valid_model?
Methods included from Concerns::Attachment
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Relay::Concerns::Roda
Instance Method Details
#cache ⇒ Relay::InMemoryCache
27 28 29 |
# File 'app/routes/base.rb', line 27 def cache Relay.cache end |
#htmx? ⇒ Boolean
31 32 33 |
# File 'app/routes/base.rb', line 31 def htmx? request.env["HTTP_HX_REQUEST"] == "true" end |
#params ⇒ Hash
Returns a Hash or Hash-like object of request parameters
21 22 23 |
# File 'app/routes/base.rb', line 21 def params request.params end |
#root ⇒ String
Returns the root path
14 15 16 |
# File 'app/routes/base.rb', line 14 def root @root ||= File.join __dir__, "..", ".." end |