Commit dc02605e by liyijie

set importable_class & exportable_class before defaults

parent f82c5c4f
...@@ -102,13 +102,13 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -102,13 +102,13 @@ class SimpleController::BaseController < ::InheritedResources::Base
@paginate_off = options.delete(:paginate_off) @paginate_off = options.delete(:paginate_off)
@distinct_off = options.delete(:distinct_off) @distinct_off = options.delete(:distinct_off)
set_view_path view_path if view_path.present?
super(options)
self.class_attribute :importable_class, instance_writer: false unless self.respond_to? :importable_class self.class_attribute :importable_class, instance_writer: false unless self.respond_to? :importable_class
self.class_attribute :exportable_class, instance_writer: false unless self.respond_to? :exportable_class self.class_attribute :exportable_class, instance_writer: false unless self.respond_to? :exportable_class
self.importable_class = options.delete(:importable_class) || self.resource_class self.importable_class = options.delete(:importable_class) || self.resource_class
self.exportable_class = options.delete(:exportable_class) || self.resource_class self.exportable_class = options.delete(:exportable_class) || self.resource_class
set_view_path view_path if view_path.present?
super(options)
end end
def set_view_path path def set_view_path path
......
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