Commit 2fabf855 by liyijie

feat: use self class_name for excel_class_name if resource_class is blank?

parent 9c35be54
...@@ -156,6 +156,8 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -156,6 +156,8 @@ class SimpleController::BaseController < ::InheritedResources::Base
end end
def excel_class_name def excel_class_name
return name if resource_class.blank?
unless @excel_class_name.present? unless @excel_class_name.present?
resource_class_name_arr = resource_class.name.split('::') resource_class_name_arr = resource_class.name.split('::')
@excel_class_name = if resource_class_name_arr.size > 1 @excel_class_name = if resource_class_name_arr.size > 1
......
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