diff --git a/backstage/app/controllers/backstage/dashboard_controller.rb b/backstage/app/controllers/backstage/dashboard_controller.rb index 294fa84..2c52e04 100644 --- a/backstage/app/controllers/backstage/dashboard_controller.rb +++ b/backstage/app/controllers/backstage/dashboard_controller.rb @@ -3,7 +3,6 @@ class Backstage::DashboardController < Backstage::BaseController before_action :authenticate_admin - def index readme_path = Backstage::Engine.root.join('README.md') @readme_content = File.exist?(readme_path) ? File.read(readme_path) : "Welcome to the Admin Panel" diff --git a/backstage/app/views/backstage/shared/_actions.erb b/backstage/app/views/backstage/shared/_actions.erb index 2624ae4..d0365be 100644 --- a/backstage/app/views/backstage/shared/_actions.erb +++ b/backstage/app/views/backstage/shared/_actions.erb @@ -1,10 +1,10 @@ <% resource.actions.each do |action| %> <% case action[:name] %> <% when :view %> - <%= link_to 'View', backstage.url_for(item), class: "text-blue-600 hover:text-blue-900 mr-2" %> + <%= link_to 'View', polymorphic_path([item]), class: "text-blue-600 hover:text-blue-900 mr-2" %> <% when :edit %> - <%= link_to 'Edit', "backstage.url_for(item, action: :edit)", class: "text-green-600 hover:text-green-900 mr-2" %> + <%= link_to 'Edit', edit_polymorphic_path([item]), class: "text-green-600 hover:text-green-900 mr-2" %> <% when :delete %> - <%= link_to 'Delete', backstage.url_for(item), data: {turbo_method: :delete, turbo_confirm: 'Are you sure?' }, class: "text-red-600 hover:text-red-900" %> + <%= link_to 'Delete', polymorphic_path([item]), data: {turbo_method: :delete, turbo_confirm: 'Are you sure?' }, class: "text-red-600 hover:text-red-900" %> <% end %> <% end %> \ No newline at end of file diff --git a/backstage/app/views/backstage/shared/_main_header.erb b/backstage/app/views/backstage/shared/_main_header.erb index ecae34f..73cd10d 100644 --- a/backstage/app/views/backstage/shared/_main_header.erb +++ b/backstage/app/views/backstage/shared/_main_header.erb @@ -39,22 +39,22 @@