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/install_generator.rb
Paul Bellamy 0bcf71f8df Rails has removed SecureRandom from ActiveSupport in Rails 3.2,
deprecated

* Changing references in generators and encryptable_test
2011-05-28 14:44:54 +01:00

24 lines
599 B
Ruby

require 'securerandom'
module Devise
module Generators
class InstallGenerator < Rails::Generators::Base
source_root File.expand_path("../../templates", __FILE__)
desc "Creates a Devise initializer and copy locale files to your application."
class_option :orm
def copy_initializer
template "devise.rb", "config/initializers/devise.rb"
end
def copy_locale
copy_file "../../../config/locales/en.yml", "config/locales/devise.en.yml"
end
def show_readme
readme "README" if behavior == :invoke
end
end
end
end