Skip to content

Commit b5892a3

Browse files
committed
Add default methods for blueprint and blueprint_view
That will raise if child class does not implement its own methods.
1 parent 3f758d6 commit b5892a3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

admin/app/controllers/solidus_admin/resources_controller.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,15 @@ def after_update_path
155155
def after_destroy_path
156156
solidus_admin.send("#{plural_resource_name}_path", **search_filter_params)
157157
end
158+
159+
def blueprint
160+
raise NotImplementedError,
161+
"You must implement the blueprint method in #{self.class}"
162+
end
163+
164+
def blueprint_view
165+
raise NotImplementedError,
166+
"You must implement the blueprint_view method in #{self.class}"
167+
end
158168
end
159169
end

0 commit comments

Comments
 (0)