Class: HotGlue::FlashNoticesInstallGenerator

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ FlashNoticesInstallGenerator

:nodoc:



11
12
13
14
15
# File 'lib/generators/hot_glue/flash_notices_install_generator.rb', line 11

def initialize(*args) #:nodoc:
  super
  copy_file "erb/_flash_notices.erb", "#{'spec/dummy/' if Rails.env.test?}app/views/layouts/_flash_notices.erb"

end

Instance Method Details

#filepath_prefixObject



5
6
7
8
# File 'lib/generators/hot_glue/flash_notices_install_generator.rb', line 5

def filepath_prefix
  # todo: inject the context
  'spec/dummy/' if $INTERNAL_SPECS
end