Created
July 1, 2014 21:55
-
-
Save fernandomm/639c1ce87b866055c209 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def show | |
@post = current_user.posts.find_by_id params[:id] | |
unless @post | |
redirect_to posts_path, :alert => 'Post not found' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Olá Fernando,
Consegui fazer como você me orientou. Meu código ficou assim:
O problemas está resolvido. Brigadão pela ajuda! Mas apenas que o Alert/Flash não está funcionando nem em produção nem em desenvolvimento. Teria alguma dica?