I’m trying to delete a set of records from the database using parameters
other than the primary key. Is there a method similar to find_by_sql()
that can be used to issue a delete statement like this. Thanks in
advance.
Shaun
I’m trying to delete a set of records from the database using parameters
other than the primary key. Is there a method similar to find_by_sql()
that can be used to issue a delete statement like this. Thanks in
advance.
Shaun
On 11/22/05, Shaun [email protected] wrote:
I’m trying to delete a set of records from the database using parameters
other than the primary key. Is there a method similar to find_by_sql()
that can be used to issue a delete statement like this. Thanks in
advance.Shaun
Foo.destroy_all ‘bar < 5’
http://rails.rubyonrails.com/classes/ActiveRecord/Base.html#M000698
–
rick
http://techno-weenie.net
technoweenie wrote:
On 11/22/05, Shaun [email protected] wrote:
I’m trying to delete a set of records from the database using parameters
other than the primary key. Is there a method similar to find_by_sql()
that can be used to issue a delete statement like this. Thanks in
advance.Shaun
Foo.destroy_all ‘bar < 5’
–
rick
http://techno-weenie.net
Just what I was looking for. Thanks Rick.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs