Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup debugging

  • Loading branch information...
commit 26dfa31501c703a7868576079c2576d3d9db8088 1 parent f6cde18
@tye authored
View
1  app/assets/javascripts/rubyception/views/backtrace_lines/index.coffee
@@ -6,7 +6,6 @@ class App.Views.BacktraceLines.Index extends Backbone.View
@name = @options.name
@bind_render()
render: =>
- console.log @options
@collection.collect 'tbody',
args:
name: @name
View
6 app/assets/javascripts/rubyception/views/entries/entry.coffee
@@ -35,25 +35,19 @@ class App.Views.Entries.Entry extends Backbone.View
text = text.replace />/g, '>'
text
nested_params: (params)=>
- console.log 'Nested', params
inner_html = _.map params, (v,k) =>
name = k
if typeof v != 'string'
- console.log "Recursing into", v
definition = @nested_params(v).html()
- console.log "Rescuring definition is", definition
else
- console.log "Its a string", v
definition = "<span class='value string'>#{@escape_html v}</span>"
"<dt class='key'>#{@escape_html k}<span class='colon'>:</span></dt><dd>#{definition}</dt>"
- console.log(inner_html)
html = "<dl>#{inner_html.join('')}</dl>"
$(@el).find('.params .nested').html html
params:->
params = @model.get 'parsed_params'
html = _.map params, (v,k)=>
- v = JSON.stringify JSON.parse v
"<span class='param'><span class='key'>#{@escape_html k}</span><span class='colon'>:</span> <span class='value string'>#{@escape_html v}</span></span>"
$(@el).find('.params .basic').append html.join('')
backtrace:->
View
3  app/helpers/rubyception/application_helper.rb
@@ -6,15 +6,12 @@ def display_rails_backtrace_lines_link
onclick: 'return false'
end
def parse_tree tree, parents=[], result={}
- Rails.logger.info "Start #{tree.inspect}"
if tree.is_a?(String)
- Rails.logger.info "Val is a string"
item = result
parents.each do |parent|
item[parent] ||= {}
item = item[parent]
end
- Rails.logger.info "Render #{parents.join('/')}/_#{tree}.haml"
item[tree] = render(partial: "rubyception/#{parents.join('/')}/#{tree}")
elsif tree.is_a?(Hash)
tree.each do |key, val|
Please sign in to comment.
Something went wrong with that request. Please try again.