def define_default_scope(klass, conditions)
      if Rails.version.to_i < 4 # Rails 2/3
        klass.send :default_scope, conditions
      else
        klass.send :default_scope do
          klass.scoped(conditions)
        end
      end
    end
def define_default_scope(klass, conditions)
      if Rails.version.to_i < 4 # Rails 2/3
        klass.send :default_scope, conditions
      else
        klass.send :default_scope do
          klass.scoped(conditions)
        end
      end
    end
This method does not support dynamic default scopes via lambdas
 (as does #define_scope), because it is currently not required.