I'm consuming a REST endpoint using ActiveResource which has Keys called among others ENV.OM_PRODUCER, ENV.UMS_PRODUCER.
These appear to be causing an issue with my view, I'm getting errors such as:
NameError in AppsController#index
wrong constant name ENV.UMSProducer
There is nothing else in the logs to help me, any suggestions.
Update: I was far from clear earlier.
I am not doing anything with the data yet, in my controller I have:
@apps = App.all
and in the view I have:
<%= @apps.inspect %>
It seems like ActiveResource is interpreting those ENV. keys and its causing an issue. It feels like I need them to be escaped but I don't know how.
Thanks to this post I determined it was due to the full stop in the key rather than the key name. Putting the code suggested in the post into a .rb file in initializers fixed the problem.