public
Fork of fudgestudios/bort
Description: A base rails app featuring: RESTful Authentication, Will Paginate, Rspec & Rspec-rails, Exception Notifier, Asset Packager, Cap Recipe. Put together by Fudge to remove the need for boring project setup.
Homepage: http://www.fudgestudios.com
Clone URL: git://github.com/UnderpantsGnome/bort.git
add in an override for blackbird
Mon Oct 27 18:44:58 -0700 2008
commit  60a0d0cee93f9aa688db5d291345f0e243b6a8ca
tree    e5a3b5db77f6c62ff4e5bfc4ad9e4812b57eee27
parent  12cf7608a3e77b775a7a9c76c2ef8abce9943b6f
...
3
4
5
 
 
6
7
8
...
15
16
17
 
 
 
 
 
 
18
19
...
3
4
5
6
7
8
9
10
...
17
18
19
20
21
22
23
24
25
26
27
0
@@ -3,6 +3,8 @@ class ApplicationController < ActionController::Base
0
   include ExceptionNotifiable
0
   include AuthenticatedSystem
0
   include RoleRequirementSystem
0
+  
0
+  before_filter :blackbird_override
0
 
0
   helper :all # include all helpers, all the time
0
   protect_from_forgery :secret => 'b0a876313f3f9195e9bd01473bc5cd06'
0
@@ -15,5 +17,11 @@ class ApplicationController < ActionController::Base
0
   def record_not_found
0
     render :file => File.join(RAILS_ROOT, 'public', '404.html'), :status => 404
0
   end
0
+  
0
+  def blackbird_override
0
+    if 'true' == params[:force_blackbird]
0
+      session[:blackbird] = true
0
+    end
0
+  end
0
 end
0
 
...
26
27
28
29
 
30
31
 
32
33
34
35
36
37
38
 
39
40
...
26
27
28
 
29
30
 
31
32
33
34
35
36
37
 
38
39
40
0
@@ -26,15 +26,15 @@ module ApplicationHelper
0
   end
0
   
0
   def blackbird_tags
0
-    if SiteConfig.blackbird
0
+    if SiteConfig.blackbird || true == session[:blackbird]
0
       '<script type="text/javascript" charset="utf-8" src="/blackbird/blackbird.js"></script>
0
-<link href="/stylesheets/blackbird/blackbird.css" media="screen" rel="stylesheet" type="text/css" />'
0
+<link href="/blackbird/blackbird.css" media="screen" rel="stylesheet" type="text/css" />'
0
     else
0
       no_blackbird
0
     end rescue no_blackbird
0
   end
0
   
0
   def no_blackbird
0
-    "<script type=\"text/javascript\" charset=\"utf-8\">var log = {toggle: function() {}, move: function() {}, resize: function() {}, clear: function() {}, debug: function() {}, info: function() {}, warn: function() {}, error: function() {}, profile: function() {} };</script>"
0
+    '<script type="text/javascript" charset="utf-8">var log = {toggle: function() {}, move: function() {}, resize: function() {}, clear: function() {}, debug: function() {}, info: function() {}, warn: function() {}, error: function() {}, profile: function() {} };</script>'
0
   end
0
 end

Comments