Sha256: 22104264979127ff9737437ce1fee54e8e14b66ac39f9abc5422092ae996434a
Contents?: true
Size: 437 Bytes
Versions: 7
Compression:
Stored size: 437 Bytes
Contents
class RioFileController < ActionController::Base ssl_allowed :write if defined? SslRequirement protect_from_forgery :except => :write def write app_path = File.join(Rio::ROOT, "public", params[:path]) rio_path = File.join(RAILS_ROOT, "public", params[:path]) File.open(File.exists?(app_path) ? app_path : rio_path, "w") do |f| f.write(params[:content]) end render :text => "SUCCESS" end end
Version data entries
7 entries across 7 versions & 1 rubygems