Class: Mongoid::Generators::cloudfujiGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Mongoid::Generators::cloudfujiGenerator
- Includes:
- cloudfujicloudfuji::Generatorscloudfuji::Generators::OrmHelpers
- Defined in:
- lib/generators/mongoid/cloudfuji_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_model ⇒ Object
8 9 10 |
# File 'lib/generators/mongoid/cloudfuji_generator.rb', line 8 def generate_model invoke "mongoid:model", [name] unless model_exists? end |
#inject_cloudfuji_content ⇒ Object
12 13 14 |
# File 'lib/generators/mongoid/cloudfuji_generator.rb', line 12 def inject_cloudfuji_content inject_into_file model_path, model_contents, :after => "include Mongoid::Document\n" end |