lib/usher/route.rb in joshbuddy-usher-0.3.0 vs lib/usher/route.rb in joshbuddy-usher-0.3.2
- old
+ new
@@ -14,10 +14,11 @@
@requirements = options.delete(:requirements)
@conditions = options.delete(:conditions)
@transformers = options.delete(:transformers)
@paths = @router.splitter.split(@original_path, @requirements, @transformers).collect {|path| Path.new(self, path)}
@primary_path = @paths.first
+ @params = []
end
# Sets +options+ on a route. Returns +self+.
#
@@ -25,10 +26,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)
- @params = options
+ @params << options
self
end
# Sets route as referenceable from +name+. Returns +self+.
#