[Nitro] og relation DSL

Tim Larson tim at keow.org
Tue Nov 29 09:37:54 EST 2005


On Mon, Nov 28, 2005 at 10:18:07PM -0600, itsme213 wrote:
> What are the parameter signatures of the macros? The docs (and code) just 
> takes *args, so it's hard to figure out.

Don't know, dig in the library code...

> How can I do the following? Specifically, how can I name the inverse 
> "belongs_to" distinctly for :good_bs and :bad_bs?
> 
> class A
>   has_many :good_bs, B
>   has_many :bad_bs, B
> end

class A
  has_many :good_bs, B, :foreign_name => :some_foreign_key_name
  has_many :bad_bs, B, :foreign_name => :some_other_foreign_key_name
end

--Tim Larson



More information about the Nitro-general mailing list