I'm working on library which should support 2.x and 3.x versions of Rails.
In this library I'm queering some data from database.
Is there already built gem which can help to write query once and it will work on either Rails 2 or Rails 3?
I'm working on library which should support 2.x and 3.x versions of Rails.
In this library I'm queering some data from database.
Is there already built gem which can help to write query once and it will work on either Rails 2 or Rails 3?
you could split up your library into different modules. if rails 2 is current rails version -> you can include rails 2 modules (which contain rails 2 queries), otherwise rails 3 specific files. generate functions for the queries and define these function in the different modules with the different syntax.