From a0f0c24f88d646728e8232809985c0c68b431a79 Mon Sep 17 00:00:00 2001 From: Pavel Chipiga Date: Sat, 3 Mar 2012 03:05:19 +0200 Subject: [PATCH] Fix flash messages. Add styles. Refs #263 --- app/assets/stylesheets/design/custom.scss | 2 ++ app/controllers/groups_controller.rb | 2 +- app/controllers/projects_controller.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index 2b0f028c4..75a786165 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -283,6 +283,8 @@ div.comment div.comment-right { float: right; } +div.comment textarea { resize: none } + #repo-wrapper div.file div.data .formatted { overflow-x: auto; overflow-y: none; diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 9dad1d7b0..09b12a4eb 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -46,7 +46,7 @@ class GroupsController < ApplicationController redirect_to group_path(@group) else flash[:error] = t('flash.group.save_error') - flash[:warning] = @group.errors[:base] + flash[:warning] = @group.errors.full_messages.join('. ') render :action => :new end end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index ecc700762..738bdf950 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -52,7 +52,7 @@ class ProjectsController < ApplicationController redirect_to @project else flash[:error] = t('flash.project.save_error') - flash[:warning] = @project.errors[:base] + flash[:warning] = @project.errors.full_messages.join('. ') render :action => :new end end