Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6 support #44

Open
thebravoman opened this issue Apr 22, 2020 · 1 comment
Open

Rails 6 support #44

thebravoman opened this issue Apr 22, 2020 · 1 comment

Comments

@thebravoman
Copy link

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
Copy link
Author

thebravoman commented Apr 22, 2020

Could be fixed with #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant