mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Added Controller Generator and tests to go along with it.
This commit is contained in:
18
lib/generators/devise/controllers_generator.rb
Normal file
18
lib/generators/devise/controllers_generator.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'tmpdir'
|
||||
|
||||
module Devise
|
||||
module Generators
|
||||
class ControllersGenerator < Rails::Generators::Base
|
||||
source_root File.expand_path("../../../../app/controllers", __FILE__)
|
||||
desc "Copies all Devise controllers to your application."
|
||||
|
||||
argument :scope, :required => false, :default => nil,
|
||||
:desc => "The scope to copy controllers to"
|
||||
|
||||
|
||||
def copy_controllers
|
||||
directory "devise", "app/controllers/#{scope || :devise}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user