I using a heimdallr for my models, and in the views use a destroyable? method, but I use destoy scope only for owners or admins, and when user not login destroyable? method raise Runtime error The :delete scope does not exist
How to fix this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried creating a
:deletescope or method on the model and setting it to something that doesn’t return records?It looks like this code is where it is failing:
https://github.com/roundlake/heimdallr/blob/master/lib/heimdallr/proxy/record.rb
So if your scope returns no records, it should in theory work just fine.