lib/puffer/extensions/mapper.rb in puffer-0.0.25 vs lib/puffer/extensions/mapper.rb in puffer-0.0.26
- old
+ new
@@ -67,14 +67,14 @@
@scope[:children] = siblings
collection do
get '/event/:fieldset/:field/:event(/:identifer)', options.merge(:action => :event, :as => :event)
post :create, options
- controller._collections.each do |args|
- opts = args.extract_options!.dup
- args.push options.reverse_merge(opts)
- send *args
+ controller._collections.each do |action|
+ opts = action.route.extract_options!.dup
+ action.route.push options.reverse_merge(opts)
+ send *action.route
end
end
new do
get :new, options
@@ -83,14 +83,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
+ controller._members.each do |action|
+ opts = action.route.extract_options!.dup
+ action.route.push options.reverse_merge(opts)
+ send *action.route
end
end
end
@@ -129,14 +129,14 @@
collection do
get :index, options
get '/event/:fieldset/:field/:event(/:identifer)', options.merge(:action => :event, :as => :event)
post :create, options
- controller._collections.each do |args|
- opts = args.extract_options!.dup
- args.push options.reverse_merge(opts)
- send *args
+ controller._collections.each do |action|
+ opts = action.route.extract_options!.dup
+ action.route.push options.reverse_merge(opts)
+ send *action.route
end
end
new do
get :new, options
@@ -145,13 +145,13 @@
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
+ controller._members.each do |action|
+ opts = action.route.extract_options!.dup
+ action.route.push options.reverse_merge(opts)
+ send *action.route
end
end
end
self