adding blackbird javascript logging to your rails project
Blackbird is a nifty JavaScript logger that can be added to any web app. Ever find yourself adding alerts into your JavaScript to get some (foggy) idea of what’s going on? Blackbird makes this kind of debugging much easier.
So how do you get Blackbird working in your Rails app? By following these easy steps:
1. Download the Blackbird zip file.
2. Extract contents of zip file.
3. Copy blackbird.css into public/stylesheets
4. Copy blackbird.js into public/javascripts
5. Copy blackbird_panel.png and blackbird_icon.png to public/images
6. Edit blackbird.css, modify urls to blackbird_panel.png and blackbird_icon.png to contain “/images/” in their path; “url(blackbird_panel.png)” should become “url(/images/blackbird_panel.png)”
7. Include the blackbird Javascript and CSS files in your layout: <%= stylesheet_link_tag 'blackbird' %> and <%= javascript_include_tag 'blackbird' %>
8. Add a button to open the Blackbird console: <input type=”button” onclick=”javascript:log.toggle();” value=”show log”/>
9. ???
10. Profit!
11. Check out the Blackbird website to learn more about using Blackbird.




