Permalink
Browse files

Now creating stubs for every other environment

  • Loading branch information...
1 parent 00c4ac5 commit 02c40f2795c5570e119ef1e42cf6528935eece78 Elad Meidar committed Oct 30, 2009
Showing with 4 additions and 1 deletion.
  1. +2 −1 README.textile
  2. +2 −0 lib/black_bird_helper.rb
View
@@ -8,7 +8,8 @@ and the required javascripts, stylesheets and images will be copied into your <c
</pre>
Which will add the blackbird javascript and CSS tags. It's also important to point out, that the helper will only generate these tags when running the development environment, so you are hassle free regarding that matter.
-you'll still be required to remove all <code>log.something</code> calls in your javascript source, otherwise IE is going to be mad at you.
+<del>you'll still be required to remove all <code>log.something</code> calls in your javascript source, otherwise IE is going to be mad at you. </del>
+Now stubs are generated to prevent Javascript errors if you leave the <code>log</code> calls, note that if you change the namesspace, you'll have to manually edit the helper to use the right namespace
From this point on, you can use BlackBird exactly as the home page explains.
View
@@ -4,6 +4,8 @@ module BlackBirdHelper
def include_black_bird
if Rails.env == "development"
javascript_include_tag("blackbird") + stylesheet_link_tag("blackbird")
+ else
+ "<script>var log = {toggle: function() {}, toggle: function() {}, debug:function () {}, info:function () {}, warn:function () {}, error:function () {}, profile:function () {}};</script>"
end
end
end

0 comments on commit 02c40f2

Please sign in to comment.