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.
Reactive Resource: ActiveRecord-style ActiveResource associations
Reactive Resource 0.5 has been released, which brings ActiveRecord-style ‘has_many’, ‘has_one’, and ‘belongs_to’ associations to ActiveResource models, provides better support for singleton resources, and fixes other miscellaneous problems I’ve run into while wrapping REST APIs.
RubyQuestions
I just launched RubyQuestions, a place to get help with ruby, ruby libraries, and Ruby on Rails. Currently it doesn’t have any questions, so start asking away :).
Rails 3 Remote Links and Forms Part 2: Data-type (with jQuery)
I got a lot of great feedback from my original post, Rails 3 Remote Links and Forms: A Definitive Guide. One question kept coming up: How do we make rails remote links work with js.erb? [more inside]
Another take on learning Ruby and Rails
Since the topic of how to learn Ruby and Rails has been a hot one of late, and I’d been thinking about it myself for awhile, I thought I’d throw my two cents on getting started with Ruby (and Rails) into the mix. Comments and suggestions are much appreciated; I’m using this to help future new employees get up to speed.
Require Using Expanded Path
Neeraj Singh explains some interesting things you should know about require using expanded path.
SORRY - my nifty generators video was JUNK
Try watching my VIDEO. on nifty generators again. The first video’s quality really sucked.. SO SO SORRY. It’s still not perfect but definitely readable.
Getting to Know the Ruby Standard Library - Delegator
Come take a look at how ruby implements the proxy pattern with Delegator with me in another part of my ongoing series covering the ruby standard library. You’ll get to see the canonical use of method_missing, and a neat trick concurrency trick as well.
Thats unusual, Ruby metaprogramming 101 #2: What method?
The second part in a series on Ruby metaprogramming. This time up, methods!
Causality of Scalability
I just blogged about relationship between cause and effect when trying to make a system scalable. The article shows that the scalability challenge is not new and not exclusive to the tech world. It shows the traditional approach to scaling and as well as the challenge of scaling in relation to the web and what to be aware of when planning to make a solution scalable. [more inside]
AutoRefresh your browser whenever you hit save.
The autorefresh gem automatically reloads your browser when a file has changed, allowing you to preview your work without leaving the editor.
Develop and Autotest your rubygem
I just wrote two articles to share my experience to develop and autotest a rubygem, one is Using bundler and rvm to build a rubygems and the other is Autotest your rubygem, hope they are helpful to you.
Caching assets in a Rails 3 app on Heroku
I’ve done a quick blog post with a couple of rake tasks that let you easily cache your assets in a Rails 3 app on Heroku. This lets you use the javascript_include_tag and/or stylesheet_link_tag helpers with the “cache => true” option while working around Heroku’s read-only filesystem constraint. Feedback is definitely welcome. Thanks!
Forked nifty-generators.
I made a video to show why I Forked nifty-generators. [more inside]
How to Set Up Rails
Are you trying to learn Ruby on Rails? Here’s a quick video on how I set up my Rails applcations.
MetaWhere and MetaSearch 1.0 Released
After months of development, the MetaWhere and MetaSearch gems for Rails 3 have finally hit 1.0. MetaWhere provides improvements to AR3 query syntax, offering access to ARel predicate methods that aren’t available in stock ActiveRecord, support for outer joins, SQL functions, and more, while MetaSearch provides simple object-based searching and sorting for use in Rails forms, and will be a comfortable transition for those used to using Searchlogic in Rails 2.x.
Stop releasing prototypes
An article explaining why I think writing prototypes is good, as long as you throw them out.
Fat Model Auth - Flexable Authorization
Fat Model Auth has become an essential in my Rails projects. [more inside]
MacRuby: The Definitive Book updated
I just updated my MacRuby book which you can purchase in electronic format, preorder discounted from Amazon or read online for free. This blog post explains what was updated and what’s coming up next.
Cinch 1.1.0 Released
We have just released Cinch 1.1.0. Cinch is an IRC bot building framework. The 1.1.0 release marks new features, documentation improvements, bug fixes, and encoding improvements. Check out the project on GitHub
Sanitize 2.0.0 released
Version 2.0.0 of Sanitize, a whitelist-based HTML filtering library, has been released. New features include advanced traversal options for transformers, improved HTML5 support, and more.
Learn how to add routes from a Rails plugin in 10 seconds
I have written a quick tip about how to add routes from a Rails plugin in 10 seconds.
Standalone web widgets for your Rails app
Boban Jovanoski just released this great post about easily creating standalone web widgets for Rails apps using JSONP and Apotomo.
automatic rails validations
We need to start using more of what’s available to us, rather than reinventing everything. Automatic Rails validations to match your database schema - https://github.com/seejohnrun/database_validation
Premature Optimization and Ruby's Singleton Class
I wrote about how you can dynamically extend an object using Ruby’s Singleton (or Eigen) class to improve your code. In this follow up post I respond to the comments that it isn’t a good idea to use the Singleton class because it would not perform like more traditional methods would.
Different ways to define singleton methods in Ruby
As we know from The Philosophy of Ruby, Ruby inherited the Perl philosophy of having more than one way to do the same thing. So that, there are many ways to define singleton methods in Ruby.