0

There are some statistic html files for admins who logged in as admin with devise gem on Rails 5, but if place it to public dir everybody(guest users and general users)can read those files. Where should those files be placed?

DIGITALSQUAD
  • 3,384
  • 3
  • 22
  • 24
  • Check this [answer](http://stackoverflow.com/a/1688840/3863146), it uses **thoughtbot high_voltage gem**. – Sahil Jan 11 '17 at 07:00
  • Possible duplicate of [How to do static content in Rails?](http://stackoverflow.com/questions/1146624/how-to-do-static-content-in-rails) – Sahil Jan 11 '17 at 07:01

1 Answers1

0

create files folder under assets and add following code in application.rb

config.assets.enabled = true
config.assets.paths << "#{Rails.root}/app/assets/files"

add assets/files path in your layout if user is admin.

puneet18
  • 4,341
  • 2
  • 21
  • 27