Sha256: a325b0c583b2befc321cd46776a7e00022f783ff33f013eec6fb197454b256a5
Contents?: true
Size: 632 Bytes
Versions: 69
Compression:
Stored size: 632 Bytes
Contents
# encoding: utf-8 require "rails/generators/named_base" require "rails/generators/active_model" module Mongoid module Generators class Base < ::Rails::Generators::NamedBase def self.source_root @_mongoid_source_root ||= File.expand_path("../#{base_name}/#{generator_name}/templates", __FILE__) end end end end module Rails module Generators class GeneratedAttribute def type_class return "Time" if type == :datetime return "String" if type == :text return "Mongoid::Boolean" if type == :boolean type.to_s.camelcase end end end end
Version data entries
69 entries across 64 versions & 3 rubygems