Forum: Ruby on Rails direct sql "delete from"

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Martin DeMello (Guest)
on 2006-01-22 11:12
(Received via mailing list)
I was thinking, if I don't manage to figure out the problem with
acts_as_taggable, that I could untag objects via a direct SQL DELETE
on the tag join table (something like  "where tag_id = tag_to_delete
and user_id = current_user"). Are there any dangers to this approach?

martin
Martin DeMello (Guest)
on 2006-01-22 21:40
(Received via mailing list)
On 1/22/06, Martin DeMello <removed_email_address@domain.invalid> wrote:
> I was thinking, if I don't manage to figure out the problem with
> acts_as_taggable, that I could untag objects via a direct SQL DELETE
> on the tag join table (something like  "where tag_id = tag_to_delete
> and user_id = current_user"). Are there any dangers to this approach?

This worked like a charm, but it still makes me a bit uneasy - I have
no idea if some rails facet requires that all deletes be done through
a wrapper. Anyone?

martin
This topic is locked and can not be replied to.