Sha256: fa479956c0c702225cacc6075ac4c5df097d592b0ded6943120ed286b4c82a5e
Contents?: true
Size: 705 Bytes
Versions: 8
Compression:
Stored size: 705 Bytes
Contents
module Optimacms class DevController < ApplicationController def file from = 'D:/mmx/projects/www/myrails/cms/site/test/dummy/public/files/1/cat_red.jpg' to = 'D:/mmx/projects/www/myrails/cms/site/test/dummy/public/files/1/supercat.jpg' f = 'D:/mmx/projects/www/myrails/cms/site/test/dummy/public/uploads/funny-cats-and-kittens-wallpapers-12.jpg' #FileUtils.move(from, to) require 'pathname' p = Pathname.new(f) p.unlink #FileUtils.rm(f) end def addadminuser row = Optimacms::CmsAdminUser.new row.email = 'admin@example.com' row.password = 'admin' row.save end end end
Version data entries
8 entries across 8 versions & 1 rubygems