5:46 Play Subscribe with or Intro song by Falseta

Episode #413 - October 22nd, 2013

30d011dd1b103a523f5bc75cf4b31833.jpg?s=18&r=pg&d=http%3a%2f%2fwww.gravatar.com%2favatar%2f8ebf4339f7c8cd73b53d1d1d3eba7c35 Aimee Simone 9c5541e591a62dd93a2fd2d45b5732dd.jpg?s=18&r=pg&d=http%3a%2f%2fwww.gravatar.com%2favatar%2f8ebf4339f7c8cd73b53d1d1d3eba7c35 Olivier Lacan

This week: new Rails releases, upgrading to Rails 4 open-sourced, migrant attributes, a look at evolution of the distributed Travis architecture, and how GitHub models their app's user sessions.

Subscribe to our mailing list!

This episode is sponsored by Top Ruby Jobs. Everyone deserves to love their job (and it's probably in Ruby).

  • Top Ruby Jobs
  • Rails 3.2.15 & 4.0.1 RC1
  • Upgrading to Rails 4
  • Migrant
  • The Smallest Distributed System
  • Modeling User Sessions
  • Ruby 5

Migrant Jump to Story

While playing with a brand new Rails 4 app this weekend I discovered a gem I wish I had known about years ago, it’s called migrant and it provides a simple DSL to define attributes inside your model so it’s easy to reference them. Unlike other gems like annotate_models or annotator, migrant offers a neat auto­ migration feature. I think Rails migration generators are a neat feature when discovering it, it’s always weird to me to be deciding what fields my ActiveRecord models should have in the console, instead of inside the model itself. With migrant, you call a structure method inside of your model, pass it a block. Within this block you can define the names of your model’s columns. You can specify their type, and even give example data or add comments to them. You just call rake db:upgrade and it will create a migration for each model and their respective attributes. It even works with serialized attributes, it creates validations, and even allows for column type changes. You don’t have to, it infers foreign keys for associations based on association declarations in the models. It even creates indices for those foreign keys, and you can also declare indices manually.

September 16th, 2014

This episode covers an open source admin framework, the Rails protect from forgery method, fast testing, and a new reactive framework.

September 12th, 2014

@rubystrings, Global Day of Coderetreat 2014, Asynchronous Integration Tests With Capybara, nice rake tasks, and module prepend in rails 5

September 9th, 2014

This episode covers RSpec 3.1, unifying multiple analytics services with Rack::Tracker, new features in Rails 4.2, the Fearless Rails Deployment book, a spike for thoughts about Rack 2.0 with The_Metal and RubyConf Portugal.

September 5th, 2014

Reading Rails talks TimeWithZone, descriptive_statistics, new gems in Rails 4.2, Paperdragon, and using Ruby's English operators all in this episode of the Ruby5 podcast!