Sha256: 9d699714df56286eace5923e1cfa77798b69fdb9699fb450f263d9fb615a2c06

Contents?: true

Size: 680 Bytes

Versions: 25

Compression:

Stored size: 680 Bytes

Contents

module Optimacms
  module PageServices
    module PageProcessService

      def compile_content(page_content)
        #res.gsub! /\{\{content\}\}/, page_content
        res = page_content

        res
      end

      def generate_view_name
        uid =SecureRandom.uuid.to_s
        id = uid.gsub /[^a-z\d]+/,''
        f_path = id+'.html.erb'
        #Digest::SHA1.hexdigest(Time.now.to_s)
        #filename = dir_cache+'/'+f_path
        f_path
        #'pages/2.html.erb'
      end

      def save_text_to_compiled_view(text)
        filename = compiled_view_filename
        File.open(filename, "w+") do |f|
          f.write(text)
        end
      end

    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
optimacms-0.1.61 lib/optimacms/page_services/page_process_service.rb
optimacms-0.4.3 lib/optimacms/page_services/page_process_service.rb
optimacms-0.4.2 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.9 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.8 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.7 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.6 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.5 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.2 lib/optimacms/page_services/page_process_service.rb
optimacms-0.3.1 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.23 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.22 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.19 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.18 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.17 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.8 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.7 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.6 lib/optimacms/page_services/page_process_service.rb
optimacms-0.2.5 lib/optimacms/page_services/page_process_service.rb
optimacms-0.1.60 lib/optimacms/page_services/page_process_service.rb