BookingSync / synced

Keep your BookingSync Application synced with BookingSync
MIT License
3 stars 2 forks source link

Add support for models using default_scope #21

Closed ZenCocoon closed 10 years ago

ZenCocoon commented 10 years ago

@wijet how do you feel about this?

grk commented 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.

wijet commented 10 years ago

@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.

ZenCocoon commented 10 years ago

@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.