Class: Hangar::ResourcesController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Hangar::ResourcesController
- Defined in:
- app/controllers/hangar/resources_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
4 5 6 7 |
# File 'app/controllers/hangar/resources_controller.rb', line 4 def create created = FactoryGirl.create resource, *traits, resource_attributes render json: created.as_json(include: includes) end |
#new ⇒ Object
9 10 11 12 |
# File 'app/controllers/hangar/resources_controller.rb', line 9 def new attributes = FactoryGirl.attributes_for resource, *traits, resource_attributes render json: attributes end |