{"name":"button_to","helper":"rui_button_to","complexity":"moderate","param_count":20,"slot_count":1,"form_builder":false,"standalone":true,"ai_score":7,"human_score":8,"token_estimate":135,"slots":{"icon":{"type":"renders_one","component":"lambda","example":"component.with_icon"}},"gotchas":[{"id":"button_to_block_form","severity":"high","component":"rui_button_to","summary":"rui_button_to generates a \u003cform\u003e — never nest inside form_with","params":[],"behavior":"rui_button_to renders a \u003cform\u003e with CSRF token and method override. Nesting it inside another form_with creates invalid nested forms — browsers ignore the inner form.","wrong":"\u003c%= form_with model: @post do |f| %\u003e\u003c%= rui_button_to(\"Delete\", post_path(@post), method: :delete) %\u003e\u003c% end %\u003e","right":"\u003c%= form_with model: @post do |f| %\u003e\u003c%= f.rui_button(\"Save\") %\u003e\u003c% end %\u003e\u003c%= rui_button_to(\"Delete\", post_path(@post), method: :delete, color: :danger) %\u003e","notes":"Place button_to outside the form, or use a separate div after the form closes.","detection":"Scan for rui_button_to calls between form_with...end blocks. Regex: /form_with[\\s\\S]*?rui_button_to[\\s\\S]*?end/","recovery":"Move rui_button_to outside the form_with block. Place it after the form's \u003c% end %\u003e tag, typically in a separate action footer div."}],"families":[{"tree":"button","question":"What kind of action?","use_case":"Delete / RESTful action","notes":"RESTful action (POST/PATCH/DELETE). Generates its own form with CSRF."}],"compositions":[{"name":"comment_thread","description":"Avatar + author + body + action links — used in discussions, reviews","components":["rui_avatar","rui_text","rui_link","rui_button_to"]},{"name":"resource_list_item","description":"Bordered card row with name/link + metadata badges + edit/delete actions","components":["rui_link","rui_badge","rui_text","rui_button_to"]},{"name":"action_footer","description":"Edit link + delete button separated by a border — used at bottom of show cards","components":["rui_link","rui_button_to"]}],"relationships":{"composes_with":["avatar","badge","link","text"],"slotted_into":[],"confused_with":["button","link"]}}