Skip to content

Commit

Permalink
Merge pull request #5883 from nvandoorn/4860-deprecate-and-remove-das…
Browse files Browse the repository at this point in the history
…hboards-code

Deprecate and remove dashboard code
  • Loading branch information
tvdeyen authored Nov 4, 2024
2 parents 78e5f28 + 80dcf59 commit d955ca4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 36 deletions.
4 changes: 4 additions & 0 deletions backend/app/controllers/spree/admin/dashboards_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
module Spree
module Admin
class DashboardsController < BaseController
before_action :deprecate
def deprecate
Spree.deprecator.warn "The #{self.class.name} is deprecated. If you still use dashboards, please copy all controllers and views from solidus_backend to your application."
end
end
end
end
1 change: 1 addition & 0 deletions backend/app/views/spree/admin/dashboards/home.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<%# Placeholder view for a home dashboard %>
<p><%= Spree.deprecator.warn "The Home view is deprecated, If you still use dashboards, please copy all controllers and views from solidus_backend to your application." %></p>
2 changes: 2 additions & 0 deletions core/lib/spree/permission_sets/dashboard_display.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def category
end

def activate!
Spree.deprecator.warn "The #{self.class.name} module is deprecated. " \
"If you still use dashboards, please copy all controllers and views from #{self.class.name} to your application."
can [:admin, :home], :dashboards
end
end
Expand Down
36 changes: 0 additions & 36 deletions core/spec/models/spree/permission_sets/dashboard_display_spec.rb

This file was deleted.

0 comments on commit d955ca4

Please sign in to comment.