[Brug-talk] Controllers owning controllers

Koen Van der Auwera koen at atog.be
Wed Nov 14 05:38:36 EST 2007


Hi Thomas,

I'm still not sure what you are trying to do with your controllers/routes.

With regard to the error message, check
http://api.rubyonrails.com/classes/ActionView/Helpers/ActiveRecordHelper.html,
*error_messages_for*(*params).

Kind regards,

Koen.
10to1

On 11/14/07, Thomas Richard <thomas9999 at gmail.com> wrote:
>
> Hey,
>
> well I'm using it right now and seems to work fine. The other line
> might be a little hack or something but i wouldn't know how else i
> could do it.
>
> map.connect ':dummy', :controller => 'redirector', :action => 'redirect'
>
> Otherwise if someone would type in something like app/projects i'd get
> an error. Now i just send it to a redicert controllor wich reads out
> the dummy paramater and redirects you to the right page. Prolly not
> the rails way but it works fine.
>
> Also, is there a way to change the standard line: "1 error prohibited
> this employee from being saved"? I've been searching for this but i
> can't really find anything anywhere.
>
> Greetings
> Thomas
>
> 2007/11/13, Verborgh Steven <Steven.Verborgh at howest.be>:
> > Hi,
> >
> > Wouldn't it work as he suggest and add an extra route like
> > map.connect ':category/:controller/:action/:id'
> >
> > and use the extra parameter :category in his controllers to fill up his
> navigation and use in his new/edit/...?
> >
> > steven
> >
> >
> >
> > -----Original Message-----
> > From: brug-talk-bounces at rubyforge.org on behalf of Maarten Porters
> > Sent: Mon 11/12/2007 11:56 PM
> > To: brug-talk at rubyforge.org
> > Subject: Re: [Brug-talk] Controllers owning controllers
> >
> > Hi Thomas,
> >
> > after taking a quick look at your drawing, I'd consider just making a
> > controllers & models
> > for each entity. I know it's sometimes a bit hard to get a good
> > structure for your app. Just
> > try not to make it more complicated then it actually is. (I guess this
> > is a pretty useless tip :)).
> > When I'm stuck with this kind of problems, I start scaffolding my app in
> > different ways. If it doesn't work,
> > I start over again without losing too much time. After a while you'll
> > get a better understanding
> > of your app and rails.
> >
> > map.connect ':dummy', :controller => 'redirector', :action => 'redirect'
> => I really don't like this. Feels like a hack. (just my first impression)
> >
> >
> > greetz,
> >
> > Maarten
> _______________________________________________
> Brug-talk mailing list
> Brug-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/brug-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/brug-talk/attachments/20071114/68e2f656/attachment.html 


More information about the Brug-talk mailing list