small medium large xlarge

14 Mar 2010, 06:36
George Thrower (2 posts)

Your example of the join table pizza_toppings was exactly what I was trying to do in creating check boxes in my app. But in my application I have additional columns, in my pizza_toppings table, which I want to set when the record is created. I can’t for the life of me figure out what the syntax would be for the additional hidden fields to insert data into the additional pizza_toppings columns.

Thanks in advance.


14 Mar 2010, 08:10
George Thrower (2 posts)

Well it just so happens that I bought the active record series some time back and finally got a chance to watch episode 4 of active record, which deals with, as fate would have it, callbacks. Well this is exactly what I needed/wanted. I come from an Oracle back ground of 20 years, so if anyone else out there is new to ROR, Oracle refers to this functionality as triggers. (pre-insert, post- update…..).

BTW up until 2 months ago I had never done any object oriented programming nor had I laid eyes on Ruby or Rails, these screen casts at 5 bucks a piece (or any price) have been a god send.

Thanks Ryan.

You must be logged in to comment