GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 'marked_for_destruction' not appended to 'fields' class when using wrapper: false · Issue #357 · ryanb/nested_form

This repository was archived by the owner on Dec 12, 2021. It is now read-only.
This repository was archived by the owner on Dec 12, 2021. It is now read-only.

'marked_for_destruction' not appended to 'fields' class when using wrapper: false #357

Copy link
Copy link
Open
Open
'marked_for_destruction' not appended to 'fields' class when using wrapper: false#357
Copy link

Description

@tbrammar
tbrammar
opened on Jul 23, 2015
Issue body actions

Hi,

I have the following code:

<table id="js_user_permissions" >
  <%= nested_form_for(user) do |f| %>
    ....
    <%= f.fields_for :permissions, wrapper: false do |p| %>
      <tr class="fields">
        <td>
          <%= p.select :country_id, countries.collect {|c| [ c.name, c.id ] } %>
        </td>
        <td>
          <%= p.link_to_remove "Remove" %>
          <p></p>
        </td>
      </tr>
    <% end %>
    <%= f.link_to_add "Add permissions", :permissions, data: { target: "#js_user_permissions" } %>
  <% end %>
</table>

Everything works as expected: I can add new permissions to new records / existing records, I can remove permissions from existing records etc.

However, with validations I can't seem to get the marked_for_destruction class added to my <tr class="fields"> tag.

If I remove a permission from an existing record, submit the form and then it fails validation the re-rendered form doesn't display the marked_for_destruction class on that DOM.

Any ideas?

Activity

  1. tbrammar
    changed the title [-]`marked_for_destruction` not appended to `fields` class when using wrapper: false[/-] [+]'marked_for_destruction' not appended to 'fields' class when using 'wrapper: false'[/+] on Jul 23, 2015
  2. tbrammar
    changed the title [-]'marked_for_destruction' not appended to 'fields' class when using 'wrapper: false'[/-] [+]'marked_for_destruction' not appended to 'fields' class when using wrapper: false[/+] on Jul 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.