Sha256: 8bc1e140a76674c0cae61f2158e9d1a05d1cd0e4ff3f1a03df0096b206f96c5c
Contents?: true
Size: 842 Bytes
Versions: 12
Compression:
Stored size: 842 Bytes
Contents
require 'sugar-high/path' require 'generators/views/haml_util' module Cream module Generators class ViewsGenerator < Rails::Generators::Base desc "Copies all Cream views to your application." argument :scope, :required => false, :default => nil, :desc => "The scope to copy views to" class_option :haml, :type => :boolean, :default => "erb", :desc => "Use HAML" def self.source_root @_devise_source_root ||= File.expand_path("app/views".up(4), __FILE__) end def copy_views if options[:haml] create_and_copy_haml_views else copy_erb_views end end protected def copy_erb_views directory "cream", "app/views/#{scope || 'devise'}" end include Cream::Generators::HamlUtil end end end
Version data entries
12 entries across 12 versions & 1 rubygems