Skip to content

Commit

Permalink
Use dots instead of double colons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Berke-Williams committed Jun 5, 2012
1 parent 400d049 commit b43926f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions app/controllers/high_voltage/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class HighVoltage::PagesController < ApplicationController

unloadable
layout Proc.new { |_| HighVoltage::layout }
layout Proc.new { |_| HighVoltage.layout }

rescue_from ActionView::MissingTemplate do |exception|
if exception.message =~ %r{Missing template #{content_path}}
Expand All @@ -27,7 +27,7 @@ def clean_path
end

def content_path
HighVoltage::content_path
HighVoltage.content_path
end

end
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Rails.application.routes.draw do
match "/#{HighVoltage::content_path}*id" => 'high_voltage/pages#show', :as => :page, :format => false
match "/#{HighVoltage.content_path}*id" => 'high_voltage/pages#show', :as => :page, :format => false

end
2 changes: 1 addition & 1 deletion gemfiles/rails-3.0.13.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH
remote: /Users/mjankowski/Development/opensource/high_voltage
remote: /Users/gabe/thoughtbot/open-source/high_voltage
specs:
high_voltage (1.1.1)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails-3.1.5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH
remote: /Users/mjankowski/Development/opensource/high_voltage
remote: /Users/gabe/thoughtbot/open-source/high_voltage
specs:
high_voltage (1.1.1)

Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails-3.2.5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PATH
remote: /Users/mjankowski/Development/opensource/high_voltage
remote: /Users/gabe/thoughtbot/open-source/high_voltage
specs:
high_voltage (1.1.1)

Expand Down
12 changes: 6 additions & 6 deletions spec/controllers/pages_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@

context "using custom layout" do
before(:all) do
@original_layout = HighVoltage::layout
HighVoltage::layout = "alternate"
@original_layout = HighVoltage.layout
HighVoltage.layout = "alternate"
end

after(:all) do
HighVoltage::layout = @original_layout
HighVoltage.layout = @original_layout
end

describe "on GET to /pages/exists" do
Expand All @@ -63,12 +63,12 @@

context "using custom content path" do
before(:all) do
@original_content_path = HighVoltage::content_path
HighVoltage::content_path = "other_pages/"
@original_content_path = HighVoltage.content_path
HighVoltage.content_path = "other_pages/"
end

after(:all) do
HighVoltage::content_path = @original_content_path
HighVoltage.content_path = @original_content_path
end

describe "on GET to /other_pages/also_exists" do
Expand Down
6 changes: 3 additions & 3 deletions spec/routing/routes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
context "using a custom content_path" do

before(:all) do
@original_content_path = HighVoltage::content_path
HighVoltage::content_path = "other_pages/"
@original_content_path = HighVoltage.content_path
HighVoltage.content_path = "other_pages/"
Rails.application.reload_routes!
end

after(:all) do
HighVoltage::content_path = @original_content_path
HighVoltage.content_path = @original_content_path
Rails.application.reload_routes!
end

Expand Down

0 comments on commit b43926f

Please sign in to comment.