Sha256: 73cbf2286eea70a48c87ae4d0a25b5b4e3660ba2eb1c8ec31eed5f818df97b25

Contents?: true

Size: 213 Bytes

Versions: 4

Compression:

Stored size: 213 Bytes

Contents

module MongoMapper
  module DocumentRailsCompatibility
    def self.included(model)
      model.class_eval do
        alias_method :new_record?, :new?
      end
    end

    def to_param
      id
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fcoury-mongomapper-0.2.0 lib/mongomapper/document_rails_compatibility.rb
fcoury-mongomapper-0.3.4 lib/mongomapper/document_rails_compatibility.rb
fcoury-mongomapper-0.3.5 lib/mongomapper/document_rails_compatibility.rb
fcoury-mongomapper-0.4.0 lib/mongomapper/document_rails_compatibility.rb