Commit 9d258c24 by liyijie

update update with 201 & show view

parent f5287604
......@@ -13,6 +13,10 @@ class SimpleController::BaseController < ::InheritedResources::Base
create!
end
def update
update!
end
def index!(options={}, &block)
options = { template: "#{self.class.view_path}/index" }.merge options
super(options, &block)
......@@ -28,6 +32,11 @@ class SimpleController::BaseController < ::InheritedResources::Base
super(options, &block)
end
def update!(options={}, &block)
options = { template: "#{self.class.view_path}/show", status: 201 }.merge options
super(options, &block)
end
def upload_excel
excel = importable_class.import_excel_klass.new
excel.load(params[:file])
......
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