prey / gdpr_rails

Rails Engine for the GDPR compliance
https://preyproject.com
MIT License
626 stars 62 forks source link

Allow string to be passed into config as well as constant, default should be string. #34

Closed mrsweaters closed 5 years ago

mrsweaters commented 5 years ago

Fixes: https://github.com/prey/gdpr_rails/issues/31

We should not load the constant directly in the initializer as this can break other dependencies.

Discussed in detail here: https://github.com/rails/rails/issues/32933#issuecomment-395919084

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 107


Changes Missing Coverage Covered Lines Changed/Added Lines %
app/jobs/policy_manager/exporter_job.rb 3 4 75.0%
app/mailers/policy_manager/portability_mailer.rb 7 8 87.5%
spec/controllers/policy_manager/portability_requests_controller_spec.rb 3 4 75.0%
<!-- Total: 21 24 87.5% -->
Totals Coverage Status
Change from base Build 106: -0.2%
Covered Lines: 819
Relevant Lines: 880

💛 - Coveralls
michelson commented 5 years ago

Thanks for this fix mr @mrsweaters , we will release asap

mrsweaters commented 5 years ago

Thanks!

beneggett commented 5 years ago

It appears the same initialization issues occur on admin_user if a different class is used for Admin than User.

Also, if Admin user is stringified, it breaks in different places.

When I get some more time I'll try to take a look into it

TeamRainless commented 4 years ago

It appears the same initialization issues occur on admin_user if a different class is used for Admin than User.

Also, if Admin user is stringified, it breaks in different places.

When I get some more time I'll try to take a look into it

Still having this issue. EXACTLY these circumstances. I have regular users as admin users with just a "superadmin" boolean. I keep getting the "has_one_attached" error. Any steps to work around this?