You can generate just one model and set a flag with the type of Account:

for MongoId:
field :account_type, :type => String, :default => 'P'

And in the controllers you can search with @accounts = 
Account.where(:account_type => 'P')

This can solve your problem but it's not the best way to do it.

I can't imagine a better way to do it!


On Jun 1, 2011, at 11:19 AM, Vinícius Rodrigues wrote:

> But I need two scenarios:
> Accounts Payable (Payable::AccountsController)
> Accounts Receivable (Receivable::AccountsController)
> But I can not work! :(
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/rubyonrails-talk/-/aEZzdEJQRWpiYWdK.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.


Cordialmente,


Fábio Rodriguez (Brajola)
Analista de Sistemas / Systems Analyst

[email protected]
[email protected]

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to