Skip to content

Designator implementations reload is broken on Rails in development #3

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

Open
vjt opened this issue Mar 1, 2015 · 0 comments
Open

Designator implementations reload is broken on Rails in development #3

vjt opened this issue Mar 1, 2015 · 0 comments
Labels

Comments

@vjt
Copy link
Contributor

vjt commented Mar 1, 2015

It seems that when to_prepare is invoked on Rails 3.2 reloading is not yet complete, and the Object namespace is still populated with the old constants (speculating, in-depth analysis not done).

Designators lookup should be evaluated lazily.

Workaround

Forcibly reload designators implementations at the top of config/authorization.rb:

# HACK HACK HACK HACK
# Work around Eaco bug https://github.com/ifad/eaco/issues/3
# FIXME FIXME FIXME
#
if Rails.env.development?
  load './app/models/user.rb'
  Dir['./app/models/user/designators/*.rb'].each {|f| load f}
end
@vjt vjt added the bug label Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant