Sha256: 8a333530ca125dcdc9220db9a49a916757715ddefdc66533aa02b8534bb0cb9e
Contents?: true
Size: 512 Bytes
Versions: 11
Compression:
Stored size: 512 Bytes
Contents
class TinyCmsViewsGenerator < Rails::Generator::Base def initialize *args super @source_root = options[:source] || File.join(spec.path, '..', '..') end def manifest record do |m| m.directory "app/views" directory = nil Dir.glob("#{@source_root}/app/views/**/*.erb").each do |file| file = file.gsub("#{ @source_root }/", "") m.directory directory = File.dirname(file) if directory != File.dirname(file) m.file file, file end end end end
Version data entries
11 entries across 11 versions & 1 rubygems