Le lundi 6 août 2012 00:07:35 UTC+2, John Mettraux a écrit :
>
>
> On Sun, Aug 05, 2012 at 02:21:26AM -0700, laurent wrote: 
> > 
> > So what is the best way to create is one class of participant, derived 
> from 
> > active record with a ruote storage for the workitem and a non immediat 
> > reply to the engine. 
>
> Hello Laurent, 
>
> welcome to the ruote mailing list. 
>
> If you want the workitems to be stored in the ruote storage, then you can 
> forgo ActiveRecord::Base and use Ruote::StorageParticipant directly (ie 
> you 
> don't need to create a model). 
>
> So no model and your controller would look like: 
>
> ---8<--- 
> class WorkitemsController 
>   def index 
>     @workitems = RuoteKit.engine.storage_participant.all 
>   end 
>   # ... 
> end 
> --->8--- 
>
> The view is easy to deduce. 
>
> If you need more inspiration, look at 
>
>   https://github.com/tosch/ruote-on-rails/ 
>
> It's not as minimal as the solution above since it reopens Ruote::Workitem 
> (in app/models/workitem.rb) to add a few methods. No ActiveRecord::Base in 
> sight. 
>
>
> Best regards, 
>
> -- 
> John Mettraux - http://lambda.io/jmettraux 
>
>
Thanks you John

I already use "ruote-on-rails" as a starting point for my application.
I have no idea if I go in a good direction : In this application, the 
humain user will be some kind of Ruote::Participant. They will receive the 
workitem, and has to do somethings to do with it (publish and record report 
activity).

These "HumainParticipant" will have more attributes (name, 
fonction, autorisation, etc ...) , and I would like to store these 
suplementary attributes in ActiveRecord.
It was possible with the "LocalParticipant" Module, but WorkItem is not 
save in ruote. With the "StorageParticipant", WorkItem is save, but I can 
not derived anymore my "HumainParticipant" form a "RuoteParticipant". 

I will try to just have a reference (external key id) of the 
RuoteParticipant in a field (attribute) of my "HumainParticipant" and tell 
you if it's work.

Best regards

Laurent


 

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to