Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
blacklight_user_generated_content
Advanced tools
This is a plugin for Blacklight that adds a basic layer of ActiveRecord-esque mocking to a Blacklight::Document/RSolr::Ext::Model class that allows it to work seamlessly with (some) extant Ruby on Rails plugins to provide "user generated content" features.
Currently, acts-as-taggable-on and acts_as_commentable are two integrations supplied by the plugin, although additional integrations should be trivial.
(Add blacklight_user_generated_content to your gemfile) $ rails generate blacklight_user_generated_content generate cancan:ability # cancan authorization framework create app/models/ability.rb insert app/models/ability.rb generate acts_as_taggable_on:migration create db/migrate/20110228210334_acts_as_taggable_on_migration.rb # acts as taggable expects the taggable_id to be an int. A solr document primary key may also be a string. create db/migrate/20110606124459_alter_taggable_id_to_string.rb generate comment create app/models/comment.rb insert app/models/comment.rb insert app/models/solr_document.rb
$ rake db:migrate
Through the Rails Engine framework, this plugin also provides resourceful controllers for tags and comments, and provides an example catalog index of user generated content.
This plugin depends on 'cancan', an authorization framework, to restrict Comment management to the original author. Ideally, this would either be optional or pluggable.
The user generated content "index" currently requires additional information to be indexed within Solr. This integration is not provided by this plugin, however, which may limit its utility.
This plugin has only been tested against master/HEAD versions of acts-as-taggable-on and acts_as_commentable. Some stable releases of these plugins have known issues.
FAQs
Unknown package
We found that blacklight_user_generated_content demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.