Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/dobro/routes.rb
Instance Method Summary collapse
Instance Method Details
#dobro_for(*resources) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dobro/routes.rb', line 2 def dobro_for(*resources) = resources. outer_module, @scope[:module] = @scope[:module], nil resources.each do |res| Dobro.resources[res] = Dobro::Resource.new res, :namespace => @scope[:as] self.resources res, (res).merge() do member { get :delete } yield if block_given? end end @scope[:module] = outer_module end |