The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
message_block: An error_messages_for replacement for showing flash messages and validation messages
message_block handles showing ActiveRecord validation messages on (potentially multiple) models and flash messages (of different types: error, confirm, warn, etc.) in one helper. Messages are grouped by type and shown in “message blocks” with some default stylization and icons.
Acts As Teapot - Rails plugin
No, it’s not April Fools yet but we thought we’d get in early this year. Acts As Teapot is a Ruby on Rails plugin that ensures your Ruby on Rails applications conform to RFC2324. Our assumption here is that your application is not a coffee pot and does not understand the Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0). Thus, if ever a BREW request or any other request with the Content-Type set to “application/coffee-pot-command” is received, the server will respond with 418 I’m a teapot.
CloudKit 0.10.0
Just released, CloudKit 0.10.0 supports this week’s Rack 0.9 release and batch URI resolution. More details on the blog.
Automatically wrap your Ruby on Rails actions in a transaction
restful_transactions is a Ruby on Rails plugin that, once installed, ensures that any controller action invoked using POST, PUT or DELETE will automatically be wrapped in a database transaction.
When ActiveRecord isn't quite enough
What do you do when your query logic is more complicated then ActiveRecord? Here are some ideas.
radarb - Use the outside.in API from Ruby
A ruby gem that makes using the outside.in API simple. http://github.com/vigetlabs/radarb/tree/master. Take a look at the blog post on Viget Extend to get a good description of what you can do with this gem and how to use it.
subdomain_account
A gem/plugin for rails that allows applications to scope resources to accounts by subdomains like basecamp does. http://github.com/shuber/subdomain_account. Plays nicely with http://github.com/shuber/authentication and subdomain-fu.
authorization
A simple and very flexible gem/plugin for rails that handles authorization. It requires you to write your own “authorized?” method on your User model (or whatever class you’re authorizing) which allows it to work with ANY type of permissions architecture. .
Your opinions on the Rails / Merb merger are needed!
Someone I know is writing a feature on the Rails / Merb merger for the 2nd issue of The Rubyist (Ruby magazine). He/she will be interviewing several people but also wants to get a general community feel for the opinions surrounding the merge. So, say anything you want here on RubyFlow, get it all off your chest (extreme, intelligent, thoughtful, or otherwise) and you could be quoted and get your name in a shiny magazine article! (If you don’t want to be quoted, make sure you make that clear in your comment..)
Remarkable 2.1.4 - Simplifying tests for trivial things!
“For a long time I was evangelizing Shoulda at Surgeworks and used it in my personal projects. The fact is, I didn’t have much success in convincing my co-workers to adopt Shoulda. On the other hand, they managed to convince me to learn and use RSpec. I got to like RSpec more and more, so I decided to adopt it as my official testing framework from now on. But I can no longer live without the resources that Shoulda offers me. So I decided to scratch my itch.” Remarkable
Custom Passenger Error Templates
Passenger is a popular way of deploying a Ruby on Rails website, but have you ever wanted to change the error templates that Passenger provides?
Remove leading and trailing blanks from attr vals in Rails models
Somewhat like nillify_blanks, stripper converts blank field values to nil. However, it also removes (ie strips) leading and trailing blanks from the value first. Another distinction is that it performs this stripping whether or not the column allows nulls–I’m from the school that believes an empty string makes no sense as the value for a column marked as NOT NULL :).
How to use Sinatra (and other band members) to build an iPhone message tracker
There’s an article over at Technetra demonstrating how to use Sinatra, Ruby and other tools to drive a mobile client like the iPhone, and integrate it with a live data source. The client side is JavaScript and CSS customized for iPhone’s Safari (but playable for testing on a desktop browser like Firefox). The server side is all Ruby and Sinatra. Sinatra sings a simple but complete Web interface tune while core Ruby plays a drum beat with the live data feed – in this case the Bluez D-BUS message stream on Linux. The article is also notable because it’s presents a good example of how to write a module on top of ruby-dbus to monitor Linux’s Bluetooth subsystem.
Installing Git on Mac OS X Leopard and setting up a public repo on GitHub
Yes, I know, very basic and easy, but that’s the point, this is my blog about learning Ruby on Rails. This post explains the basics of installing Git on Mac OS X Leopard, getting a public repo setup on GitHub and communicating with it. Check it out at Learning Ruby on Rails, one step at a time
Screencast : How to Create a File Upload Progress Bar in Rails
An upload progress bar is one of the best ways to improve the usability of file uploads in your application. This screencast will show how to create a file upload progress bar using Rails, Passenger, Low Pro and the upload progress bar Apache module.
attr_encrypted
Generates attr_accessors that encrypt and decrypt attributes transparently. It can be used with ANY class, although you get a few more features if you’re using it with ActiveRecord. Its plugable encrypting backend makes it very flexible.
DaemonKit - Create Ruby daemons in no time
Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code. Using simple built-in generators it is easy to created evented and non-evented daemons that perform a multitude of different tasks. The first version, 0.1 sports a jabber generator, with the evented jabber generator coming soon. The code is still pretty much rough around the edges, and it lives over at GitHub.
Take control of your field values with nilify_blanks
Hate how NULLable columns end up as empty strings in the database when models are used in conjunection with Rails forms? If you would prefer to keep the field NULL when the user doesn’t provide a value, nilify_blanks lets you do this automatically.
Netzke framework - integrating Rails and ExtJS, live demo
An extensive live demo of the Netzke::GridPanel widget has been released on along with the source-code snippets. Netzke is a framework meant to greatly facilitate the creation of Rails/ExtJS applications.
Toronto Ruby on Rails Project Night returns for 2009
The Toronto Ruby and Rails Project night is back in 2009, kicking off January 14th with a rich offering of new ideas from the Ruby programming community. We are joined by presenters Ollie Saunders, Luke Galea and Steven Baker, and sponsor Careerious.com for what promises to be another fantastic event for Toronto’s tech community. Interested in getting involved? Visit correlations for more info.
Rails, Exceptions, Hoptoad, and Annoying User Agents
Hoptoad is a service that allows you to funnel all of your Rails exceptions to a central location so you can splice, dice, and fix them. I’ve noticed however that some web spiders mangle valid URLs into invalid ones and rather than deal with all the possible permutations it would be a lot nicer to simply have Hoptoad ignore them completely.
The RewriteRails Plug-In: Syntactic Abstractions Without Monkey-Patching
RewriteRails adds syntactic abstractions like Andand and String to Block to Rails projects without monkey-patching. All of the power and convenience, none of the compatibility woes and head-aches.
Installing Rails & sqlite3 on Mac OS X Leopard
I’m completely new to the Ruby on Rails framework, and I’ve decided to blog my way to knowledge. This is my first post, and fairly simple. But hey, maybe it will help some out. Check it out, Installing Rails & sqlite3 on Mac OS X Leopard
Contextify - Loading objects from Ruby files
Hey, ever wanted to load Objects from Ruby files without having to use YAML or define a custom class named like the file? Now you can, with Contextify.