Sha256: adc555b74c9fb4966032e8188f4bee3c89cbeb04f2d294f4670478d1e2563a42
Contents?: true
Size: 703 Bytes
Versions: 10
Compression:
Stored size: 703 Bytes
Contents
require 'rails/generators' module BaiduUeditorRails module Generators class InstallGenerator < ::Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) desc "This generator installs baidu ueditor custom config" def add_custom_config if File.exist?("app/assets/javascripts/ueditor_custom_config.js") js = File.read("app/assets/javascripts/ueditor_custom_config.js") insert_into_file "app/assets/javascripts/ueditor_custom_config.js", js, :after => "ueditor custom config\n" else copy_file "ueditor_custom_config.js", "app/assets/javascripts/ueditor_custom_config.js" end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems