Sha256: 964f61796e617e69c619b32c808851d3df583261399b1dccf3978bdccdb90c3d

Contents?: true

Size: 620 Bytes

Versions: 8

Compression:

Stored size: 620 Bytes

Contents

= form.fields_for field.name do |nested_form|
  %blockquote
    - if nested_form.object.new_record?
      = nested_form.link_to_remove "cancel", :class => 'label notice', :id => "payments_cancel"
    = nested_form.generate({:action => :create, :model_config => field.associated_model_config, :nested_in => field.name })
    %hr
= form.link_to_add t("admin.index.add_new"), field.name, :class => 'label notice', :id => "payments_add"

:javascript
    $('#payments_add').live('click', function() {
      $(this).hide();
    });
    $('#payments_cancel').live('click', function() {
      $('#payments_add').show();
    });

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
piggybak-0.4.5 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.4.4 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.4.3 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.4.2 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.4.1 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.4.0 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.3.2 app/views/rails_admin/main/_form_nested_no_destroy.html.haml
piggybak-0.3.1 app/views/rails_admin/main/_form_nested_no_destroy.html.haml