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.
If you are using to_json, you are doing it wrong
At Miso, we have been building out a public platform for developers around our service. This means building out many public RESTful endpoints. We have already hosted the first of many developer contests and the submissions were excellent. We ran into a number of challenges while building our public API and our latest post details our frustrations with to_json and why we would never use it to build a clean JSON API. Check out our post and we would love to hear about other people’s experiences.
Running PDFKit on Heroku
A quick guide for avoiding problems with setting up PDFKit on Heroku.
DNote 1.6: Get Some Context
Just released a new version of DNote (github). This release allows you to output context with your notes. Just select the number of contextual lines to include via the -c
option. Currently only HTML, YAML and JSON output formats support context –other formats will gain support in the future. Note that the old -c
option for --custom
has been capitalized to -C
.
DHH's RailsConf 2011 Keynote In Notes and Pictures
I just live-blogged David Heinemeier Hansson’s RailsConf 2011 where he focused on the ‘asset packaging’ and pipeline features coming in Rails 3.1 (which he also said would be available in Release Candidate form this week).
Introducing the rails core_ext series
I just published the first post of the series the rails core_ext.
html_compressor - A Ruby wrapper around html_compressor
I have just launched html_compressor gem, which gives you power to compress html files from ruby.
google_places - A Ruby wrapper around the Google Places API
As you may have heard Google has recently opened up its Places API for developers, allowing us to retrieve detailed info about spots using GPS coordinates. I’ve just released the google_places gem which provides a simple wrapper to easily use the Google Places API in your own project. Readme is on Github.
Recursively Setting Deep Hash Value
I’ve always wanted to be able to do something like:
Scoped Mass Assignment in Rails 3.1
A Quick Overview on how to use scoped mass assignment and why you should be using attr_accessible.
Print Stamps With Ruby
I just released Stamps, a Ruby gem for printing postage stamps and more. Read more about it in the blog post
Why Cucumber sucks and I still love it
As this blog post explains, it’s all about abstraction.
How to create a shopping cart.
If you are interested in how ror_ecommerce’s cart works or are just creating your own cart, you should take a look at the video i just created. I go over the cart and how the cart_items are transferred from a cart item to an order/order_items.
awesome_print gem 0.4.0 released
One of your favorite gems is getting better than ever! The new version adds HTML color option for use with Sinatra, supports formatting of MongoMapper documents, and more. Check out Changelog for complete details.
Minimalistic state machine approach allowing multiple state attributes at the same time.
I just released a new gem with state machine for rails, it uses minimalistic approach, no custom DLS, only one callback. State attr - try it if other state machines are to big for you.
Cucumber For The Command Line - Exploring The Aruba Gem
We use the Aruba gem to aid us in developing a custom Cucumber formatter.
Print Stamps With Ruby!
I just released Stamps, a Ruby gem for printing postage stamps and more. Read more about it in the blog post
Search Your Gmail Messages with ElasticSearch and Ruby
Get personal with ElasticSearch and feed it with e-mail from your Gmail account! Grab the source code or read the accompanying article.
rails_best_practices 0.9.0 released
I just released rails_best_practices 0.9.0, it supports remove empty helpers check, see more here.
KPI: gem for gathering statistics from your app
I just created KPI gem. It makes collecting data for reports easy. More about that in the blog post
BostonRB Presentation Archive - 100+ Presentations, 40+ videos
BostonRB has put together an archive of almost every presentation it has hosted since 2006.
PopraviMK project open-sourced
I have open-sourced PopraviMK project (both web and mobile applications). If you are looking for some good code examples on using tools like: cucumber, rspec, shoulda, factory_girl, pickle, email_spec I would suggest reading the source code. And, you can also read the source code of the mobile application (Android) which is built with Titanium mobile platform.
asset_id 0.1.5 released with caching support
I just pushed v0.1.5 of asset_id (a library for uploading rails static assets to Amazon S3) with caching support so any assets that haven’t changed won’t be uploaded.
Logging who called redirect_to
Here’s a short post that might save you a headache (or two) the next time you have to go spelunking in your Rails server logs.