Created
December 17, 2010 14:37
-
-
Save coffeeaddict/745032 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Master::Application.routes.draw do | |
# ... bunch of resources | |
# resource-less controllers | |
{ 'statistics' => %w(select_period filter drop_filter apply_filters | |
add_filter show get_filter_values | |
), | |
'warehouse' => %w(delivery delivery_with_po delivery_without_po | |
add_product_field shipment_csv_line shipment_put | |
shipment_csv | |
), | |
'finance' => %w(balance show_balance vat show_vat invoices show_invoices | |
stats show_stats dokter_online dokter_online_create | |
buckaroo buckaroo_upload | |
), | |
}.each do |controller, methods| | |
# match index | |
match "/#{controller}" => "#{controller}#index" | |
# match all the special methods | |
methods.each do |method| | |
match "/#{controller}/#{method}" => "#{controller}##{method}" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment