% trace = segment[:backtrace] unique_id = "_#{trace.object_id}_#{(rand * 100000).to_i}" show_link_id = "show_rails_link#{unique_id}" hide_link_id = "hide_rails_link#{unique_id}" app_stack_trace_id = "application_stack_trace#{unique_id}" full_stack_trace_id = "full_stack_trace#{unique_id}" %> <%= link_to_function('Show Rails', :id => show_link_id) do |page| page[full_stack_trace_id].show page[app_stack_trace_id].hide page[show_link_id].hide page[hide_link_id].show end %> <%= link_to_function('Hide Rails', :id => hide_link_id, :style => "display: none;") do |page| page[full_stack_trace_id].hide page[app_stack_trace_id].show page[hide_link_id].hide page[show_link_id].show end %>