Why is it that
@discussions = Discussion.where(:discussable => @discussable)
doesn't work. yet this work:
@discussions = Discussion.where(:discussable_id => @discussable.id, :discussable_type => @discussable.class.to_s)
Thanks.
Looks like pull request which fixes this issue was merged into master 1 month ago:
https://github.com/rails/rails/pull/7273
Unfortunately, it will be only released in Rails 4 :(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With