Commit f194d652 by liyijie

respond_resource without block

parent b248f5cd
...@@ -126,12 +126,12 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -126,12 +126,12 @@ class SimpleController::BaseController < ::InheritedResources::Base
def respond_resource(options: {}) def respond_resource(options: {})
options = { template: "#{self.class.view_path}/show", status: 201 }.merge options options = { template: "#{self.class.view_path}/show", status: 201 }.merge options
respond_with(*with_chain(resource), options, &block) respond_with(*with_chain(resource), options)
end end
def respond_collection(options: {}) def respond_collection(options: {})
options = { template: "#{self.class.view_path}/index" }.merge options options = { template: "#{self.class.view_path}/index" }.merge options
respond_with(*with_chain(collection), options, &block) respond_with(*with_chain(collection), options)
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment