mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
17 lines
457 B
Ruby
17 lines
457 B
Ruby
module Devise
|
|
module Generators
|
|
class DeviseGenerator < Rails::Generators::NamedBase
|
|
namespace "devise"
|
|
source_root File.expand_path("../templates", __FILE__)
|
|
|
|
desc "Generates a model with the given NAME (if one does not exist) with devise " <<
|
|
"configuration plus a migration file and devise routes."
|
|
|
|
hook_for :orm
|
|
|
|
def add_devise_routes
|
|
route "devise_for :#{table_name}"
|
|
end
|
|
end
|
|
end
|
|
end
|