Giter Site home page Giter Site logo

mongoid_paranoia's Introduction

Paranoid Documents for Mongoid

Build Status Gem Version Gitter chat

Mongoid::Paranoia enables a "soft delete" of Mongoid documents. Instead of being removed from the database, paranoid docs are flagged with a deleted_at timestamp and are ignored from queries by default.

The Mongoid::Paranoia functionality was originally supported in Mongoid itself, but was dropped from version 4.0 onwards. This gem was extracted from the Mongoid 3.0.0-stable branch.

Caution: This repo/gem mongoid_paranoia (underscored) is different than mongoid-paranoia (hyphenated). The goal of mongoid-paranoia (hyphenated) is to stay API compatible and it only accepts security fixes.

Version Support

  • The current release is compatible with Mongoid 7.3 and later, and Ruby 2.7 and later.
  • Earlier Mongoid and Ruby versions are supported on earlier releases.

Installation

Add this line to your application's Gemfile:

gem 'mongoid_paranoia'

Usage

class Person
  include Mongoid::Document
  include Mongoid::Paranoia
end

person.delete   # Sets the deleted_at field to the current time, ignoring callbacks.
person.delete!  # Permanently deletes the document, ignoring callbacks.
person.destroy  # Sets the deleted_at field to the current time, firing callbacks.
person.destroy! # Permanently deletes the document, firing callbacks.
person.restore  # Brings the "deleted" document back to life.
person.restore(:recursive => true) # Brings "deleted" associated documents back to life recursively

The documents that have been "flagged" as deleted (soft deleted) can be accessed at any time by calling the deleted class method on the class.

Person.deleted # Returns documents that have been "flagged" as deleted.

You can also access all documents (both deleted and non-deleted) at any time by using the unscoped class method:

Person.unscoped.all # Returns all documents, both deleted and non-deleted

You can also configure the paranoid field naming on a global basis. Within the context of a Rails app this is done via an initializer.

# config/initializers/mongoid_paranoid.rb

Mongoid::Paranoia.configure do |c|
  c.paranoid_field = :myFieldName
end

Validations

You need override uniqueness validates

validates :title, uniqueness: { conditions: -> { where(deleted_at: nil) } }

Callbacks

Restore

before_restore, after_restore and around_restore callbacks are added to your model. They work similarly to the before_destroy, after_destroy and around_destroy callbacks.

Remove

before_remove, after_remove and around_remove are added to your model. They are called when record is deleted permanently .

Example

class User
  include Mongoid::Document
  include Mongoid::Paranoia

  before_restore :before_restore_action
  after_restore  :after_restore_action
  around_restore :around_restore_action

  private

  def before_restore_action
    puts "BEFORE"
  end

  def after_restore_action
    puts "AFTER"
  end

  def around_restore_action
    puts "AROUND - BEFORE"
    yield # restoring
    puts "AROUND - AFTER"
  end
end

TODO

Authors

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

mongoid_paranoia's People

Contributors

arturantonnikau avatar bartoszkopinski avatar dblock avatar erich avatar fudoshiki avatar glebtv avatar gregmolnar avatar johnnyshields avatar loopj avatar rmm5t avatar simi avatar skalee avatar tagliala avatar zhefeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongoid_paranoia's Issues

including Mongoid::Paranoia changes the update method from public to private

class Human
  include Mongoid::Document
end
human = Human.create #=> #<Human _id: 5605a9a71942d01471000002, >
human.update #=> true
Mongoid::Compatibility::Version.mongoid5? #=> true
class Robot
  include Mongoid::Document
  include Mongoid::Paranoia
end
robot = Robot.create #=> #<Robot _id: 5605a9d11942d01471000003, deleted_at(deleted_at): nil>
robot.update
# NoMethodError: private method `update' called for #<Robot:0x00000103c2ecd8>

The update method: https://github.com/mongodb/mongoid/blob/ffad088b8c75390d01424494f17eb25ac285db90/lib/mongoid/persistable/updatable.rb#L40-L54

Release rc1 gem

Since mongoid 4.0.0.rc1 is out, it will be nice to release mongoid-paranoia to rubygems also.

There is one problem, mongoid-paranoia name is already taken by @Haihappen and he is not responding.

I tried to open issue ream88/mongoid-paranoia#1 and discuss it with him.

@johnnyshields tried to tweet him https://twitter.com/johnny_shields/status/467564819575357440 without response.

I sent him two also two emails:

Sent at 06.03.13

Hello.

Can I ask you what you don't like on my extraction? It will bad to
have two paranoias.
I'm using paranoia in production, so I'm really interested in
development and maintaining.
I made some changes for master. But I keep 3.0.0-stable branch with
100% compatibility with Mongoid 3.0 and 3.1.
Also mongois-slug mantainer contacted me with some problems and he is
testing now against my paranoia.

