Iván Vega Rivera
2005-Oct-19 02:52 UTC
Stack level too deep on controller without model? - routing
Hi, I thought I could create a controller without a model (since I don''t need a model), but after I create it and add the following line to my routes.rb, the app dies on the matching URL: map.connect ''mail/:id'', :controller => ''emails'', :action => ''compose'' So when I go to /mail/7 for example, Rails greets me with: SystemStackError in <controller not set>#<action not set> stack level too deep |generated/routing/recognition.rb:22:in `recognize_path'' script/server:49| So, is it possible to use a controller without a matching model? Thanks! - Ivan V.
Iván Vega Rivera
2005-Oct-19 03:38 UTC
Re: Stack level too deep on controller without model? - routing
Spoke too soon. The problem was I copied another controller''s code and forgot to change the controller name. Still, the problem is now this one: ArgumentError in Emails#compose wrong number of arguments (1 for 0) |script/server:49| Now what could be wrong? Thank for your help! - Ivan V. Iván Vega Rivera wrote:> Hi, > > I thought I could create a controller without a model (since I don''t > need a model), but after I create it and add the following line to my > routes.rb, the app dies on the matching URL: > > map.connect ''mail/:id'', :controller => ''emails'', :action => ''compose'' > > So when I go to /mail/7 for example, Rails greets me with: > > > SystemStackError in <controller not set>#<action not set> > > stack level too deep > > |generated/routing/recognition.rb:22:in `recognize_path'' > script/server:49| > > So, is it possible to use a controller without a matching model? > > Thanks! > > - Ivan V. > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >