Malicious enjoyment derived from observing someone else’s misfortune
 

Tag Archives: plugins

TinyURL Plugin for Firefox 2.0

I updated the TinyURL plugin for Firefox to support 2.0 since the author capped the version in the install.rdf at 1.5. It’s available here. HORRAY!

Paid for a Plugin

So, I woke up today, and looked in my Inbox. I found that I had an Amazon Gift certificate waiting for me, and it was from Dealcatcher.Com! Wow! I’ve spent maybe a couple hours in the past week working on my little URL Validation Plugin, and I just got paid for it. How cool is that? Apparently, my plugin is saving him a ton of man-hours (is it person-hours in this PC world?). Before, his employees had to check URLs [...]

How to add a Helper to a Rails app Using a Plugin

After the question popped up on irc: [01:21pm|jcm> about plugins: how can I include helpers in a plugin ? I decided to investigate. Turns out it’s very simple, as demonstrated by TopFunky: ActionView::Base.send :include, CssGraphsHelper Just replace CssGraphsHelper with the name of your helper module, and now just make it in lib: module CssGraphsHelper … … … end Now, you have all the methods you defined available to you. Congratulations!

HTTP URL Validation Improved

I found the HTTP URL Validator for Rails very interesting, and well coded, yet it lacked some things such as URL format restrictions. I added some things, and I came up with a sweet solution. It checks the format of the given URL, the content type, and whether it was permanently moved. I might be adding to this in the future. #Check for content type: validates_http_url :url, :content_type => "text/html" #Do not check for content type, just make sure the [...]