summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1/tutorials_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/v1/tutorials_controller.rb')
-rw-r--r--app/controllers/api/v1/tutorials_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/api/v1/tutorials_controller.rb b/app/controllers/api/v1/tutorials_controller.rb
index 589012a5..c257f707 100644
--- a/app/controllers/api/v1/tutorials_controller.rb
+++ b/app/controllers/api/v1/tutorials_controller.rb
@@ -8,7 +8,9 @@ module Api
end
def create
- respond_with(@tutorial = current_user.tutorials.create!(tutorial_params))
+ @tutorial = current_user.tutorials.create!(tutorial_params)
+ current_user.tag(@tutorial, with: params[:tutorial][:tags], on: :tags)
+ respond_with(@tutorial)
end
private