mrbrdo/has_moderated — Issue #4: Can not discard moderation
Author: saschadaniels
Created: 2011-11-29 16:27:57+00:00
State: open

I am usind has_moderated with carrier_wave.

rvm with ruby-1.9.2-p290

model:

include HasModerated::CarrierWave
has_moderated :carrierwave_photo

Accepting moderations works. Moderation gets destroyed, when file gets destroyed.

Discarding moderation fails:

Moderation.last.discard
Moderation Load (0.2ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
TypeError: can't convert Symbol into Integer
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/has_moderated-0.0.27/lib/has_moderated/carrier_wave.rb:27:in `[]'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/has_moderated-0.0.27/lib/has_moderated/carrier_wave.rb:27:in `moderatable_discard'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/has_moderated-0.0.27/lib/has_moderated/moderation_model.rb:166:in `discard'
from (irb):55
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:40:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'