Class: Mongomatic::Generators::ModelGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- Mongomatic::Generators::ModelGenerator
- Defined in:
- lib/rails/generators/mongomatic/model/model_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#connection ⇒ Object
22 23 24 |
# File 'lib/rails/generators/mongomatic/model/model_generator.rb', line 22 def connection [:connection] end |
#create_model_file ⇒ Object
30 31 32 |
# File 'lib/rails/generators/mongomatic/model/model_generator.rb', line 30 def create_model_file template "model.rb", File.join("app/models", class_path, "#{file_name}.rb") end |
#expectations? ⇒ Boolean
26 27 28 |
# File 'lib/rails/generators/mongomatic/model/model_generator.rb', line 26 def expectations? [:expectations] == true end |