You can find it here - https://github.com/simi/mongoid-paranoia.

Sorry if I made some mistake. I can delete my repo and start to work on yours.
Sent at 02.07.13

Hello.

I made a lot of work to make my fork compatible with latest Mongoid 4 
(https://github.com/simi/mongoid-paranoia). It's full 100% compatible now.
I don't think yours version is.
Do you want to join our works and work on on gem called mongoid-paranoia 
or do I need to rename my library to release stable gem for 
Mongoid 4.0 compatibility?

I extracted it first and I wrote you few months back.
I don't know understand why we need two extractions :(

Now I'm really tired of this, so we need to move on our own.

There are two way. We can ask rubygems maintainers, if they can help us or we need to rename this gem. For example we can use mongoid4-paranoia or mongoid-paranoia4.

Any ideas anyone?

Define a scope on a relation

Hi there, I was wondering whether and/or how it is possible to define a scope to include soft deleted objects in a relation. For example, inspired by ActiveRecord, I am looking for something like this:

has_and_belongs_to_many :users, -> { unscoped }

Would appreciate any help. Also, in case it is not possible or no viable workaround exists, I could maybe develope that feature myself. However, I will need guidance, I am not to proficient in Ruby yet.

Any helpers? Any takers?

allow #deleted_at attributed to be modified with a #store_as

I'm working on a PR for this now, but wondering if there was a reason this was never done in the first place. Maybe nobody has needed it yet.

We do not want to use #deleted_at as the attribute name. We are being asked instead to store the attribute as:

field :deltdDttmUtc, as: :deleted_at, type: Time

the idea is clear, but implementing is a challenge as the field method gets called from the included block

Doesn't work with Mongoid 7

Mongoid 7 is in beta, but should have next release rather soon.

Bundler::GemRequireError:
  There was an error while trying to load the gem 'mongoid_paranoia'.
  Gem Load Error is: Cannot define multiple 'included' blocks for a Concern
  Backtrace for gem load error is:
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/activesupport-5.1.4/lib/active_support/concern.rb:126:in `included'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid/paranoia/monkey_patches.rb:7:in `<module:Document>'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid/paranoia/monkey_patches.rb:4:in `<module:Paranoia>'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid/paranoia/monkey_patches.rb:3:in `<module:Mongoid>'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid/paranoia/monkey_patches.rb:2:in `<top (required)>'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid/paranoia.rb:2:in `require'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid/paranoia.rb:2:in `<top (required)>'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid_paranoia.rb:1:in `require'
  /Users/stanley/.rvm/gems/ruby-2.5.0@redclover/gems/mongoid_paranoia-0.3.0/lib/mongoid_paranoia.rb:1:in `<top (required)>'

Mark soft deleted records as persisted.

I had a lot of issues today with this flag. CarrierWave photos were deleted and embeded models returned persisted? #=> false and to_param => nil, which caused a lot of issued in rails url helpers.

I started work in persistence branch.

Anyone against this change?

[Transactions issue] #destroy hanging after another action inside a transaction

Hello!
When we have document class like this

class Document
  include Mongoid::Document
  include Mongoid::Paranoia

  store_in collection: 'documents'

  field :timestamps, type: Array, default: []
end

and then we want to perform some actions wrapped in a transaction

document = Document.create

document.with_session do |session|
  session.with_transaction(write_concern: {w: :majority}) do
    document.push(timestamps: Time.now)
    document.destroy
  end
end

when we try to perform this code after occurring document.destroy this will hanging ~ 30 seconds and then we see an error
Снимок экрана 2024-03-08 в 01 25 02

it happens coz we should perform all operations inside the transaction using the same session

Test failures in Ruby 2.4

When I've tried to run the test suite in Ruby 2.4, I've observed two quirks:

  1. A lot of weird stdout output in specs for Mongoid::Attributes::Nested:
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/locale/en.yml
yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/locale/en.yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.0.2/lib/active_support/locale/en.yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/locale/en.yml
yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/locale/en.yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activemodel-5.0.2/lib/active_model/locale/en.yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongoid-6.1.0/lib/config/locales/en.yml
yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongoid-6.1.0/lib/config/locales/en.yml
/Users/skale/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mongoid-6.1.0/lib/config/locales/en.yml
  1. Weird spec failures, e.g.
  1) Mongoid::Paranoia#restore when the document is a root marks document again as persisted
     Failure/Error: paranoid_collection.find(atomic_selector).update_one(value)

     TypeError:
       wrong argument type Integer (expected Proc)
     # ./lib/mongoid/paranoia.rb:200:in `_paranoia_update'
     # ./lib/mongoid/paranoia.rb:102:in `remove'
     # ./spec/mongoid/paranoia_spec.rb:674:in `block (4 levels) in <top (required)>'

The interesting thing about the problem no. 2 is that that the first of the problematic examples always passes. For example, running any of failing tests alone results with passing test. There must be some interference between examples.

Neither of above happens in Ruby 2.3.

Rspec failing when trying to include unscoped in associations

I've overriden:

def self.find(id)
  User.unscoped.find(id)
end

in my User model in order to have always all the users in every find. This way I'm able to manage logins/registrations in a easy way with the default_scope, but I want to have the deleted user info always in the system.

Also I've also overriden:

def user
  User.find(user_id)
end

in my Post model in order to have always the author of the post even if it was deleted in the past.

Everything works fine in the browser, but with rspec it's not working. It simply does not find the User in the database in the Post model. If I remove this override everything works again.

Could you please check if this is a bug or my fault :-)

