I am working on updating a plugin for Rails 3.0.5, in particular this commit . In essence, ActiveRecord requires proc instead of a string to interpolate conditions.
In general, I believe that the best way to deal with something like this is with a call respond_to?, but in this case all the methods that have been changed are private. What is the best practice for checking the rails version so that the plugin can produce new versions of proc and older versions a string? I would rather not rely on verifying that private methods exist, as this might break in the future.
source
share