Sha256: 495523458f14032ad3a8df21b6d173864aa20c46db789e646cd50df47431f855

Contents?: true

Size: 704 Bytes

Versions: 22

Compression:

Stored size: 704 Bytes

Contents

require 'rails/generators/named_base'

module SimpleForm
  module Generators
    class Base < Rails::Generators::NamedBase #:nodoc:
      # include Rails::Generators::ResourceHelpers
      
      def self.source_root
        @_simple_form_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'simple_form', generator_name, 'templates'))
      end
      protected

      def format
        :html
      end

      def handler
        :erb
      end

      def filename_with_extensions(name)
        [name, format, handler].compact.join(".")
      end
      
      def template_filename_with_extensions(name)
        [name, format, handler, :erb].compact.join(".")
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

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