We usually prefer local variables over instance variables in partials. This way we'll be able to call the partial from views or components where the instance variable isn't available. And since we're using the `path` variable to configure the URL, we don't have to specify extra variables like `@budget` or the namespace `:admin` in `form_for`, since Rails only uses those variables to set the URL.
4 lines
142 B
Plaintext
4 lines
142 B
Plaintext
<%= render "header", action: "edit" %>
|
|
|
|
<%= render "form", group: @group, path: admin_budget_group_path(@budget, @group), action: "submit" %>
|