Steve ConoverSteve Conover
Standup blog
edit Posted by Steve Conover on Sunday June 07, 2009 at 09:15AM

A couple more items from last week:

  • Help: acts_as_soft_deletable doesn't seem to work with STI. The plugin has been out for a while and it's surprising that nobody has had a problem with this before now.

  • Q: What's a good way to bulk insert a bunch of joined-up models? A: insert into a view. MySQL has updatable views now. This is also a great trick to use in Oracle.

Comments

  1. Stephen Boisvert Stephen Boisvert on June 07, 2009 at 06:54PM

    I'd love to see a blog post on using MySQL updatable views to bulk insert into a rails app.

  2. Mark Wilden Mark Wilden on June 07, 2009 at 07:53PM

    If I read correctly, that MySQL documentation says that only one table can be updated in an updateable view. It seems to be more for restricting columns that can be viewed/updated in one table, rather than inserting "joined-up models" into multiple tables.