5:46 Play Subscribe with or Intro song by Falseta

Episode #413 - October 22nd, 2013

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

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.

November 25th, 2014

This episode covers the future of Ruby 3.0, the flip flop operator, a gem to ferry your data away, speeding up your Capybara specs, and a new place to find Ruby meet up resources.

November 21st, 2014

RubyConf 2014 wrap-up, accelerating your Rails app, RubyGems.org gets redesigned, Heroku wants you to try HTTP Git, and new versions of Rails were released

November 18th, 2014

This episode covers Ruby 2.1.5, the templating libraries Scribble and Curly, a statically-typed Ruby called Rubysierung and Minitest-Reporters.

November 14th, 2014

Tail call optimizations, keeping migrations healthy, how raptor is so much faster, the psychology of SAAS products, and Ru for your CLI all in this episode of the Ruby5!