I find that many of my controllers have a dozen or more methods and that it can take a few moments to orient myself when I open a controller I haven''t looked at in a while. Does anyone have suggestions for organizing methods in a controller (alphabetical, by function, etc) to increase readability and scanability? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060512/2126e5f5/attachment-0001.html
If you''re using RadRails, the default Rails perspective displays a list of methods in a pane beside your code. Click one, and the editor jumps to it. I know, not what you meant. But it does help. Eden Brandeis wrote:> I find that many of my controllers have a dozen or more methods and that > it > can take a few moments to orient myself when I open a controller I > haven''t > looked at in a while. Does anyone have suggestions for organizing > methods > in a controller (alphabetical, by function, etc) to increase readability > and > scanability?-- Posted via http://www.ruby-forum.com/.
Steve Koppelman wrote:> If you''re using RadRails, the default Rails perspective displays a list > of methods in a pane beside your code. Click one, and the editor jumps > to it. > > I know, not what you meant. But it does help. > > Eden Brandeis wrote: >> I find that many of my controllers have a dozen or more methods and that >> it >> can take a few moments to orient myself when I open a controller I >> haven''t >> looked at in a while. Does anyone have suggestions for organizing >> methods >> in a controller (alphabetical, by function, etc) to increase readability >> and >> scanability?I keep my actions alphabetized in my controllers, it makes them easy to find. -- Posted via http://www.ruby-forum.com/.