lib/generators/ecm/downloads/install/install_generator.rb in ecm_downloads2-1.2.2 vs lib/generators/ecm/downloads/install/install_generator.rb in ecm_downloads2-2.0.0
- old
+ new
@@ -1,16 +1,21 @@
module Ecm
module Downloads
module Generators
class InstallGenerator < Rails::Generators::Base
- desc "Generates the intializer"
+ desc 'Generates the intializer'
source_root File.expand_path('../templates', __FILE__)
- def generate_intializer
- copy_file "ecm_downloads.rb", "config/initializers/ecm_downloads.rb"
+ def generate_initializer
+ copy_file 'initializer.rb', 'config/initializers/ecm_downloads.rb'
end
+
+ def generate_routes
+ inject_into_file 'config/routes.rb', before: "\nend" do
+ File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
+ end
+ end
end
end
end
end
-