diff --git a/lib/generators/addon/addon_generator.rb b/lib/generators/addon/addon_generator.rb index 3decd5e77..79b7e0902 100644 --- a/lib/generators/addon/addon_generator.rb +++ b/lib/generators/addon/addon_generator.rb @@ -124,11 +124,11 @@ class AddonGenerator < Rails::Generators::NamedBase end # lib/.../.rb - folders_path_2 = @folders[0..-2].join('/') + folders_path_n = @folders[0..-2].join('/') file_name = @folders[-1] create_file( "addons/#{@addon_name}/lib/" \ - "#{folders_path_2}/#{file_name}.rb" + "#{folders_path_n}/#{file_name}.rb" ) do embed_into_modules { '' } end