Permalink
Browse files

Always send options downstream.

  • Loading branch information...
josevalim committed Feb 18, 2010
1 parent 0997d5a commit cb5f354922fb8ccbb2144cd9be524d44fc892834
Showing with 8 additions and 8 deletions.
  1. +8 −8 lib/inherited_resources/actions.rb
@@ -3,26 +3,26 @@ module InheritedResources
module Actions
# GET /resources
- def index(&block)
- respond_with(*with_chain(collection), &block)
+ def index(options={}, &block)
+ respond_with(*(with_chain(collection) << options), &block)
end
alias :index! :index
# GET /resources/1
- def show(&block)
- respond_with(*with_chain(resource), &block)
+ def show(options={}, &block)
+ respond_with(*(with_chain(resource) << options), &block)
end
alias :show! :show
# GET /resources/new
- def new(&block)
- respond_with(*with_chain(build_resource), &block)
+ def new(options={}, &block)
+ respond_with(*(with_chain(build_resource) << options), &block)
end
alias :new! :new
# GET /resources/1/edit
- def edit(&block)
- respond_with(*with_chain(resource), &block)
+ def edit(options={}, &block)
+ respond_with(*(with_chain(resource) << options), &block)
end
alias :edit! :edit

0 comments on commit cb5f354

Please sign in to comment.