[Brug-talk] Controllers owning controllers
Thomas Richard
thomas9999 at gmail.com
Wed Nov 14 05:03:50 EST 2007
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
More information about the Brug-talk
mailing list