Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not work with act_as_paranoid plugin #6

Open
evgenii opened this issue May 12, 2011 · 0 comments
Open

Not work with act_as_paranoid plugin #6

evgenii opened this issue May 12, 2011 · 0 comments

Comments

@evgenii
Copy link

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
end

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 users.id = 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))

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant