This uses the new part plugin to simplify and optimize render calls with locals. ```ruby render(:template, locals: {foo: 'bar'}) part(:template, foo: 'bar') ``` This simplifies a large number of calls in Clover, since rendering with locals is one of the most common method calls in the templates. The main advantage of this is simplicity, but the part method is also more optimized, and will be even more optimized when we upgrade to Ruby 3.4. Diff best reviewed with: ``` git diff -b --color-words --word-diff-regex='\\w+|[^[:space:]]' ```
9 lines
268 B
Plaintext
9 lines
268 B
Plaintext
<%== part(
|
|
"components/tabbar",
|
|
tabs: [
|
|
["Inference Endpoints", @project_data[:path] + "/inference-endpoint"],
|
|
["Inference API Keys", @project_data[:path] + "/inference-api-key"],
|
|
["Playground", @project_data[:path] + "/inference-playground"]
|
|
]
|
|
) %>
|