Class: Devise::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/devise/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_initializerObject



12
13
14
# File 'lib/generators/devise/install_generator.rb', line 12

def copy_initializer
  template "devise.rb", "config/initializers/devise.rb"
end

#copy_localeObject



16
17
18
# File 'lib/generators/devise/install_generator.rb', line 16

def copy_locale
  copy_file "../../../config/locales/en.yml", "config/locales/devise.en.yml"
end

#rails_4?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/generators/devise/install_generator.rb', line 24

def rails_4?
  Rails::VERSION::MAJOR == 4
end

#show_readmeObject



20
21
22
# File 'lib/generators/devise/install_generator.rb', line 20

def show_readme
  readme "README" if behavior == :invoke
end