PDF Generation in Rails

A look at Prawn, PDFKit, and Wicked PDF

What's new in edge Rails: Active Record enums

Declare an enum attribute where the values map to integers in the database, but can be queried by name.

Obfuscating data in Rails applications for screenshots and demonstrations

I recently had a need to demonstrate a data-heavy application to potential customers. Demonstrating the application with bogus numbers is one thing, but everything looks much more realistic when I’m using real data. I can’t reveal any real information, though, so I needed a quick way to obfuscate real names. Faker to the rescue!

query_diet now support Rails 3

Installation differs slightly from older versions, please check the README.

Rails, callbacks, workers, and the race you never expected to lose « Logical Friday

How delayed jobs can make your after_save callbacks execute before the record is saved.

Updated: Test a gem in multiple versions of Rails

Updated the card with our current best practice (shared app code and specs via symlinks).

Ruby, Ruby on Rails, and _why: The disappearance of one of the world’s most beloved computer programmers

Nice article to educate your non-geek girlfriend/boyfriend about the joys of programming.

Make Makandra Consul work with RSpec 2.x and Rails 3.x

To make the RSpec matcher of the authorization solution Consul work with Rspec 2.x read the following blog post.

Defining custom errors in Ruby

class Errormaster
  CoffeeIsOut = Class.new(StandardError)
  
  # is prettier than
  class CoffeeIsOut < StandardError; end
end

Reference such an error class with Errormaster::CoffeeIsOut.

Hoptoad is now Airbrake

We are changing our name from Hoptoad to Airbrake. You see, some folks much larger than us reached out and claimed trademark over all things related to frogs and toads and little animals of that ilk. After speaking to our lawyers we reluctanctly decided it’s best to change the name.

state_machine 0.10.0 was released

Now allows to list transition paths from and to arbitrary states.

ActiveRecord Table Transform

How to write to the db 27,000 times in 24 seconds instead of 9 minutes.

Capistrano cowboy deploys

Sometimes, you just need to shoot from the hip…or deploy your local changes without committing them. Put this snippet from Jesse Newland in ~/.caprc and now you can cap cowboy deploy.

Counters for Partials

When rendering a partial with the :collection option, you are automatically provided with a counter variable inside the partial template.

Terminus: a client-side Capybara driver

Terminus is a Capybara driver where most of the driver functions are implemented in client-side JavaScript. It lets you script any browser on any machine using the Capybara API, without any browser plugins or extensions.

Undocumented :inverse_of option for ActiveRecord associations

You can now add an :inverse_of option to has_one, has_many and belongs_to associations.... Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance.

Build a JSON API for a Rails application

Try our Apify gem which solves many problems you will be having.

Cerberus: Home

Cerberus is a lightweight and easy-to-use Continuous Builder software for Ruby. It could be run periodically from a scheduler and check if application tests are broken. In case of failed tests Cerberus sends notification to developers.

jcoglan's consent at master — GitHub

Consent is an access control abstraction layer for ActionController. It lets you restrict access to actions across your application using a single config file, rather than scattering access logic across your controllers using verify() and method-specific logic.

clemens's later_dude at master - GitHub

LaterDude is a small calendar helper with i18n support

Agile Ajax » ActionMailer Callbacks: In the Spirit of ActionController Filters » Pathfinder Development

A while back, I had a requirement to persist a record of which email addresses were sent an email through the system. I expected to find callback support for ActionMailer, but was surprised to find that it didn't exist.

Squirrel

Squirrel is an enhancement for ActiveRecord’s find method that allows programmers to query the database using a more Rubyish syntax.