Module: ProjectFactoryMethods
- Defined in:
- lib/generators/voluntary/product_dummy/templates/features/step_definitions/project_steps.rb
Instance Method Summary collapse
Instance Method Details
#set_project_defaults(attributes) ⇒ Object
2 3 4 5 6 |
# File 'lib/generators/voluntary/product_dummy/templates/features/step_definitions/project_steps.rb', line 2 def set_project_defaults(attributes) attributes[:user_id] ||= @me.id if @me && !attributes[:user_id] attributes[:product_id] ||= @product.id if @product && !attributes[:product_id] attributes[:area_ids] ||= [Area.last.id] if Area.any? && !attributes[:area_ids] end |