I have a scenario where I have to read index.js in my rails controller.
- index.js is located at
device/setup/index.js - the controller is located at
app/controllers/xxx_controller.rb
Inside controller method, I have to get this index.js and I can't seem to read it with File.open() or File.read(). I tried relative path.
How can I read index.js in my controller?