diff --git a/Gemfile b/Gemfile index e68b14248613379ab2ccb5261247a4bf21d96f6b..7099f34309c7548f3fc623fc11860f4b843e8376 100644 --- a/Gemfile +++ b/Gemfile @@ -1,24 +1,25 @@ source 'http://rubygems.org' -#gem 'rails', '3.0.0.rc' -#gem 'bundler', '1.0.0.rc.5' -gem 'rails', '3.0.0.beta4' -gem 'bundler', '0.9.26' +gem 'rails', '3.0.0' +gem 'bundler', '1.0.0' + #Security gem 'devise', :git => 'http://github.com/BadMinus/devise.git' #Mongo -gem 'mongo_mapper', :git => 'http://github.com/BadMinus/mongomapper.git' -#gem 'mongo_mapper', :git => 'http://github.com/jnunemaker/mongomapper.git' -gem 'jnunemaker-validatable', :git => 'http://github.com/BadMinus/validatable.git' +#gem 'mongo_mapper', :git => 'http://github.com/BadMinus/mongomapper.git' +gem 'mongo_mapper', :git => 'http://github.com/jnunemaker/mongomapper.git' +#gem 'mongo_mapper', :git => 'http://github.com/collectiveidea/mongomapper.git', :branch => 'rails3' +#gem 'jnunemaker-validatable', :git => 'http://github.com/BadMinus/validatable.git' +gem 'jnunemaker-validatable', :git => 'http://github.com/jnunemaker/validatable.git' gem 'mongo_ext' -gem 'bson_ext', '1.0.4' -gem 'bson', '1.0.4' +gem 'bson_ext', '1.0.7' +gem 'bson', '1.0.7' #Views gem 'haml' -gem 'will_paginate', '3.0.pre' +gem 'will_paginate', '3.0.pre2' #Uncatagorized gem 'roxml', :git => 'git://github.com/Empact/roxml.git' diff --git a/app/models/post.rb b/app/models/post.rb index 27fcc8cfd16caf608bf684222327a46290d94960..6b56889146d2745a4186db380e109b29439fc2e2 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -25,7 +25,7 @@ class Post after_destroy :destroy_comments def self.instantiate params - self.create params + self.create params.to_hash end #ENCRYPTION diff --git a/app/models/user.rb b/app/models/user.rb index 7fc76b2bef03c4db2419ab31a0e9641f9e15e74e..95d8149f5f89ffff4acef7d0d5b36a284387f600 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -85,7 +85,7 @@ class User group_ids = options.delete(:to) end - group_ids = [group_ids] if group_ids.is_a? BSON::ObjectID + group_ids = [group_ids] if group_ids.is_a? BSON::ObjectId raise ArgumentError.new("You must post to someone.") if group_ids.nil? || group_ids.empty? model_class = class_name.to_s.camelize.constantize diff --git a/config/application.rb b/config/application.rb index f31e3055ba53346894ee4aeb584e81bbc4bd20ce..f303e3446e8e579c986ea0a388891f6973272306 100644 --- a/config/application.rb +++ b/config/application.rb @@ -16,6 +16,7 @@ module Diaspora # Add additional load paths for your own custom dirs #config.autoload_paths += %W(#{config.root}/lib) + config.autoload_paths += %W(#{config.root}/lib) # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named diff --git a/lib/mongo_mapper/bson_id.rb b/lib/mongo_mapper/bson_id.rb index 966edbf1ce6f5c8d10b6376ec27a742a41b11b8e..6a6b1928ee3094c22d85e23e9a73fa1b0fbe415d 100644 --- a/lib/mongo_mapper/bson_id.rb +++ b/lib/mongo_mapper/bson_id.rb @@ -1,9 +1,9 @@ class String def to_id - BSON::ObjectID self + BSON::ObjectId self end end -class BSON::ObjectID +class BSON::ObjectId def to_id self end