I'd do something like this:
````ruby
::Rails.version.to_f >= 3.0 ? 3 : 2
````

Although this does not work anymore because there is Rails 4 around the corner. Maybe it should be named to `legacy_rails?` and have implementation in the lines of:

````ruby
def legacy_rails?
  ::Rails.version.to_f < 3.0
end````