Sha256: 731b1d262059f697a3295f68c17fb6a0d69f2c9a4d11fa019321f5c61b85e8b0

Contents?: true

Size: 606 Bytes

Versions: 12

Compression:

Stored size: 606 Bytes

Contents

require 'generators/haml'
require 'generators/erb/scaffold/scaffold_generator'

module Haml
  module Generators
    class ScaffoldGenerator < Erb::Generators::ScaffoldGenerator
      extend TemplatePath

      def copy_layout_file
        return unless options[:layout]
        template "layout.haml.erb",
                 File.join("app/views/layouts", controller_class_path, "#{controller_file_name}.html.haml")
      end

      protected

        def copy_view(view)
          template "#{view}.haml.erb", File.join("app/views", controller_file_path, "#{view}.html.haml")
        end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rails3-generators-0.5.4 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.5.3 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.5.2 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.5.1 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.5.0 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.4.0 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.3.3 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.3.2 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.3.1 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.3.0 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.2.0 lib/generators/haml/scaffold/scaffold_generator.rb
rails3-generators-0.1.0 lib/generators/haml/scaffold/scaffold_generator.rb