From 37fcf0bf3961b15eb26fc76806149b39fd72ff57 Mon Sep 17 00:00:00 2001 From: Behdad Baniani Date: Fri, 27 Dec 2013 19:13:33 -0500 Subject: [PATCH] Add user microposts --- app/controllers/microposts_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/microposts_controller.rb b/app/controllers/microposts_controller.rb index 92c6d6b..6b8c448 100644 --- a/app/controllers/microposts_controller.rb +++ b/app/controllers/microposts_controller.rb @@ -1,5 +1,6 @@ class MicropostsController < ApplicationController - before_action :signed_in_user + before_action :signed_in_user, only: [:create, :destroy] + before_action :correct_user, only: :destroy def create @micropost = current_user.microposts.build(micropost_params)