Module: Relation::Generators::OrmHelpers
- Included in:
- RelationGenerator
- Defined in:
- lib/generators/relation/orm_helpers.rb
Instance Method Summary collapse
Instance Method Details
#model_exists?(model_name) ⇒ Boolean
4 5 6 |
# File 'lib/generators/relation/orm_helpers.rb', line 4 def model_exists?(model_name) File.exists?(File.join(destination_root, model_path(model_name))) end |
#model_path(model_name) ⇒ Object
8 9 10 |
# File 'lib/generators/relation/orm_helpers.rb', line 8 def model_path(model_name) File.join("app", "models", "#{model_name}.rb") end |