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

Compatible Redmine3.4 #1

Closed
akiko-pusu opened this issue Jul 2, 2017 · 2 comments
Closed

Compatible Redmine3.4 #1

akiko-pusu opened this issue Jul 2, 2017 · 2 comments

Comments

@akiko-pusu
Copy link

@akiko-pusu akiko-pusu commented Jul 2, 2017

Hi, thank you so much for your plugin!
It seems Redmine 3.4 handles UserPreference’s attributes as “safe_attributes".
Ref. http://www.redmine.org/projects/redmine/repository/revisions/15688

I hope this workaround is effective, If you still have a little trouble.

diff -r 6f38e6c29df3 -r a199f51b7ff4 lib/theme_changer_user_patch.rb
--- a/lib/theme_changer_user_patch.rb	Sat Feb 21 08:38:06 2015 +0900
+++ b/lib/theme_changer_user_patch.rb	Mon Jul 03 00:49:56 2017 +0900
@@ -21,14 +21,14 @@
 
     base.class_eval do
       unloadable # Send unloadable so it will not be unloaded in development
-     
+      safe_attributes :theme if defined?(safe_attributes)
     end
 
   end
 end
 
 module UserPreferenceInstanceMethodsForThemeChanger
-  
+
   def theme
     theme_setting = ThemeChangerUserSetting.find_theme_by_user_id(user.id)
     return nil unless theme_setting

@haru

This comment has been minimized.

Copy link
Owner

@haru haru commented Jul 2, 2017

Thanks! It works.

@akiko-pusu

This comment has been minimized.

Copy link
Author

@akiko-pusu akiko-pusu commented Jul 2, 2017

Nice to hear that, and many thanks for your speedy response.
Please close this report.

@haru haru closed this Jul 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.