Any ideas on how I should implement this?

I need a specialized form for an existing model. There's a general
form which I use for general cases, and I need a 2nd form for when a
specific condition occurs. I thought of using a separate controller &
view, but Hobo doesn't seem to like that.

I suspect I'll switch to using <field-list if="&@show_bio" fields="a,
b, c"/> and the reverse condition.

Is there a better / easier / cleaner way?

Thanks,
François

On 9 jan, 21:09, François Beausoleil <[email protected]>
wrote:
> Hi!
>
> I've found this discussion, titled "Surprising route behavior":
>
> http://groups.google.com/group/hobousers/browse_thread/thread/acab253...
>
> This is exactly what I'm looking for, but routing is even more broken
> in my case.
>
> I have events and biographical notes. Notes are just a specialized
> form for entering events. Here's my BiographicalNotesController:
>
> class BiographicalNotesController < ApplicationController
>   hobo_model_controller Event
>   auto_actions_for :addressee, [:new, :create]
> end
>
> Running rake routes brings me back these routes:
>
>           new_event_for_addressee GET    /addressees/:addressee_id/
> events/new(.:format)
> {:controller=>"events", :action=>"new_for_addressee"}
>        create_event_for_addressee POST   /addressees/:addressee_id/
> events(.:format)
> {:controller=>"events", :action=>"create_for_addressee"}
>
> Look at the controller -- completely broken. I understand Hobo is
> model-centric, but instantiating actions in controller A and routing
> to controller B is completely unexpected.
>
> Anyway, my end goal is to have a specialized form just for
> biographical notes. Events have a TEXT column, named notes, for
> entering general notes. When someone creates a biographical note, it's
> an event where a different set of fields (title, notes, source, date)
> is re-formatted in the general notes field. I'm doing that because
> later in the application I show all events pertaining to a person, and
> biographical notes are just one type of event that pertains to people.
>
> Any ideas on how I should implement this?
>
> Thanks!
> François

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to