uups... with the changes as above I can create events from the
location page...nice but I need it the other way round (and I'm happy
to not be THAT stupid ;-).

So my question again: I need to be able to create or select a location
from within the event page (model as per my initial post). Thanks for
any help...

On Nov 5, 5:59 pm, Roland <[email protected]> wrote:
> thanks for the response Bryan...
> just to make sure I got it right:
>   re (1): I have to fiddle the main-nav manually
>   re (2): the auto_actions_for have to be in the LocationsController
> for events...
> changed this but still don't see any actions for location on the event
> page. apologies for my stupidity :-(
>
> On Nov 5, 10:19 am, Bryan Larsen <[email protected]> wrote:
>
>
>
> > Roland wrote:
> > > have a beginners question...
> > > the following situation
>
> > > event: (created as hobo_model_resource)
> > >   has_many :event_hostings,  :dependent => :destroy
> > >   has_many :clubs, :through => :event_hostings, :accessible => true
> > >   belongs_to :location, :accessible => true
>
> > > //in event controller
> > >   auto_actions_for :location, [:new, :create, :index]
>
> > > club: (created as hobo_model_resource)
> > >   has_many :event_hostings, :dependent => :destroy
> > >   has_many :events, :through => :event_hostings, :accessible => true
>
> > > event_hosting: (created as hobo_model)
> > >   belongs_to :club
> > >   belongs_to :trial
>
> > > location:
> > >   has_many :events, :accessible => true
>
> > > Issue 1: event does not show up in the main navigation !
> > >   (the urlhttp://.../events/worksfine. Am aware that I can manually
> > > amend the main-nav tag etc, but I'd like to understand why only this
> > > one model does not show up)
>
> > main-nav only displays a certain number of models -- 5 I think.  Also,
> > you have auto_actions_for on your event model, so main nav assumes that
> > events are accessed via locations.
>
> > > Issue 2: the auto actions for location do not show up when creating/
> > > editing an event !
> > >   (have read through the posts, tried the children thing in
> > > event_hints etc but get the following error
> > >     NoMethodError (You have a nil object when you didn't expect it!
> > >     You might have expected an instance of Array.
> > >     The error occurred while evaluating nil.empty?):
> > >       hobo (0.8.10) taglibs/rapid_generics.dryml:32:in `collection'
> > >       ...
> > >   )
>
> > I don't see any auto_actions_for in location...
>
> > > what am i doing wrong / do i not understand ? Many thanks in advance
> > > for any help.
--~--~---------~--~----~------------~-------~--~----~
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