themes_on_rails icon indicating copy to clipboard operation
themes_on_rails copied to clipboard

Rails 6 support

Open thebravoman opened this issue 4 years ago • 1 comments

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)

thebravoman avatar Apr 22 '20 20:04 thebravoman

Could be fixed with https://github.com/chamnap/themes_on_rails/pull/45

thebravoman avatar Apr 22 '20 20:04 thebravoman