Draiken/opinio — Issue #2: NoMethodError undefined method warning for ActiveSupport::BufferedLogger
Author: fro
Created: 2011-12-20 15:12:19+00:00
State: open

Hi,

When I customize the destroy action:

comment_destroy_conditions do |comment|
(comment.owner == current_user) && !current_user.suspended?
end

The server return an http error 500:

Started DELETE "/comments/9" for 127.0.0.1 at 2011-12-20 16:04:55 +0100
Processing by Opinio::CommentsController#destroy as JS
Parameters: {"id"=>"9"}
Comment Load (0.4ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" = $1 LIMIT 1 [["id", "9"]]
User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 2 LIMIT 1
Completed 500 Internal Server Error in 277ms

NoMethodError (undefined method `warning' for #):
lib/middleware/flash_session_cookie_middleware.rb:16:in `call'

Rendered /Users/francois/.rvm/gems/ruby-1.9.2-p290@witineo/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.3ms)
Rendered /Users/francois/.rvm/gems/ruby-1.9.2-p290@witineo/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.9ms)
Rendered /Users/francois/.rvm/gems/ruby-1.9.2-p290@witineo/gems/actionpack-3.1.1/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (7.8ms)

Any ideas ?

- Rails version 3.1.1
- Ruby version 1.9.2p290
- Opinio version 0.3.1