Hi Matt,
Schema looks like this.
sqlite> .schema transaction_items
CREATE TABLE "transaction_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT
NOT NULL, "transaction_type_id" integer, "note" varchar(255),
"transaction_date" datetime, "created_at" datetime, "updated_at"
datetime);
sqlite> .schema transaction_types
CREATE TABLE "transaction_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT
NOT NULL, "name" varchar(255), "tran_type" varchar(255), "created_at"
datetime, "updated_at" datetime);
There is no specific table for expense_type and income_type.
transaction_types table's tran_type column decides whether it is a
income / expense type.
My idea is to write common code for IncomeType and ExpenseType in it's
base class transaction_type which extends ActiveRecord::Base.
Thanks.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/5eed383f9857346bb8d902c2453d8493%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.