HABTM checkboxes insert but don't delete

I have a problem related with the HABTM relationships with checkboxes.

I've got a profile and a service model, both related with has_and_belongs_to_many.

The problem is that i can insert new data in the profiles_services table, however, i cant delete already existing data.

What could be the problem?

have you watched...

"#17 HABTM Checkboxes - RailsCasts;

tecregio wrote:

Try putting this ProfilesController#update , before #update_attributes is called:   params[:profile][:service_ids] ||=

And put this in ServicesController#update , before #update_attributes is called:   params[:service][:profile_ids] || =

These are needed because forms don't submit values for unticked checkboxes. If you watch the "HABTM Checkboxes" RailsCast, you'll learn more about this:

Cheers, Nick

yes, i think i'm following exactly the tutorial, however it doesn't work...

here's the code:

#profile model:

class Profile < ActiveRecord::Base   belongs_to :company   has_and_belongs_to_many :services [...] end

hehe silly me, i should have shown you the entire code, i had a service= definition that was conflicting with the deletion =p