Sha256: aafa47a1eeea19d5c61a3ce2445114eb9f551c06db38efce178f892050bb18dc

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

module I0n
  module Generators
    class LayoutGenerator < Rails::Generators::Base

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

      def setup_application
        application do
          "
      config.generators do |g|
        g.stylesheets false
        g.template_engine :haml
      end
          "
        end  
      end

      def create_compass_config
        copy_file "config/initializers/compass.rb", "#{Rails.root}/config/initializers/compass.rb" 
        copy_file "config/compass.rb", "#{Rails.root}/config/compass.rb"
      end

      def create_sass_extensions
        copy_file "lib/sass_extensions.rb", "#{Rails.root}/lib/sass_extensions.rb" 
      end

      def create_sass_directory
        directory "app/sass", "#{Rails.root}/app/sass"    
      end

      def create_layout
        copy_file "app/views/layouts/application.haml", "#{Rails.root}/app/views/layouts/application.haml"
        copy_file "app/views/shared/_error_messages.haml", "#{Rails.root}/app/views/shared/_error_messages.haml" 
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i0n_rails3_generators-0.2.7 lib/generators/i0n/layout/layout_generator.rb