Displaying 2 results from an estimated 2 matches for "edit_list".
Did you mean:
  edge_list
  
2006 Apr 29
3
Noob question... confused
If I have several controller actions which have this same line of code (or
more), how can I DRY up the line without running into complaints about
redirecting or rendering only once?  If I put the line in another method in
my controller, won''t it think I''m redirecting?
I want to dry up lines like this:  @listing = Listing.find(params[:id])
 def customerview
       @listing =
2006 Jun 16
1
sortable acts_as_tree with heirarchy
...:
<h2>Menu Prototype 2</h2>
<%= flash[:notice] %>
<ul id="menu">
<% @navigation.each do |link| %>
	<li class="edit_link level<%= link.parent_id %>" id="_<%= link.id.to_s 
%>">
		<%= link.name %>
		<ul class="edit_list">
		<% link.children.each do |child| %>
			<li class="edit_link level<%= child.parent_id %>" id="_<%= 
child.id.to_s %>">
				<%= child.name %>
			</li>
		<% end -%>
		</ul>
	</li>
<% end -%>
</ul>
<%=...