Rails General

This is why you’re here, ain’t it? Then don’t forget this, that and the other thing.
You’ve probably been told that Ruby is a language and Rails is a framework, but truly appreciating that distinction takes time. As you progress you will sharpen your interpretation of what makes Rails, Rails. And as you become more aware of how you can leverage Rails to accomplish a given task, you will want to remember how to do it again in the future. This stack is dedicated to capturing these types of Rails framework revelations. Things that might be found in a Rails guide, if you were the author.

Nested Rails Params Hash in a Form

06/11/17  Public, Rails General

When implementing a form object approach, you'll want to create a params hash with nested areas for attributes for two different models.

Note the `manager...

1 vote - harrylevine

Rollback or forward just one migration file

01/17/17  Public, Command Line, Rails General

You can rollback, or forward, just one migration file, regardless of where it is in the stack. Thereby putting it in either the down, or up, status.

Here is the syntax:

rake db:migrate:down VERSION=20160506010740
rake db:migrate:up V...

1 vote - harrylevine

Creating a local copy of the routes.rb file to speed up your grepping of the routes

10/08/16  Public, Command Line, Rails General

Grepping your routes.rb file, for decent size projects, can take a long time. One solution to speed up this process is to create a local copy of the current state of your routes.rb ...

1 vote - harrylevine