-
RSS Links
Categories
Archives
Blogroll
Tag Archives: plugins
Rails Plugin Acts as Taggable on Steriods
You can download it here http://github.com/suitmymind/acts-as-taggable-on-steroids as well as read usage info (which is for the most part reprinted here).
./script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids
./script/generate acts_as_taggable_migration
rake db:migrate
Then in your model
class Post < ActiveRecord::Base
acts_as_taggable
end
And usage is as follows
p = Post.find(:first)
p.tag_list # []
p.tag_list = "Funny, Silly"
p.save
p.tag_list # ["Funny", "Silly"]
p.tag_list.add("Great", "Awful")
p.tag_list.remove("Funny")
#to find...
Post.find_tagged_with('Funny, Silly')
Post.find_tagged_with('Funny, Silly', [...]
TinyMCE Rich Text Editor: HELLO EDITOR Plugin Tutorial and Example
I wanted to create a button for the TinyMCE Rich Text Editor for Wordpress. It was tough to find good docs on the subject. There are a couple of useful posts out there but in general I found them lacking.
http://codex.wordpress.org/TinyMCE_Custom_Buttons#Creating_an_MCE_Editor_Plugin
The above resource has a good section on the PHP code needed to write your own [...]
Build Your Own Calendar in Rails without any Plugins in less than 10 lines of Ruby Code
There are a number of terrific calendar plugins for Rails. But it’s almost as easy, if not easier, to implement your own calendar.
The steps are pretty simple. First get the @beginning_of_month and @end_of_month and iterate over the days in between. In the loop we check if the day matches the @beginning_of_month and if it does [...]
Acts_as_versioned Rails Plugin
Versioning models with the acts_as_versioned plugin
cd rails/app
./script/plugin install git://github.com/technoweenie/acts_as_versioned.git
./script/generate model post title:string body:text
In your model
class Post < ActiveRecord::Base
acts_as_versioned
end
In db/migrate/****_create_posts.rb
def self.up
create_table :posts do |t|
t.string :title
t.text :body
t.timestamps
end
[...]
using rails paperclip plugin on ubuntu
paperclip is an awesome plugin for rails. it let’s you attach an image to any of your models. installation and usage more information is available at http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/
by default paperclip uses the image magick library for image manipulation/resizing. you’ll need to install this library as well as the ruby api to it in order to use [...]
Hacking Rails Plugins