From 25565858f439a1d74537ec1c8505427d0df84c73 Mon Sep 17 00:00:00 2001 From: Anatoli Makarevich Date: Tue, 17 Apr 2012 17:56:40 +0400 Subject: [PATCH] FIX preview button height and comments controller --- app/assets/stylesheets/buttons.css.scss | 4 ++++ app/controllers/comments_controller.rb | 2 +- app/views/posts/show.html.slim | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/buttons.css.scss b/app/assets/stylesheets/buttons.css.scss index b3328383..59b7efcf 100644 --- a/app/assets/stylesheets/buttons.css.scss +++ b/app/assets/stylesheets/buttons.css.scss @@ -5,4 +5,8 @@ &:active, &:hover, &:focus, &.active { color: $base; } +} + +.high_button { + height: 26px ! important; } \ No newline at end of file diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 428e70ae..900211fa 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -7,7 +7,7 @@ def create @comment.user = current_user render_preview and return if params[:commit] == 'Write' - if false#@comment.save + if @comment.save render_create else render_json_error("We are sorry, but comment couldn't be saved.") diff --git a/app/views/posts/show.html.slim b/app/views/posts/show.html.slim index a89f2155..5d0e67e6 100644 --- a/app/views/posts/show.html.slim +++ b/app/views/posts/show.html.slim @@ -26,7 +26,7 @@ section class="comments" id="comments" = f.label :question, 'Is it a Question?' div class="button-groups" div class="button-group" - = f.submit 'Preview', :class => 'button preview_button' + = f.submit 'Preview', :class => 'button preview_button high_button' = f.submit commit_title('Comment'), :class => 'button' - if @presenter.comments.any? = render :partial => 'comments/comment', :collection => @presenter.comments