Skip to content

Instantly share code, notes, and snippets.

@oren
Created June 1, 2010 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oren/421635 to your computer and use it in GitHub Desktop.
Save oren/421635 to your computer and use it in GitHub Desktop.
how to open the Tag class?
class Tag < ActiveRecord::Base
def delete_taggings_of_client(client_id)
self.taggings.each do |t|
key = TranslationKey.find(t.taggable_id)
t.destroy if key.client_id == client_id
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment