Giter Site home page Giter Site logo

mongoid_commentable's People

Contributors

danielgatis avatar mgolovnia 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

Watchers

 avatar  avatar  avatar  avatar

mongoid_commentable's Issues

Rails 4 support

Great gem, but need support rails 4. Because attr_accessible has deprecated now. Thanks.

Getting error and not sure if installing correctly

I followed the steps and I get

uninitialized constant Mongoid::Commentable

Does this mean something is not installing right or are there other files I need to copy over as well?

EDIT: I restarted my rails server and now all the sudden it is working. Must be a browser caching issue or something.

Should I make new file and copy for customize CommentsController?

First, my english is not good. Sorry about that.

I want customize CommentsController.

I cant find good way for this work.
So I just made new comments_controller.rb file and copy paste whole of code in my application.
It works ;) but I guess this way not good.
have some another way?

ps. Maybe it cause from my poor rails knowledge...

delete comment remotely

attempting to delete comment remotely, no method error on mark_deleted in destroy def. any ideas?

Bug: comments are indexed in mongodb

Hi,

I have encountered an issue with the creation of comments: when creating comments or updating its commentable resource, a MongoID exception raised saying that my operation failed with error 17280: "Btree::insert: key too large to index, failing my_db.my_commentable.$comments_1.

After some investigations, I found that the index comments_1 was created directly by mongoid_commentable in lib/mongoid/commentable.rb:

module Mongoid::Commentable
  extend ActiveSupport::Concern
  included do |base|
    base.embeds_many :comments, :as => :commentable
    if Gem::Version.new(Mongoid::VERSION) < Gem::Version.new('3.0.0')
      base.index [['comments', Mongo::ASCENDING]]
    else
      base.index 'comments' => 1 # Index created right here....
    end
  end

Why are you indexing the whole comment? Didn't you mean to index comment._id instead?

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.