Sha256: 63e13f646fd70cbb77af310bffd6bf9ed75003d20c2264d1a66ef04a1ea9f196

Contents?: true

Size: 785 Bytes

Versions: 8

Compression:

Stored size: 785 Bytes

Contents

require 'rails/generators/named_base'
require 'rails/generators/migration'
require 'rails/generators/active_model'

require 'generators/helpers/migration_helper'

module ActiveModel
  module Generators
    class Base < Rails::Generators::NamedBase #:nodoc:

      def self.source_root
        @_activemodel_source_root ||= File.expand_path(File.join(File.dirname(__FILE__),
                                                      'active_model', generator_name, 'templates'))
      end

    end

    class ActiveModel < Rails::Generators::ActiveModel #:nodoc:
    end
  end
end

module Rails
  module Generators
    class GeneratedAttribute #:nodoc:
      def type_class
        return 'DateTime' if type.to_s == 'datetime'
        return type.to_s.camelcase
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails3-generators-1.0.0 lib/generators/active_model.rb
rails3-generators-0.17.6 lib/generators/active_model.rb
rails3-generators-0.17.5 lib/generators/active_model.rb
rails3-generators-0.17.4 lib/generators/active_model.rb
rails3-generators-0.17.3 lib/generators/active_model.rb
rails3-generators-0.17.2 lib/generators/active_model.rb
rails3-generators-0.17.1 lib/generators/active_model.rb
rails3-generators-0.17.0 lib/generators/active_model.rb