Multi-Table Inheritance in Rails - When two tables are one...
March 13th, 2008
I had a situation where I had two tables, one was read only data and the other was where I would put my new data. They both modeled the same object (a person) but I had to figure out how to have ONE object for the system to interact with.
That is, how do you make two tables into one model in Rails?
MULTI-TABLE INHERITANCE!!!!!
Read the rest of this entryPlease, think of your server!
November 26th, 2007
This is the first blog entry of the RSPCS… the Royal Society of the Performance and Care of Servers… our first target, people’s abuse of the use of ActiveRecord’s “find” class method.
Read the rest of this entryLatest comments
- Mikel
@blaine – Absolutely, you want the prototype “each” function, works almost exactly the same as Ruby’s each, you can find...
- blaine
Nice post, pardon my denseness but what would be the process of adding multiple required fields? Is there an easy...
- Simon
@mikel:
The livevalidation plugin is still very green. Basically, it’s unusable if you have any sort of validation within a...
- Mikel
Turns out there is a more complete way to do it:
http://livevalidation.rubyforge.org/
This uses the live validation javascript library. I...
- Bill
Is there a DRY way to do this? If I’ve already setup all my validation rules in my models,...
- Doug Hogg
Hi Mike,
I am learning Ruby and discovered your blog. Very cool. I live in Hollywood a few blocks from...