Getting absolute path to the file inside the public folder in Rails

后端 未结 1 1872
有刺的猬
有刺的猬 2021-02-05 08:21

What is the best way to get absolute path to the file inside the public folder in controller? Is there a predefined Rails variable that holds absolute path to the public folder?

相关标签:
1条回答
  • 2021-02-05 08:44

    Rails.public_path should provide you the public path

    0 讨论(0)
提交回复
热议问题