Thanks, humbly,
Jose.

Using Mongoid 5.0.2 gem

when i writing mongo_client = Mongoid::Clients.default
i get this error
uninitialized constant Mongoid
plesae help me
thanx

Rails 5 incompatibility

I'm trying to upgrade a Rails application to the Rails 5 beta, which requires activesupport = 5.0.0.beta2. The application uses mongoid-paranoia 1.3.0, which relies on activesupport ~> 4.0. This makes the Rails 5 beta incompatible with mongoid-paranoia.

Transfer mongoid_paranoia to github/mongoid?

I had https://github.com/mongoid kindly donated to the community by the nice folks at MongoDB. The three people who have org level admin access are currently @durran, @estolfo and myself.

I want to invite this project to be moved to the org. I think it makes good sense to group mongoid projects together and have continuous support from MongoDB, the company, over the long term. All admins of this project will continue having admin access of course, but this would reduce the bus factor since currently only @simi can add maintainers here.

If you think it's a good idea, please transfer this project to me and I'll move it into the org and please add [email protected], [email protected] and [email protected] to rubygems.

Rails5: NoMethodError: private method `update' called for

I found following error when I tried to use mongoid_paranoia with rails5. I am using latest version of mongoid_paranoia (i.e. 0.2.1).

NoMethodError: private method `update' called for #<Mongo::Collection::View:0x007fdc7e323b08>
Did you mean?  update_one
from /Users/MAC/.rvm/gems/ruby-2.3.1@effect/gems/mongoid_paranoia-0.2.1/lib/mongoid/paranoia.rb:204:in `_paranoia_update'

Get the Paranoia Document using Model.find

Hi,

I am using mongoid-paranoia in one of my projects to hide records from public end.
I want to authenticate Document to Remove only if the user is Admin.But when I try to find the record using Model.find(params[:id]) it throws me error that the record doesnot exist.

Can you please help me how to find the persisted record to remove it compleletely.

Thanks in advance

dependent: :destroy for associated models

I have a Document model associated with a Company. When I call @company.destroy, the Company record is lazy-deleted but the Documents are actually deleted.

class Company
  include Mongoid::Document
  include Mongoid::Paranoia
  has_many :documents, dependent: :destroy
end
class Document
  include Mongoid::Document
  include Mongoid::Paranoia
  belongs_to :company
end

Include deleted records in association

Hi,

when I use Model.unscoped I have all the objects, deleted and not deleted ones, but if I want to have the same list but from an associated model, I've not been able to find the proper way to do it without monkeypatching the method.

For example, let's suppose: Post has many comments. Comment belongs_to :post. Now, Post.first.comments shows always the scoped list, but how can I get the unscoped list without monkeypatching the comments method in Post model? Yes, comments.unscoped works. But Comment.first.post is always searched with the scoped scope and if the Post have been deleted, the result is nil. How can I include the unscoped ones in this reverse association?

Mongoid-paranoia with cancan

I am using mongoid-paranoia for document moderation. When a document is 'rejected' it's soft deleted with mongoid-paranoia. I am also using cancan for authorization. My controllers contain the following:

class BooksController < ApplicationController
  check_authorization
  load_and_authorize_resource
end

For some reason, cancan is doing a find as a before filter on each controller action. So when I go to moderate a rejected document (one that has been soft deleted) I am getting a Mongoid::Errors::DocumentNotFound error as cancan is doing a search in Book.find when it really needs to search in Book.deleted.find. Does anyone know what is happening?

I have found a temporary solution by overriding the find method in the Book model:

def self.find(*args)
  begin
    super
  rescue Exception => e
    deleted.find(*args)
  end
end

How to support Mongoid Paranoia in gems

I am the maintainer of Mongoid Slug, a gem that generates a slug/permalink based on fields in a Mongoid-based model. I am seeking your advice on how to support Mongoid Paranoia in our gem.

One of our users reported that our slugging library returns documents deleted with Mongoid Paranoia, when the expected behavior is that deleted documents should never be returned by the Mongoid Slug finder:

Mongoid Paranoia is refactored into this gem in Mongoid 4 so I am looking for the best way to support Mongoid Paranoia going forward in Mongoid Slug. The solution needs to work both when Mongoid Paranoia is included and not included.

Please let me know if you have any suggestions on how to not return paranoid deleted documents in a where query like the one we use to find slugged documents:

where({ _slugs: { '$in' => slugs } }).limit(slugs.length)

uninitialized constant Mongoid::Paranoia

ruby 2.1.2, rails 4.1.4

uninitialized constant Mongoid::Paranoia

article.rb

class Article
include Mongoid::Document
include Mongoid::Paranoia
...

Gemfile
gem 'mongoid_paranoia', github: 'simi/mongoid-paranoia'

but worked with gem 'mongoid-paranoia', github: 'simi/mongoid-paranoia'

Unscope 1-1 associations

Hi,

I have struggle problem similar to #24, and overcame gem limitations by overwriting associations getter. All stuff is done in simple module:

module ParanoidAssociations
  extend ActiveSupport::Concern

  module ClassMethods
    def paranoid_association(*assoc)
      assoc.each do |name|
        unscope_single_association(name)
      end
    end

    private

    def unscope_single_association(name)
      klass = reflect_on_association(name).klass

      unscoped = Module.new do
        define_method(name) do |reload = false|
          klass.unscoped { super(reload) }
        end
      end

      prepend unscoped
    end
  end
end

Only thing you have to do is to call paranoid_association :model right after belongs_to :model. Are you interested in introducing such functionality into your gem @simi? If you are, I could prepare PR with all stuff included.

I notice that you support jruby so module have to be rewritten to use alias_method_chain instead of prepend.

Issue when using with mongoid_search

In a simple test, I'm not able to access Model.scoped, but neither even to Model.firstor Model.count. The only difference with other models where I'm also using mongoid_paranoia is that I'm also using mongoid_search.

What do you need in order to reproduce the context?

Regards.

Mongoid::Paranoia throws "block in <module:Paranoia>: undefined method `paranoid=' for User:Class (NoMethodError)"

