lib/rails-footnotes/footnotes.rb in rails3-footnotes-4.0.0.pre vs lib/rails-footnotes/footnotes.rb in rails3-footnotes-4.0.0.pre.1

- old
+ new

@@ -20,11 +20,11 @@ @@no_style = false @@multiple_notes = false @@klasses = [] # Default link prefix is textmate - @@prefix = 'txmt://open?url=file://%s&line=%d&column=%d' + @@prefix = 'txmt://open?url=file://%s&line=%d&column=%d'.html_safe # Edit notes @@notes = [ :controller, :view, :layout, :partials, :stylesheets, :javascripts ] # Show notes @@notes += [ :assigns, :session, :cookies, :params, :filters, :routes, :env, :queries, :log, :general ] @@ -217,31 +217,31 @@ var Footnotes = function() { function hideAll(){ #{close unless @@multiple_notes} } - + function hideAllAndToggle(id) { hideAll(); toggle(id) location.href = '#footnotes_debug'; - } - + } + function toggle(id){ var el = document.getElementById(id); if (el.style.display == 'none') { Footnotes.show(el); } else { Footnotes.hide(el); } } - + function show(element) { element.style.display = 'block' } - + function hide(element) { element.style.display = 'none' } return { @@ -354,10 +354,10 @@ newbody.insert index, new_text @controller.response.body = newbody end # Instance each_with_rescue method - # + # def each_with_rescue(*args, &block) self.class.each_with_rescue(*args, &block) end end