문제

I know I've heard of a library that provides Rails 3 style finders (.where) to earlier versions of Rails, but web search is failing me.

I've got a 2.3 project that needs a new feature, and I'd rather use the newer style in case it gets upgraded.

도움이 되었습니까?

해결책

Would something like the Fake_arel gem help?

Fake_arel simulates and supports a variety of features from Rails 3 for earlier Rails versions. The only major requirement is that your currently-used ActiveRecord gem needs to be greater than or equal to version 2.3.5.

The documentation also notes that Fake_arel can be used as a bridge between Rails 2 and Rails 3 apps, which could ease future transitions to later Rails versions.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top