Skip to content

Commit

Permalink
Merge pull request #21 from whatasunnyday/update-moped
Browse files Browse the repository at this point in the history
Issues while using Mongoid
  • Loading branch information
James McKinney committed Feb 26, 2014
2 parents a2e5777 + 822595a commit 19085f9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/pupa/models/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ module Model
attr_reader :extras
# @return [String] The underscored, lowercase form of the object's class.
attr_accessor :_type
# @return [Moped::BSON::Document,nil] The object's matching document in
# @return [BSON::Document,nil] The object's matching document in
# the database. Set before persisting the object to the database.
attr_accessor :document

Expand Down Expand Up @@ -129,9 +129,9 @@ def []=(property, value)

# Sets the object's ID.
#
# @param [String,Moped::BSON::ObjectId] id an ID
# @param [String,BSON::ObjectId] id an ID
def _id=(id)
@_id = id.to_s # in case of Moped::BSON::ObjectId
@_id = id.to_s # in case of BSON::ObjectId
end

# Sets the extras.
Expand Down
2 changes: 1 addition & 1 deletion pupa.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('faraday_middleware', '~> 0.9.0')
s.add_runtime_dependency('json-schema', '~> 2.1.3')
s.add_runtime_dependency('mail')
s.add_runtime_dependency('moped', '~> 1.5.1')
s.add_runtime_dependency('moped', '~> 2.0.0.beta')
s.add_runtime_dependency('oj', '~> 2.1')

s.add_development_dependency('coveralls')
Expand Down
2 changes: 1 addition & 1 deletion spec/models/model_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class Band
end

it 'should coerce the _id to a string' do
object._id = Moped::BSON::ObjectId.new
object._id = BSON::ObjectId.new
object._id.should be_a(String)
end
end
Expand Down

0 comments on commit 19085f9

Please sign in to comment.