Module: Saucy::MapperExtensions

Defined in:
lib/saucy/routing_extensions.rb

Instance Method Summary collapse

Instance Method Details

#initialize(*args) ⇒ Object



9
10
11
12
# File 'lib/saucy/routing_extensions.rb', line 9

def initialize(*args)
  @through_scope = []
  super
end

#through(parent, &block) ⇒ Object



14
15
16
17
18
# File 'lib/saucy/routing_extensions.rb', line 14

def through(parent, &block)
  @through_scope << parent
  resources(parent, :only => [], &block)
  @through_scope.pop
end