Not work with act_as_paranoid plugin #6

evgenii opened this Issue May 12, 2011 · 0 comments


None yet
1 participant

evgenii commented May 12, 2011

Hi it's seems like this plugin not work with act_as_paranoid ((

Use like this:

has_many :dependent_group_relations, :dependent => :destroy
with_options :uniq => true do |w|
w.has_many :shared_dependents, :through => :dependent_group_relations, :source => :dependent
w.has_many :shared_users, :through => :shared_dependents, :source => :user

And have a problem:

ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'dependents.group_id' in 'where clause': SELECT DISTINCT users.* FROM users INNER JOIN dependents ON = dependents.user_id WHERE ((dependents.group_id = 2) AND ((dependent_group_relations.is_shared = 1)))

it use ((dependents.group_id = 2) AND ((dependent_group_relations.is_shared = 1)) but should be ((dependent_group_relations.group_id = 2) AND ((dependent_group_relations.is_shared = 1))


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment