Sha256: 1202d9043e4bc492d60e272e1a711ef294622aab83510720e05a224536bfdb31

Contents?: true

Size: 669 Bytes

Versions: 22

Compression:

Stored size: 669 Bytes

Contents

require 'generators/formtastic'
require 'rails/generators/resource_helpers'

module Formtastic
  module Generators
    class ScaffoldGenerator < Base
      include Rails::Generators::ResourceHelpers

      argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"

      class_option :template_engine

      def copy_form_file
        filename = filename_with_extensions("_form")
        template template_filename_with_extensions("_form"), File.join("app/views", controller_file_path, filename)
      end

      protected

        def handler
          options[:template_engine].to_s.gsub('erubis', 'erb')
        end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
rails3-generators-0.17.6 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.17.5 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.17.4 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.17.3 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.17.2 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.17.1 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.17.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.16.1 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.16.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.15.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.14.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.13.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.12.1 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.12.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.11.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.10.3 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.10.2 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.10.1 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.10.0 lib/generators/formtastic/scaffold/scaffold_generator.rb
rails3-generators-0.9.2 lib/generators/formtastic/scaffold/scaffold_generator.rb