diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0182aab..4824a96 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -24,7 +24,7 @@ class ApplicationController < ActionController::Base end def current_user_is_author?(article) - @current_user.id == article.user_id + @current_user && @current_user.id == article.user_id end def current_user_can_star?(article) diff --git a/app/views/articles/_comment_form.html.haml b/app/views/articles/_comment_form.html.haml index ba889da..a21db4c 100644 --- a/app/views/articles/_comment_form.html.haml +++ b/app/views/articles/_comment_form.html.haml @@ -22,4 +22,4 @@ $(this).tab('show'); preview('article_comment_content', 'preview'); }); - }); + }); \ No newline at end of file diff --git a/public/images/92f056f5-214a-4c03-b3a0-6cc61ebc116a.jpg b/public/images/92f056f5-214a-4c03-b3a0-6cc61ebc116a.jpg new file mode 100644 index 0000000..534ed16 Binary files /dev/null and b/public/images/92f056f5-214a-4c03-b3a0-6cc61ebc116a.jpg differ