Skip to content

Commit

Permalink
Fix error responses. [#24]
Browse files Browse the repository at this point in the history
  • Loading branch information
marnen committed May 29, 2009
1 parent 13ea532 commit 63f2ecc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/events_controller.rb
Expand Up @@ -47,6 +47,11 @@ class EventsController < ApplicationController
redirect_to :action => :index
end

response_for :update_fails, :create_fails do
flash[:error] = _("We couldn't process that request. Please try again.")
render :new
end

response_for :show do
if !current_object.allow?(:show)
flash[:error] = _("You are not authorized to view that event.")
Expand Down

0 comments on commit 63f2ecc

Please sign in to comment.