Closed ZenCocoon closed 10 years ago
The whole scope: rental
thing is confusing. Maybe the syntax should be scope: rental.periods
? And then we could explicitly put there scope: Period.unscoped.where(rental_id: rental.id)
. Feels like a bit too much magic.
@ZenCocoon looks good. For now I would stick to scope:
as it is. If we get into trouble again, we can rewrite scope:
param or add another option for passing the association implicitly.
@wijet Agreed, changing the scope:
behavior would require to break compatibility so bump a new major version as well, might be good in long run if we keep feeling the need for it, but this fix makes sense in short terms anyway.
@wijet how do you feel about this?