app/controllers/optimacms/dev_controller.rb in optimacms-0.1.25 vs app/controllers/optimacms/dev_controller.rb in optimacms-0.1.27

- old
+ new

@@ -1,8 +1,14 @@ 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' @@ -16,9 +22,11 @@ #FileUtils.rm(f) end def addadminuser + return + row = Optimacms::CmsAdminUser.new row.email = 'admin@example.com' row.password = 'admin' row.save