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