Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use dots instead of double colons.

  • Loading branch information...
commit b43926ffc0f999a54b4793d4f624ba16b26c3e89 1 parent 400d049
Gabe Berke-Williams authored June 04, 2012
4  app/controllers/high_voltage/pages_controller.rb
... ...
@@ -1,7 +1,7 @@
1 1
 class HighVoltage::PagesController < ApplicationController
2 2
 
3 3
   unloadable
4  
-  layout Proc.new { |_| HighVoltage::layout }
  4
+  layout Proc.new { |_| HighVoltage.layout }
5 5
 
6 6
   rescue_from ActionView::MissingTemplate do |exception|
7 7
     if exception.message =~ %r{Missing template #{content_path}}
@@ -27,7 +27,7 @@ def clean_path
27 27
     end
28 28
 
29 29
     def content_path
30  
-      HighVoltage::content_path
  30
+      HighVoltage.content_path
31 31
     end
32 32
 
33 33
 end
2  config/routes.rb
... ...
@@ -1,4 +1,4 @@
1 1
 Rails.application.routes.draw do
2  
-  match "/#{HighVoltage::content_path}*id" => 'high_voltage/pages#show', :as => :page, :format => false
  2
+  match "/#{HighVoltage.content_path}*id" => 'high_voltage/pages#show', :as => :page, :format => false
3 3
 
4 4
 end
2  gemfiles/rails-3.0.13.gemfile.lock
... ...
@@ -1,5 +1,5 @@
1 1
 PATH
2  
-  remote: /Users/mjankowski/Development/opensource/high_voltage
  2
+  remote: /Users/gabe/thoughtbot/open-source/high_voltage
3 3
   specs:
4 4
     high_voltage (1.1.1)
5 5
 
2  gemfiles/rails-3.1.5.gemfile.lock
... ...
@@ -1,5 +1,5 @@
1 1
 PATH
2  
-  remote: /Users/mjankowski/Development/opensource/high_voltage
  2
+  remote: /Users/gabe/thoughtbot/open-source/high_voltage
3 3
   specs:
4 4
     high_voltage (1.1.1)
5 5
 
2  gemfiles/rails-3.2.5.gemfile.lock
... ...
@@ -1,5 +1,5 @@
1 1
 PATH
2  
-  remote: /Users/mjankowski/Development/opensource/high_voltage
  2
+  remote: /Users/gabe/thoughtbot/open-source/high_voltage
3 3
   specs:
4 4
     high_voltage (1.1.1)
5 5
 
12  spec/controllers/pages_controller_spec.rb
@@ -43,12 +43,12 @@
43 43
 
44 44
   context "using custom layout" do
45 45
     before(:all) do
46  
-      @original_layout = HighVoltage::layout
47  
-      HighVoltage::layout = "alternate"
  46
+      @original_layout = HighVoltage.layout
  47
+      HighVoltage.layout = "alternate"
48 48
     end
49 49
 
50 50
     after(:all) do
51  
-      HighVoltage::layout = @original_layout
  51
+      HighVoltage.layout = @original_layout
52 52
     end
53 53
 
54 54
     describe "on GET to /pages/exists" do
@@ -63,12 +63,12 @@
63 63
 
64 64
   context "using custom content path" do
65 65
     before(:all) do
66  
-      @original_content_path = HighVoltage::content_path
67  
-      HighVoltage::content_path = "other_pages/"
  66
+      @original_content_path = HighVoltage.content_path
  67
+      HighVoltage.content_path = "other_pages/"
68 68
     end
69 69
 
70 70
     after(:all) do
71  
-      HighVoltage::content_path = @original_content_path
  71
+      HighVoltage.content_path = @original_content_path
72 72
     end
73 73
 
74 74
     describe "on GET to /other_pages/also_exists" do
6  spec/routing/routes_spec.rb
@@ -30,13 +30,13 @@
30 30
   context "using a custom content_path" do
31 31
 
32 32
     before(:all) do
33  
-      @original_content_path = HighVoltage::content_path
34  
-      HighVoltage::content_path = "other_pages/"
  33
+      @original_content_path = HighVoltage.content_path
  34
+      HighVoltage.content_path = "other_pages/"
35 35
       Rails.application.reload_routes!
36 36
     end
37 37
 
38 38
     after(:all) do
39  
-      HighVoltage::content_path = @original_content_path
  39
+      HighVoltage.content_path = @original_content_path
40 40
       Rails.application.reload_routes!
41 41
     end
42 42
 

0 notes on commit b43926f

Please sign in to comment.
Something went wrong with that request. Please try again.