app/controllers/optimacms/dev_controller.rb in optimacms-0.2.2 vs app/controllers/optimacms/dev_controller.rb in optimacms-0.2.3

- old
+ new

@@ -1,40 +1,40 @@ -module Optimacms - class DevController < ApplicationController - - before_filter :check_env - - def check_env - return false unless Rails.env.development? - end - - 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 - return - - row = Optimacms::CmsAdminUser.new - row.email = 'admin@example.com' - row.password = 'password' - - row.save - end - end - - - -end - +module Optimacms + class DevController < ApplicationController + + before_filter :check_env + + def check_env + return false unless Rails.env.development? + end + + 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 + return + + row = Optimacms::CmsAdminUser.new + row.email = 'admin@example.com' + row.password = 'password' + + row.save + end + end + + + +end +