Chris Cera on 6 Mar 2008 16:32:17 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] refactoring controllers


Hi everyone,

I'm looking to extract one scope from my controller into another
controller.  I think I'm missing something design-wise, so I
would appreciate some help.  Here are the options I see so far:

1) Create another controller.  I tried this approach and called
redirect_to() to the other controller.  What I dislike about this
approach is that it sends a 302 back to the client, and generates
another request to the web server.

2) Put it into model.  Aside from the fact that this seems
wrong, I need to restart rails whenever I modify one of our
classes in model.  Is that normal btw?
    
3) Put it into our library outside of rails.  I dislike this
again b/c of the restart.

I found some useful ideas from this page on refactoring
controllers, but my question still remains:
    http://railsforum.com/viewtopic.php?pid=6561

Any help is greatly appreciated.  Best, -Chris

-- 
Christopher D. Cera, CTO
http://vuzit.com
P: 215.435.2289
F: 267.295.7369
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk