mgolovnia / mongoid_commentable Goto Github PK
View Code? Open in Web Editor NEWProvides methods to create commentable Mongoid models
License: MIT License
Provides methods to create commentable Mongoid models
License: MIT License
Has anyone gotten mongoid_commentable to work with activeadmin or rails admin?
I can't get it to work due to the way the comments model is embedded into other models
Great gem, but need support rails 4. Because attr_accessible has deprecated now. Thanks.
It is dependent on mongoid 2 right now
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.
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...
I have looked all over the mongo db for the comments and I cannot find them. Can you help me out.
attempting to delete comment remotely, no method error on mark_deleted in destroy def. any ideas?
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?
Does this gem support mongoid 4?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.