Closed sintro closed 7 years ago
Hey @sintro Thanks for this. Any chance of some tests, then I'll be happy to merge.
J.
Ok, I think will do it some later. Do you have any suggestions to renaming "prefix" option to something?
Prefix seems a pretty reasonable name to me. It's consistent with other methods like rails delegate.
Looks like I have not enought time to make tests. Not because new features are complex, but because I am really noob in MiniTest, and testing of gems. So, may be much later, or with someone`s help. I can describe some examples, but how to implement them - too hard for me now (
No problem, it’s the nature of open source. I’ll put the change into a development branch when I do the next round of updates and look at adding tests. :)
Faced the problem, when generated buy "add_role_scopes" methods conflicted with methods, generated by has_many relation (or any other relation or scope). I wanted to save most of canard
s methods and didn
t want to rename my relations. So I made the possibility to add the prefix for generated "positive" scopes. So, User.children will be User.#{prefix}_children, for example.