themes_on_rails
themes_on_rails copied to clipboard
Rails 6 support
Migrating to rails 6
In application controller we have
theme Proc.new { |controller|
unify_theme_pahts = ...
unify_theme_pahts ||= []
unify_theme_pahts.select { |path| /#{path}/ =~ controller.request.path }.count > 0 ? :theme1 : :theme2
}
On rails s an error occurs
3: from /home/user/project/app/controllers/application_controller.rb:3:in `<top (required)>'
2: from /home/user/project/app/controllers/application_controller.rb:10:in `<class:ApplicationController>'
1: from /home/user/.rvm/gems/ruby-2.6.5/bundler/gems/themes_on_rails-229eda1371a1/lib/themes_on_rails/controller_additions.rb:9:in `theme'
/home/user/.rvm/gems/ruby-2.6.5/bundler/gems/themes_on_rails-229eda1371a1/lib/themes_on_rails/action_controller.rb:29:in `apply_theme': nil is not a symbol nor a string (TypeError)
Could be fixed with https://github.com/chamnap/themes_on_rails/pull/45