There are no reviews yet. Be the first to send feedback to the community and the maintainers!
This plugin is NOT supported and hasn't in many years. I'm leaving the code behind for historical reasons. ############################################ = acts_as_taggable_on_steroids NOT THE OFFICIAL REPO, I just imported this project to get few bug fixed when I was using it for a project in early 2008. USE AT YOUR OWN RISK If you find this plugin useful, please consider a donation to show your support! http://www.paypal.com/cgi-bin/webscr?cmd=_send-money Email address: [email protected] == Instructions This plugin is based on acts_as_taggable by DHH but includes extras such as tests, smarter tag assignment, and tag cloud calculations. == Installation ruby script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids == Usage === Prepare database Generate and apply the migration: ruby script/generate acts_as_taggable_migration rake db:migrate === Basic tagging Let's suppose users have many posts and we want those posts to have tags. The first step is to add +acts_as_taggable+ to the Post class: class Post < ActiveRecord::Base acts_as_taggable belongs_to :user end We can now use the tagging methods provided by acts_as_taggable, <tt>#tag_list</tt> and <tt>#tag_list=</tt>. Both these methods work like regular attribute accessors. p = Post.find(:first) p.tag_list # [] p.tag_list = "Funny, Silly" p.save p.tag_list # ["Funny", "Silly"] You can also add or remove arrays of tags. p.tag_list.add("Great", "Awful") p.tag_list.remove("Funny") === Finding tagged objects To retrieve objects tagged with a certain tag, use find_tagged_with. Post.find_tagged_with('Funny, Silly') By default, find_tagged_with will find objects that have any of the given tags. To find only objects that are tagged with all the given tags, use match_all. Post.find_tagged_with('Funny, Silly', :match_all => true) See <tt>ActiveRecord::Acts::Taggable::InstanceMethods</tt> for more methods and options. === Tag cloud calculations To construct tag clouds, the frequency of each tag needs to be calculated. Because we specified +acts_as_taggable+ on the <tt>Post</tt> class, we can get a calculation of all the tag counts by using <tt>Post.tag_counts</tt>. But what if we wanted a tag count for an single user's posts? To achieve this we call tag_counts on the association: User.find(:first).posts.tag_counts A helper is included to assist with generating tag clouds. Include it in your helper file: module ApplicationHelper include TagsHelper end Here is an example that generates a tag cloud. Controller: class PostController < ApplicationController def tag_cloud @tags = Post.tag_counts end end View: <% tag_cloud @tags, %w(css1 css2 css3 css4) do |tag, css_class| %> <%= link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class %> <% end %> CSS: .css1 { font-size: 1.0em; } .css2 { font-size: 1.2em; } .css3 { font-size: 1.4em; } .css4 { font-size: 1.6em; } === Caching It is useful to cache the list of tags to reduce the number of queries executed. To do this, add a column named <tt>cached_tag_list</tt> to the model which is being tagged. The column should be long enough to hold the full tag list and must have a default value of null, not an empty string. class CachePostTagList < ActiveRecord::Migration def self.up add_column :posts, :cached_tag_list, :string end end class Post < ActiveRecord::Base acts_as_taggable # The caching column defaults to cached_tag_list, but can be changed: # # set_cached_tag_list_column_name "my_caching_column_name" end The details of the caching are handled for you. Just continue to use the tag_list accessor as you normally would. Note that the cached tag list will not be updated if you directly create Tagging objects or manually append to the <tt>tags</tt> or <tt>taggings</tt> associations. To update the cached tag list you should call <tt>save_cached_tag_list</tt> manually. === Delimiter If you want to change the delimiter used to parse and present tags, set TagList.delimiter. For example, to use spaces instead of commas, add the following to config/environment.rb: TagList.delimiter = " " You can also use a regexp as delimiter: TagList.delimiter = /,|;/ The above code would parse the string and use ',' and ';' as delimiters. === Unused tags Set Tag.destroy_unused to remove tags when they are no longer being used to tag any objects. Defaults to false. Tag.destroy_unused = true === Other Problems, comments, and suggestions all welcome. [email protected]
googlecharts
Ruby Google Chart APIWeasel-Diesel
DSL to describe, document and test web servicesmerb-book
Open Source Merb bookfilebuffer
filebuffer is a package implementing a few file-like interfaces. The implementation is backed by a byte buffer. The main purpose is to have in-memory file alternative.sinatra-web-api-example
Example application using Sinatra and the DSL gem to develop web APIs using a simple DSL and a small stack.MacRuby--The-Definitive-Guide
MacRuby: The Definitive Guide - code repogoRailsYourself
A suite of useful functions needed when porting/mixing Go/Rails code.mimetype-fu
get the mimetype of a file directly in Rubywd-sinatra
Weasel-Diesel Sinatra app gem, allowing you to generate/update sinatra apps using the Weasel Diesel DSLaudio
This is a playground, production ready code is available at https://github.com/go-audio/goHtmlTemplateExample
Example setting up a Golang web server with static files, HTML templates and Angular.jsglobalite
Globalite is meant to be a breed of the best i18n /l10n plugins available for Rails.m3u8Grabber
Experimental command line tool downloading the content of a m3u8 file containing TS video segments and converting them to mkv.macruby_graphics
Cocoa's Core Graphics & Core Image wrapper for MacRuby (see original author's branch in the link below)ok-go
Google Assistant SDK in GoGC-stats-middleware
Ruby GC Stats after each request (rack middleware)fire-and-forget
[Not maintained] Very dumb HTTP "client" that fires requests and doesn't care about the response.ruby-web-search
A Ruby gem that provides a way to retrieve search results via the main search engines using Rubyi18n
Basic internationalization(i18n) library for RubyLiveTV
Simple OS X application allowing you to watch some live free TV channels (French, English, Italian).macruby-httpwrapper
simplified http wrapper for MacRuby/RubyMotion using delegation/ruby blockphileas_frog
MacRuby video game using Cocoa's CoreAnimationwaveform_demo
Flutter Waveform drawing demo repogo-web-api-demo
Example implementation of a web API in Gosm-808
Programming exercise - code the sequencer part of a Drum Machinemerb_babel
Merb Babel is a dead simple translation/localization tool for Merbpluzzdl
My own fork of pluzzdlnoko-vs-builder-benchmark
Rails app to benchmark Nokogiri's XML builder vs BuilderWSDSL
Due to a confusing name, this project was renamed and moved to:macruby-json
reimplementation of the ruby json gem for macruby using objcar-backup
Active Record backup is a Rails plugin which lets you backup your database schema and content in a schema.rb file and fixtures.MacRuby-Siri
Simple demo showing how to use the voice recognition feature of OS X to implement a Siri-like app in MacRuby,macruby-doc-app
simple experiment to query the cocoa and eventually the macruby docglobalite-example
Sample app showing how to implement GlobaLite in a Rails appmerb-static-pages-slice
Use markdown files to store and serve static pages (about us, contact us, etc)multibyte
Ruby Multibyte library extracted from ActiveSupportPvwatts
Wrapper around the http://www.nrel.gov/rredc/pvwatts/ web service APIsinatra-wsdsl-example
moved to https://github.com/mattetti/sinatra-web-api-exampleTVFrancaise
Simple OS X application allowing you to watch most of the free French TV channels live. (works overseas)apple-remote-wrapper
fork of Martin Kahr work on an Apple Remote WrapperIOLI-crackme
crackme exercises with instructions to learn in a safe environmentmonkey_patcher
keep track of your monkey patchesgoogle-speech
Fun with Google Cloud Platform speech recognition APIfasthttp
FastHTTP is a Ruby library suitable for use as a drop-in Net::HTTP replacement or with event frameworks like EventMachine and Revswx-ruby
Ruby implementation of SWX RPCcocoa
Pure Go reimplementation of some Cocoa specific features.simple_merb_example_app
simple app example, look at the branches to see how to build the appdm-gvideo-adapter
DataMapper adapter for google videoherbs
Hopefully Exhaustive Ruby Benchmark Suitemerb_training_site
Box2d
My Box2d fork which has the iPhone TestBed compiling under Xcode4hotocoa-roundtransparentwindow
HotCocoa(MacRuby) port of Apple's RoundTransparentWindow sample using a NibMacRuby-Chipmunk
Cocoa Framework designed to use Chipmunk Physics with MacRubyMrStuff
MacRuby experimental wrappersmerb-misc
misc stuff related to MerbRubyConfX-code
The code used for my MacRuby talk at RubyConf X | demos: iVoiceControl (voice recognition), PS3 controller + MacRuby + HTML5, tokenization, headless browser and gowalla sample.sdruby-raffle
Tiny Ruby gem to pick raffle winnersmerb_latest_rss_items_slice
Just a test Merb Slice displaying the latest RSS items from a feedPS3SixAxis
Use a PS3 Dualshock 3 Controller with Cocoadrumbeat
Drum beat is a Go library to handle drum beat patternsma-agile
learning_scala
Misc stuff you might care about when learning scalaplex-web-client
uuid
Go UUID package - use at your own riskartist_portfolio
Shoes app displaying an artist portfolio using Flickr as a source for contentphare
native osx client for lighthouseapp.commattetti.github.com.old
Matt Aimonetti's home pagemerb-book-tmbundle
A TextMate bundle for the merb-book bundlecouchrest-app
CouchApp for CouchRest logger middleware. Browse and analyze your logs directly from Couchcbc
CBC/radio-canada has great content and in some cases, one might be interested in keeping a backupMacRuby-NSCollectionView
example for @tronathanbottetti
my irc botscrapbook
Experiment designed to reflect on the organization of web scraping/data processing.go-exercises
Hopefully fun exercises in Golang. Each exercise has a test suite and your mission to make it pass!merb-doc
Stuff to generate docs for Merb outside of an apppubnub-publisher
A Ruby publisher gem for PubNub (for those who only care about publishing from Ruby)macruby-raffle
raffle appmacruby-roundtransparentwindow
MacRuby port of Apple's RoundTransparentWindow samplesandbox
testing different things, nothing very interestingpastis
fresh and relaxing experimentationmisc-Python-experiments
nothing valuable in here, just me playing with Pythondm-websearch-adapter
ruby_practice
series of random exercises to practice RubyMacRuby-ScriptingBridge-Browser
A ScriptingBridge browser for MacRuby, quite like AppleScript Editor's dictionary browser.sigen
signature generator written in Ruby and using RMagickmerbthor
UnityAzureSpeechSynthesis
Quick demo showing how to use Azure Speech Synthesis (tts) from Unity and loading/playing the generated file in game.gvideo
retrieve a google user's list of videos using his user id.LCFF
Luca's Cow Fart Filterhttp-proxy-experiment
Simple http proxy server written in Go to learn the language. The goal of this server is to proxy some defined websites with full cookie support.ruby-exercises
simple katas and exercises prepared for SDRuby meetups.bugsnag-go
bugsnag.com API client in Gotwitter_game_bot
A twitter botrevel_addons
Series of packages for the Revel Go Frameworks2s-auth
s2s auth gem based on ActiveSupport's cryptopaca
Selenium IDE test case converter to Go tests to be run via Agoutiwd_sinatra_active_record
ActiveRecord helper for Weasel Diesel Sinatra apps. See https://github.com/mattetti/wd-sinatraAndromeda
The goal is to provide a highly concurrent public facing API that dispatches requests to other APIs via different protocols (HTTP, Thrift..)webserver-test-plan
macruby-twitter_engine
MGTwitterEngine package for MacRuby/HotCocoaLove Open Source and this site? Check out how you can help us