Skip to content

Commit 061c0e4

Browse files
committed
oops!
1 parent dfb149f commit 061c0e4

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

lib/acoustic/controller.rb

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ def params
226226
def rendered?
227227
@_rendered == true
228228
end
229+
229230
private
230231

231232
# Create a new rendering engine for a template. Currently only supports

lib/acoustic/router.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def extract_regexp_and_capture_symbols(path)
112112
end
113113

114114
def unescape(string)
115-
URI.unescape(string).gsub('+', ' ')
115+
URI.unescape(string).gsub('+', ' ') unless string.nil?
116116
end
117117
end
118118

spec/acoustic/router_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
resolve('/another?test=1').should == {:controller => :another_test, :action => :index, :test=>'1'}
1616
resolve('/another/?test1=1&test2=2').should == {:controller => :another_test, :action => :index, :test1=>'1', :test2=>'2'}
1717
resolve('/another/?test%203=three%2Ffour').should == {:controller => :another_test, :action => :index, :'test 3'=>"three/four"}
18+
resolve('/another/?test').should == {:controller => :another_test, :action => :index, :test => nil}
1819
end
1920

2021
it 'should resolve a URI with params in the path' do

0 commit comments

Comments
 (0)