Sha256: 6cdfe54b88017a2b74ae2ac365e8550179a5171641d8371e059456adb764ec75

Contents?: true

Size: 554 Bytes

Versions: 1

Compression:

Stored size: 554 Bytes

Contents

require 'generators/erb'
require 'rails/generators/erb/scaffold/scaffold_generator'

module Erb
  module Generators
    class ScaffoldGenerator
      extend TemplatePath

      hook_for :form_builder, :as => :scaffold

      def copy_form_file
        if options[:form_builder].nil?
          filename = filename_with_extensions("_form")
          template filename, File.join("app/views", controller_file_path, filename)
        end
      end

      protected
        def available_views
          %w(index edit show new)
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bootstrap-generators-0.0.1 lib/generators/erb/scaffold/scaffold_generator.rb