We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How to do that in protector?
I tried to do that, but with no luck.
if Contractor.restrict!(current_user).can(:create, :kind_cd: 1) # some view code here
I tried
if user.contractors.any?{ |c| c.kind_cd == 1 } can :create, kind_cd: lambda { |k| k == 0 } else can :create end
and other, but there isn't any success 😢
Do have protector any similar options?
The text was updated successfully, but these errors were encountered:
I don't really understand what you are trying to achieve. Can you please explain what is your goal and not how you are trying to get there?
Sorry, something went wrong.
I try to work with can? method.
can?
How can I check that somebody can create something just with special options? (Like kind_cd = 1)
kind_cd = 1
Oh. Protector is not currently available to do that. That would be nice to have such feature so I'll leave this open.
ok.
I'll try to do that feature.
No branches or pull requests
How to do that in protector?
I tried to do that, but with no luck.
I tried
and other, but there isn't any success 😢
Do have protector any similar options?
The text was updated successfully, but these errors were encountered: