#admin_buttons -case params[:action] -when 'index' //new =link_to image_tag('/images/icons/new.png', :alt=>'[new]'), send("new_#{params[:controller].singularize}_path"), :class => 'admin_new', :title => 'New' -when 'new', 'create' //index =link_to image_tag('/images/icons/list_all.png', :alt=>"[List All #{params[:controller].titleize}]"), send("#{params[:controller]}_path"), :class => 'admin_list', :title => "All #{params[:controller].titleize}" -when 'show' //edit, index =link_to image_tag('/images/icons/list_all.png', :alt=>"[List All #{params[:controller].titleize}]"), send("#{params[:controller]}_path"), :class => 'admin_list', :title => "List All #{params[:controller].titleize}" =link_to image_tag('/images/icons/edit.png', :alt=>"[Edit]"), send("edit_#{params[:controller].singularize}_path"), :class => 'admin_edit', :title => 'Edit' -when 'edit', 'update' /show, index =link_to image_tag('/images/icons/list_all.png', :alt=>"[List All #{params[:controller].titleize}]"), send("#{params[:controller]}_path"), :class => 'admin_list', :title => "List All #{params[:controller].titleize}" =link_to image_tag('/images/icons/show.png', :alt=>'[show]'), send("#{params[:controller].singularize}_path", @resource), :class => 'admin_show', :title => 'Show'