Open richardpeng opened 10 years ago
I am not being able to delete HABTM records even without validation
Showing /usr/local/var/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rails_admin-0.6.2/app/views/rails_admin/main/_delete_notice.html.haml where line #11 raised:
undefined method `categories_vendors' for #<Category:0x007fa04a0c58e0>
Extracted source (around line #11):
- else
= wording
%ul
- @abstract_model.each_associated_children(object) do |association, child|
%li
- child_config = RailsAdmin.config(child)
= @abstract_model.model.human_attribute_name association.name
Trace of template inclusion: /usr/local/var/rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/rails_admin-0.6.2/app/views/rails_admin/main/delete.html.haml
I'm having the same issue.
+1
updating rails have worked for me
Worked for me I discovered that after posting. Thanks! I recommend this issue be closed.
I have the following self-referencing association:
and this validation:
When the validation fails, the record is left in the join table. Looking at the SQL queries, the join table records are created in a separate transaction from the ones for the main record and so isn't rolled back when the validation fails.