Open Ruxton opened 13 years ago
I agree with you, that would be very useful. Currently I am using something like this in my controller to get around this ugh def with_wizard_scope ModelA.with_sanitizer_scope :wizard do ModelB.with_sanitizer_scope :wizard do ModelC.with_sanitizer_scope :wizard do ModelD.with_sanitizer_scope :wizard do ModelE.with_sanitizer_scope :wizard do ModelF.with_sanitizer_scope :wizard do ModelG.with_sanitizer_scope :wizard do ModelH.with_sanitizer_scope :wizard do ModelI.with_sanitizer_scope :wizard do ModelJ.with_sanitizer_scope :wizard do yield end end end end end end end end end end end
Is there any better way if I dont want to set the scope permanently?
btw: great gem :)
It'd be awesome to be able to globally define a scope, rather than having to enter it in every model or have it inherited from nested attributes.