3 simple design questions

Hi to all,

I've 3 simple (I hope) questions about rails application design:

1. I'm developing a RoR application with some tables, every table has a boolean column (is_active), this column/property determines if the object is active or not. My question is "what is the best practice to implement this kind of problem ?":

  1.1 - Have boolean is_active on each table with one base class ? (but without STI because every class/table have separated content...)
  1.2 - Have an interface "Activable" on a separate table with a single boolean column is_active then in every table create an active object through activable interface ?
  1.3 - Other solutions ?

2. On the same application all the tables/objects belongs to customer (multi site app) my question is "is it correct to propagate the customer_id foreign key to all the tables or is it better to have a "customerable" interface and link all the objects with has_one :customer through customerable ?

3. Last question: is it a good practice writing modular applications in which each one works only with a specialized database and handles linked restful resources from other applications ?
    Ex. News application handles only the news database and news objects, security application handles only the security database and security objects (in this scenario is it possible
    to have map.resources news, :as_one => security where security objects don't belong to the same application ?)

Many thanks in advance and happy programming with Ruby On Rails !

"what is the best practice to implement this kind of problem"

1. I really don't suggest implementing problems.
This I'd say is a matter of personal preference. You can have a
boolean on each object, and you can do things like Object.is_active?

But if you have multiple Object classes, maybe you'll want an
activateable polymorphic class. You'll have to consider which will
have the most benefits for your situation.

2. What are you doing through customer for again? Unless you ahve many
crazy relationships just
ObjectType1 belongs_to :customer
ObjectType2 belongs_to :customer

:customer has_many :ObjectType1, :ObjectType2, etc

Thanks I choose to stay with the column is_active and customer_id in
every table, after all this is the best way for high speed (no relation
at all…).

Have a nice day.