You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generator copies `layered_ui.css` into `app/assets/tailwind/`, adds the CSS import to `application.css`, and adds the JS import to `application.js`.
24
24
25
-
Then render the engine layout from your application layout:
25
+
Then render the engine layout from your application layout. Place all `content_for` blocks **above** the render call - the engine layout reads them when it renders, so they must be defined first:
@@ -167,7 +174,7 @@ Place files in `app/assets/images/layered_ui/` to replace engine defaults:
167
174
168
175
## Optional integrations
169
176
170
-
-**Devise** - auto-detected. Provides styled auth views, header login/register buttons, sidebar user info and logout.
177
+
-**Devise** - auto-detected. Provides styled auth views, header login/register buttons, sidebar user info and logout. Setup: `bundle add devise`, run `devise:install` and `devise User` generators, add `devise_for :users` to routes. Configure `Layered::Ui.current_user_method` if not using `:current_user`. Helpers: `l_ui_devise_installed?`, `l_ui_user_signed_in?`.
171
178
-**Pagy** - auto-detected. Use `l_ui_pagy(@pagy)` for styled pagination.
172
179
-**Ransack** - auto-detected. Use `l_ui_search_form` and `l_ui_sort_link` for styled search and sortable tables.
Copy file name to clipboardExpand all lines: .claude/skills/layered-ui-rails/references/CONTROLLERS.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ Drag handle for resizing the panel width on desktop.
139
139
Manages multi-scope search forms with parameter preservation and Turbo frame support.
140
140
141
141
**Values:**`scope` (String, default `"q"`)
142
-
**Actions:**`preserve`, `clear`
142
+
**Actions:**`preserve`, `clear`, `rewriteLink`
143
143
144
144
```html
145
145
<formdata-controller="l-ui--search-form"
@@ -153,4 +153,17 @@ Manages multi-scope search forms with parameter preservation and Turbo frame sup
153
153
</form>
154
154
```
155
155
156
-
When multiple search forms exist on one page (each with a different `scope` value), submitting one form automatically preserves the other forms' query parameters.
156
+
When multiple search forms exist on one page (each with a different `scope` value), submitting one form automatically preserves the other forms' query parameters. The `page` param and any scoped page param matching the scope (e.g. `users_page` for scope `users_q`) are reset on submit so pagination returns to page 1.
157
+
158
+
**`rewriteLink`** - merges current URL params into a clicked link's href. Useful for pagination links inside Turbo Frames where the server-rendered href may be missing params from other scopes. Attach to a parent element (e.g. the Turbo Frame):
0 commit comments