Skip to content

Commit

Permalink
Cleanup debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tye committed Nov 30, 2012
1 parent f6cde18 commit 26dfa31
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
Expand Up @@ -6,7 +6,6 @@ class App.Views.BacktraceLines.Index extends Backbone.View
@name = @options.name @name = @options.name
@bind_render() @bind_render()
render: => render: =>
console.log @options
@collection.collect 'tbody', @collection.collect 'tbody',
args: args:
name: @name name: @name
Expand Down
6 changes: 0 additions & 6 deletions app/assets/javascripts/rubyception/views/entries/entry.coffee
Expand Up @@ -35,25 +35,19 @@ class App.Views.Entries.Entry extends Backbone.View
text = text.replace />/g, '>' text = text.replace />/g, '>'
text text
nested_params: (params)=> nested_params: (params)=>
console.log 'Nested', params
inner_html = _.map params, (v,k) => inner_html = _.map params, (v,k) =>
name = k name = k
if typeof v != 'string' if typeof v != 'string'
console.log "Recursing into", v
definition = @nested_params(v).html() definition = @nested_params(v).html()
console.log "Rescuring definition is", definition
else else
console.log "Its a string", v
definition = "<span class='value string'>#{@escape_html v}</span>" definition = "<span class='value string'>#{@escape_html v}</span>"
"<dt class='key'>#{@escape_html k}<span class='colon'>:</span></dt><dd>#{definition}</dt>" "<dt class='key'>#{@escape_html k}<span class='colon'>:</span></dt><dd>#{definition}</dt>"
console.log(inner_html)
html = "<dl>#{inner_html.join('')}</dl>" html = "<dl>#{inner_html.join('')}</dl>"
$(@el).find('.params .nested').html html $(@el).find('.params .nested').html html


params:-> params:->
params = @model.get 'parsed_params' params = @model.get 'parsed_params'
html = _.map params, (v,k)=> 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>" "<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('') $(@el).find('.params .basic').append html.join('')
backtrace:-> backtrace:->
Expand Down
3 changes: 0 additions & 3 deletions app/helpers/rubyception/application_helper.rb
Expand Up @@ -6,15 +6,12 @@ def display_rails_backtrace_lines_link
onclick: 'return false' onclick: 'return false'
end end
def parse_tree tree, parents=[], result={} def parse_tree tree, parents=[], result={}
Rails.logger.info "Start #{tree.inspect}"
if tree.is_a?(String) if tree.is_a?(String)
Rails.logger.info "Val is a string"
item = result item = result
parents.each do |parent| parents.each do |parent|
item[parent] ||= {} item[parent] ||= {}
item = item[parent] item = item[parent]
end end
Rails.logger.info "Render #{parents.join('/')}/_#{tree}.haml"
item[tree] = render(partial: "rubyception/#{parents.join('/')}/#{tree}") item[tree] = render(partial: "rubyception/#{parents.join('/')}/#{tree}")
elsif tree.is_a?(Hash) elsif tree.is_a?(Hash)
tree.each do |key, val| tree.each do |key, val|
Expand Down

0 comments on commit 26dfa31

Please sign in to comment.