Displaying 1 result from an estimated 1 matches for "be86f5fa".
2006 Aug 17
3
What''s the best way to stop repeating this line in my controller?
Hi,
I am trying to follow the "DRY" principle and came across a problem.   
I am working on a small ajax task manager, and right now in the index  
page which renders the list, I have (for example, in the Lists  
controller):
def index
@lists = List.find(:all)
end
Now within the controller there''s also a list_add action which is  
called via ajax..
def list_add
if