Class: FactoryGirlApi::FactoriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- FactoryGirlApi::FactoriesController
- Defined in:
- app/controllers/factory_girl_api/factories_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 |
# File 'app/controllers/factory_girl_api/factories_controller.rb', line 3 def create model = FactoryGirl.create(factory_name, *traits, attributes) render json: model, status: :created end |