search for: remove_link_unless_new_record

Displaying 1 result from an estimated 1 matches for "remove_link_unless_new_record".

2011 Nov 04
1
add dynamic nested attributes without nested form gem
...tributes dynamically, but I don''t want to use "nested form gem" So I found this example https://github.com/alloy/complex-form-examples/blob/a234fde4419836f277d7e340657f1d8418911d68/app/helpers/projects_helper.rb but this code doesn''t work module ProjectsHelper def remove_link_unless_new_record(fields) unless fields.object.new_record? out = '''' out << fields.hidden_field(:_delete) out << link_to_function("remove", "$ (this).up(''.#{fields.object.class.name.underscore}'').hide(); $ (this).previous().value = &...