Sha256: 7def2bb1724a8d2e026134b85cda2ebfe79f23384aa7cb4d95c7aebda893d116

Contents?: true

Size: 575 Bytes

Versions: 6

Compression:

Stored size: 575 Bytes

Contents

module Ecm
  module Pictures
    module Generators
      class InstallGenerator < Rails::Generators::Base
        desc 'Generates the intializer'

        source_root File.expand_path('../templates', __FILE__)

        def generate_initializer
          copy_file 'initializer.rb', 'config/initializers/ecm_pictures.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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ecm_pictures2-2.1.4 lib/generators/ecm/pictures/install/install_generator.rb
ecm_pictures2-2.1.3 lib/generators/ecm/pictures/install/install_generator.rb
ecm_pictures2-2.1.2 lib/generators/ecm/pictures/install/install_generator.rb
ecm_pictures2-2.1.1 lib/generators/ecm/pictures/install/install_generator.rb
ecm_pictures2-2.1.0 lib/generators/ecm/pictures/install/install_generator.rb
ecm_pictures2-2.0.0 lib/generators/ecm/pictures/install/install_generator.rb