Plugins - Acts As Bookmarkable
Add to favoritesA bookmarkable model can be any ActiveRecord class so you can use the acts_as_bookmarkable to bookmark other users in a friends list, or bookmark posts in a favorites list, etc. And following the Web 2.0 trends, bookmarks themselves can act as taggable so that you can label bookmarks with tags. You need to install the acts_as_taggable plugin separately, or you can remove one line in the bookmark.rb file to disable tags for bookmarks.
Usage
- Make your ActiveRecord model act as bookmarkable.
class Model < ActiveRecord::Base
acts_as_bookmarkable
end
- Add a bookmark to a model instance
model = Model.new bookmark = Bookmark.new(:title => ‘bmark title’) model.bookmarks << bookmark
- Each bookmark references the bookmarkable object
model = Model.find(1) model.bookmarks.get(0).bookmarkable == model
http://www.juixe.com/techknow/index.php/2006/07/05/acts-as-bookmarkable-plugin/
http://juixe.com/svn/acts_as_bookmarkable/
Rails' (MIT)
Model
