Sha256: 9b4b4dc994e900d9fcb84f5110cb3b16304691636fd29f0427b6b977da48bcf6
Contents?: true
Size: 655 Bytes
Versions: 2
Compression:
Stored size: 655 Bytes
Contents
module ActionDispatch::Routing class Mapper def sortable_nested_set_for(category_type) item_type = category_type.to_s.classify.constantize.sns_items_type resources category_type do resources category_type, :as => "sub#{category_type}" resources item_type member do get :sns_toggle get :sns_add_subcategory get :sns_add_item delete :sns_destroy_category end collection do put :sns_sort end end resources item_type do delete :sns_destroy_item, :on => :member, :controller => category_type end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sortable_nested_set-0.2.3 | lib/sortable_nested_set/routes.rb |
sortable_nested_set-0.2.2 | lib/sortable_nested_set/routes.rb |