lib/puffer/extensions/mapper.rb in puffer-0.0.7 vs lib/puffer/extensions/mapper.rb in puffer-0.0.8

- old
+ new

@@ -58,10 +58,15 @@ siblings.push resource.singular.to_sym @scope[:children] = siblings collection do post :create, options + controller._collections.each do |args| + opts = args.extract_options!.dup + args.push options.reverse_merge(opts) + send *args + end end new do get :new, options end @@ -69,10 +74,15 @@ member do get :edit, options get :show, options put :update, options delete :destroy, options + controller._members.each do |args| + opts = args.extract_options!.dup + args.push options.reverse_merge(opts) + send *args + end end end self @@ -109,10 +119,15 @@ collection do get :index, options post :create, options + controller._collections.each do |args| + opts = args.extract_options!.dup + args.push options.reverse_merge(opts) + send *args + end end new do get :new, options end @@ -120,9 +135,14 @@ member do get :edit, options get :show, options put :update, options delete :destroy, options + controller._members.each do |args| + opts = args.extract_options!.dup + args.push options.reverse_merge(opts) + send *args + end end end self end