Skip to content

Designator implementations reload is broken on Rails in development #3

Open
@vjt

Description

@vjt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions