1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/generators/devise/views_generator.rb

21 lines
668 B
Ruby
Raw Normal View History

2010-12-25 05:07:52 -05:00
require 'tmpdir'
module Devise
module Generators
class ViewsGenerator < Rails::Generators::Base
source_root File.expand_path("../../../../app/views", __FILE__)
desc "Copies all Devise views to your application."
argument :scope, :required => false, :default => nil,
:desc => "The scope to copy views to"
2011-04-05 16:06:27 -04:00
# class_option :template_engine, :type => :string, :aliases => "-t",
# :desc => "Template engine for the views. Available options are 'erb', 'haml' and 'slim'."
def copy_views
2011-04-05 16:06:27 -04:00
directory "devise", "app/views/#{scope || :devise}"
end
end
end
end