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

Version Path
optimacms-0.1.25 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.24 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.23 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.21 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.19 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.17 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.15 app/controllers/optimacms/dev_controller.rb
optimacms-0.1.14 app/controllers/optimacms/dev_controller.rb