Permalink
Browse files

Bugfix: obs update redirect bug.

  • Loading branch information...
1 parent f5f5d79 commit 96fca31bf2370fe6828c77d3d6920285554b6995 @kueda kueda committed Apr 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/observations_controller.rb
@@ -570,7 +570,7 @@ def update
unique_user_ids = @observations.map(&:user_id).uniq
if unique_user_ids.size > 1 || unique_user_ids.first != observation_user.id && !current_user.has_role?(:admin)
flash[:error] = "You don't have permission to edit that observation."
- return redirect_to @observation
+ return redirect_to (@observation || observations_path)
end
# Convert the params to a hash keyed by ID. Yes, it's weird

0 comments on commit 96fca31

Please sign in to comment.