Jay Fields

Rake: db:migration:conflict


over 10 years ago by Jay Fields on Jay Fields Thoughts.
This task originally written by Stephen Chu.If you are using migrations on a large team, migration conflicts can and do occur. To help avoid conflicts...

Ruby: rake commit


over 10 years ago by Jay Fields on Jay Fields Thoughts.
I wrote in the past about rake pc, the task that I run before checking in. The rake pc task is good, but it stops one step short: actually checking in.The...

Ruby: Constant values


over 10 years ago by Jay Fields on Jay Fields Thoughts.
I generally use constants in Ruby for the following two situations: Markers or Constant values.Markers are used as a standard for comparison.module CreditCardTypes...

Ruby: Multiline strings - here doc or quotes


over 10 years ago by Jay Fields on Jay Fields Thoughts.
Ruby supports multiline strings by providing two types of here doc syntax. The first syntax uses and additional dash, but allows you to indent the "end...

Rails: Presenter Pattern


~10 years ago by Jay Fields on Jay Fields Thoughts.
The default architecture for Ruby on Rails, Model View Controller, can begin to break down as Controllers become bloated and logic begins to creep into...

Class Reopening Hints


over 10 years ago by Jay Fields on Jay Fields Thoughts.
In my previous entry about Class Definitions Aman King left the following comment:I've always liked Ruby's open class feature but have also wondered how...

Ruby: Validatable Tests


~10 years ago by Jay Fields on Jay Fields Thoughts.
In the comments for my most recent entry, Validatable 1.2.2 released, Jon Leighton asks: how do you recommend testing validations?I've had this discussion...

Rails: Clean up Controller Tests


~10 years ago by Jay Fields on Jay Fields Thoughts.
Traditional Rails Controller tests begin with code very similar to the following code.require File.dirname(__FILE__) + '/../test_helper'# Re-raise errors...

Rails: Presenters - An additional layer alternative.


over 10 years ago by Jay Fields on Jay Fields Thoughts.
The first time I wrote about Presenters was back in September. The title of the article contains a question mark for a reason, at the time it was a brand...

Rails: Unit Testing Update


over 10 years ago by Jay Fields on Jay Fields Thoughts.
In the past I've written about unit testing Rails applications and specifically ActiveRecord::Base unit tests. On this topic, I have friends that range...