lib/usher/route.rb in joshbuddy-usher-0.5.6 vs lib/usher/route.rb in joshbuddy-usher-0.5.7
- old
+ new
@@ -55,10 +55,10 @@
# set = Usher.new
# route = set.add_route('/test')
# route.to(:controller => 'testing', :action => 'index')
# set.recognize(Request.new('/test')).first.params => {:controller => 'testing', :action => 'index'}
def to(options = nil, &block)
- raise "cannot set destintaion as block and argument" if block_given? && options
+ raise "cannot set destination as block and argument" if block_given? && options
@destination = if block_given?
block
else
options.parent_route = self if options.respond_to?(:parent_route=)
options