I installed the 'mongoid-paranoia' gem, bundled it and added Mongoid::Paranoia to the User Model. Now when I run 'rails c', it gives this error:

$ rails c
/home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/mongoid-paranoia-0.3.0/lib/mongoid/paranoia.rb:18:in `block in <module:Paranoia>': undefined method `paranoid=' for User:Class (NoMethodError)
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/concern.rb:114:in `class_eval'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/concern.rb:114:in `append_features'
    from /home/psycho/Desktop/edu-inv/app/models/user.rb:3:in `include'
    from /home/psycho/Desktop/edu-inv/app/models/user.rb:3:in `<class:User>'
    from /home/psycho/Desktop/edu-inv/app/models/user.rb:1:in `<top (required)>'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:423:in `load'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:423:in `block in load_file'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:615:in `new_constants_in'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:422:in `load_file'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:323:in `require_or_load'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in `load_missing_constant'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `const_get'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `block in constantize'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `each'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `inject'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `constantize'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:534:in `get'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:565:in `constantize'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise.rb:274:in `get'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/mapping.rb:77:in `to'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/mapping.rb:72:in `modules'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/mapping.rb:89:in `routes'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/mapping.rb:156:in `default_used_route'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/mapping.rb:66:in `initialize'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise.rb:308:in `new'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise.rb:308:in `add_mapping'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/rails/routes.rb:208:in `block in devise_for'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/rails/routes.rb:207:in `each'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/rails/routes.rb:207:in `devise_for'
    from /home/psycho/Desktop/edu-inv/config/routes.rb:2:in `block in <top (required)>'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
    from /home/psycho/Desktop/edu-inv/config/routes.rb:1:in `<top (required)>'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:102:in `reload_routes!'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/bundler/gems/devise-fed6a92d5521/lib/devise/rails.rb:14:in `block in <class:Engine>'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `call'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:55:in `block in <module:Finisher>'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
    from /home/psycho/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /home/psycho/Desktop/edu-inv/config/environment.rb:5:in `<top (required)>'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
    from /home/psycho/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:45:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

I'm using Ruby 2 with Rails 4 Stable and Mongoid 4.0.0

Release new version

Hi !

Some code has been added since last release but is still not released, is the master branch stable enough for a new release ?

Thanks

Ready soon?

I noticed you mention that you were pausing on development for mongoid4 api to stabilize. It looks like mongoid4 api is now pretty stable, and with rails-4.0.0.rc1 out, rails4 is just around the corner.

Is this almost ready to be used? If not, what is left to do, would be happy to help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.