diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb4f83..848ea5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ### Unreleased +### 2.0.0 + +- Remove Tailwind CDN +- Add styles through asset pipeline +- Refactor JavaScript into an Import map (separate from the Rails app) + ### 1.2.10 - Fix compatibility with Pagy 8.x diff --git a/app/controllers/madmin/application_controller.rb b/app/controllers/madmin/application_controller.rb index eade8ec..3fb9020 100644 --- a/app/controllers/madmin/application_controller.rb +++ b/app/controllers/madmin/application_controller.rb @@ -1,5 +1,7 @@ module Madmin class ApplicationController < Madmin::BaseController + include Rails.application.routes.url_helpers + before_action :authenticate_admin_user def authenticate_admin_user diff --git a/app/helpers/madmin/application_helper.rb b/app/helpers/madmin/application_helper.rb index 48dc83b..a2a7bc7 100644 --- a/app/helpers/madmin/application_helper.rb +++ b/app/helpers/madmin/application_helper.rb @@ -1,6 +1,7 @@ module Madmin module ApplicationHelper include Pagy::Frontend + include Rails.application.routes.url_helpers def clear_search_params resource.index_path(sort: params[:sort], direction: params[:direction]) diff --git a/app/views/madmin/application/show.html.erb b/app/views/madmin/application/show.html.erb index 85b17fd..857aeeb 100644 --- a/app/views/madmin/application/show.html.erb +++ b/app/views/madmin/application/show.html.erb @@ -9,7 +9,7 @@