Hi Leandro,

I would go for two controllers here. A CustomersController and a
SuppliersController. You would just need to handle the Party model
appropriately in each one of those controllers.

Best regards,
// Marco

On Sat, Aug 22, 2015 at 10:59 PM Leandro França <
leandroayresfra...@gmail.com> wrote:

> Hi there everyone,
>
> I have a tradicional "Party/Role Model" in my app:
>
>      - *Party*  ( an organization, a person, etc)
>      - *PartyRelationship* ( One or more relationships between parties.
> They can have relationship types: *customer*, *supplier*, *reseller*, etc)
>
> However, I need to create two "shorcuts" :
>    -  one to customers CRUD  and
>    -  one to suppliers CRUD , *even if they´re actually both "parties"
> behind the scenes*.
>
> I´d like to show on my navigation menu:
>
> 1) A "Customers" link routing to the customer crud.  (Actually, the party
> CRUD, knowing ahead it would be dealing with a "customer" party
> relationship)
> 2) A "Supplier" link routing to the supplier crud. (Actually, the same
> party CRUD, knowing ahead it would be dealing with a "customer" party
> relationship)
>
> These links will also need to filter the parties being listed, based on
> their relationship types.
>
> What´s the recommended approach to this?
>
> Thanks in advance!
>
> Regard.
> Leandro
>
>
> --
> 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 rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/8d2660cd-1d4a-47b7-9425-c903c56a4bf6%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/8d2660cd-1d4a-47b7-9425-c903c56a4bf6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CACMkcE5O2ESC9UkTsizGARqgNUNNLpAaJLnOCPbL1TcJmVrdCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to