ruby on rails - Managing static pages from admin interface -


i have few static pages(contacts, about us, etc) in rails app. admin interface realized separating routes(namespace :admin ...). how can manage static(!) content in static pages admin interface? thanks

i recommend using authorization solution ryan bates' cancan or elabs' pundit.
there can define ability admin-users regarding restful actions in :admin namespace.

then can use ruby's file class (docs 1.9.3 or 2.0) manipulate files (only when users admins) want to.

but aware of caching mechanisms:
if caching these files (e.g. on server nginx, unicorn or caching-solution e.g. varnish, squid), must purged out of cache can view changes.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -