diff options
| author | Kir | 2011-11-03 19:07:54 +0400 |
|---|---|---|
| committer | Kir | 2011-11-03 19:07:54 +0400 |
| commit | a9c97ba576f190c18544919af477753c419036cf (patch) | |
| tree | 48c8a13e862fa249fad50420b077d6f9b1155d4f /app/controllers/speakers_controller.rb | |
| parent | e855fb8574570934cde28cfb190cc3cba31fbec0 (diff) | |
| download | inboxes-a9c97ba576f190c18544919af477753c419036cf.tar.bz2 | |
REST speakers controller, cganges in locale files
Diffstat (limited to 'app/controllers/speakers_controller.rb')
| -rw-r--r-- | app/controllers/speakers_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/speakers_controller.rb b/app/controllers/speakers_controller.rb index 17cedb9..db90dbe 100644 --- a/app/controllers/speakers_controller.rb +++ b/app/controllers/speakers_controller.rb @@ -13,7 +13,7 @@ class SpeakersController < ApplicationController def destroy @speaker = Speaker.find(params[:id]) @speaker.destroy - flash[:notice] = t("views.speakers.removed") + flash[:notice] = @speaker.user == current_user ? t("inboxes.discussions.leaved") : t("inboxes.speakers.removed") redirect_to @discussion.speakers.any? && @discussion.can_participate?(current_user) ? @discussion : discussions_url end @@ -21,6 +21,6 @@ class SpeakersController < ApplicationController def init_and_check_permissions @discussion = Discussion.find(params[:discussion_id]) - redirect_to discussions_url, :notice => t("views.discussions.can_not_participate") unless @discussion.can_participate?(current_user) + redirect_to discussions_url, :notice => t("inboxes.discussions.can_not_participate") unless @discussion.can_participate?(current_user) end end |
