Class: HasMedia::Generators::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_initializerObject



9
10
11
# File 'lib/generators/has_media/install_generator.rb', line 9

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

#copy_localeObject



13
14
15
# File 'lib/generators/has_media/install_generator.rb', line 13

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

#show_readmeObject



19
20
21
# File 'lib/generators/has_media/install_generator.rb', line 19

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