Commit 2a9ff66d by liyijie

feat: resource_params是array

parent 665d992a
...@@ -41,7 +41,7 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -41,7 +41,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
def update!(options={}, &block) def update!(options={}, &block)
# 可以传入resource_params进行方法复用 # 可以传入resource_params进行方法复用
_resource_params = options.delete(:resource_params) || resource_params _resource_params = Array.new(options.delete(:resource_params) || resource_params)
options = { template: "#{self.class.view_path}/show", status: 201 }.merge options options = { template: "#{self.class.view_path}/show", status: 201 }.merge options
object = resource object = resource
......
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