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.
Ruby symbols
I keep seeing some programmers from different backgrounds are unable to get what ruby symbols are, and though I do know that there are many great posts regarding this topic, and actually my intent is not to increase them by one :) , but i feel i have to clear few points regarding them. So I’m trying to answer answer 2 important question here: What are ruby symbols? and When to use them? Answers goes here :)
Action Guide to git submodules (with Rails flavor)
The article collects current best practices of a submodules workflow and form a “howto” kind of guide, So if you’re still asking yourself “How shall I track changes in my submodules?” or even (if you’re cool and eat your own dog food) “How shall I use the submodule in my app, have it editable/pushable and let others clone the app without any issues?” - read on, you should find your answers.
How to make a custom form builder in Rails
A quick run through creating a custom form builder in rails. This particular form builder will inline error messages into your form labels.
Little Known Ways to Ruby Mastery by Josh Susser
Josh Susser talks to Ruby beginners providing his insights on the Ruby language.
Rubyist Magazine Call for Papers Opens!
The second issue of The Rubyist Magazine is scheduled for February 2009, and this is your chance to be a part of it! Check out the site for info on writing, advertising, and anything else.
Ruby on Rails Tutorials
In the hope of helping people that are somewhat new to ruby/rails get up to speed, I’ve posted this selection of ruby on rails tutorials to help. I’ve tried to ensure they are still relevant and not teaching people things that hark back to the 1.0 days. Let me know if I’ve incorrectly included some which are out of date.
Load Model, for auto-loading models in your controller
Load Model is a Gemified plugin used to automatically load models in your controllers. Less effort doing the boring stuff, less magic than the REST controller plugin.
SourceClassifier 0.2.1
Have you ever needed to identify the programming language used in a snippet of code, for example in a pastie-style application or in a blog system? SourceClassifier identifies common programming languages using a Bayesian filter trained on a large corpus of examples. It is easy to extend to recognise other languages.
acl9: new authorization plugin for Rails
Role-based authorization system with a nice DSL for specifying access control rules. Available on github.
Krauter: A new router for Rails!
It’s less than five minutes old, but Jeremy McAnally has released krauter, a new router for Rails. It’s described as “Tiny (200 lines fool!), quick (adding routes so fast it hurts and competes with current router otherwise), and agile (OK…it’s not more agile. But it sounds cool.)”
Ruby Testing Survey
The Merbist posted a survey of testing frameworks. Which framework do you use?
How to migrate a Rails app from using Attachment_fu to Paperclip
A run through on how to migrate a project from using Attachment_fu to Paperclip as attachment plugin. This includes all the steps for a seamless upgrade including changing the file layouts on Amazon S3.
Hash serialization in an ActiveRecord model
We don’t often think about serialization in Rails but it can be very useful sometimes. This small article contains a little trick if you want to serialize a Hash attribute, for example in order to store preferences or options in the database.
Automatically handle unexpected Ajax errors in Rails
A quick technique to get Ajax errors that work in a similar way to the standard rails error handling
Freelancing Tips for Ruby Developers
Some pointers and discussion about freelancing - with the focus on how to know what to charge and how to gain a bit of notoriety, taken from Rails Camp 4 in Australia.
Configatron 2.2.0, now with Ruby 1.9 Support
The latest version of Configatron now has support for Ruby 1.8.x, Ruby 1.9.1rc1, and JRuby 1.1.6 support.
Google's Ruby OpenSocial Library
Google has released opensocial-ruby-client, a library that enables you to work with OpenSocial services from Ruby. It’s open source, but sadly you need to sign some sort of document before you can contribute patches and the like..
Send photos from iPhoto to Wordpress using Ruby
Garrick van Buren has written a clever little script that uses rb-appscript and XMLRPC to send photos from iPhoto to a Wordpress blog. It’s surprisingly short and effective.
Make writing Rspec custom matchers a breeze
To be fair, custom matchers in rspec are pretty easy as is: create a class that implements a few methods and then define a method to wrap that class. [more inside]
Ruby and Metaprogramming
Ruby is a lang that supports Metaprogramming effectively, and might be the best in that field. If you want to explore more on that topic, and how ruby can help you, then check this list of posts i wrote recently, i hope you will enjoy them
Why setting the default value of a Hash to be a Hash is wrong (use a block instead)
A quick tutorial on how to make the default of a hash a hash.
Get working quickly with a customised Rails project launcher
Always find yourself opening the same terminal windows and browser tabs when you start work on your Rails app? Try this script to automate the process. It’s a simple script using the rb-appscript gem.
Ruby and Internal DSLs
A Domain-specific language(DSL) is a computer language that’s targeted to a particular kind of problem, rather than a general purpose language that’s aimed at any kind of software problem continue here…
Rails Test Book Design
Anybody want to comment on the design of a Rails testing book?
Fixjour: Another object mother
If nothing has felt quite right to you so far, check out Fixjour. It gives you the new_[model], create_[model] and valid_[model]_attributes methods and nothing else. Check out the README for more info.