Module: Cloudfuji::Generators::OrmHelpers
- Included in:
- ActiveRecord::Generators::CloudfujiGenerator
- Defined in:
- lib/generators/cloudfuji/orm_helpers.rb
Instance Method Summary collapse
Instance Method Details
#model_contents ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/generators/cloudfuji/orm_helpers.rb', line 4 def model_contents <<-CONTENT # Bind to a shared Cloudfuji model cloudfuji :customer_lead CONTENT end |
#model_exists? ⇒ Boolean
12 13 14 |
# File 'lib/generators/cloudfuji/orm_helpers.rb', line 12 def model_exists? File.exists?(File.join(destination_root, model_path)) end |
#model_path ⇒ Object
16 17 18 |
# File 'lib/generators/cloudfuji/orm_helpers.rb', line 16 def model_path @model_path ||= File.join("app", "models", "#{file_path}.rb") end |