Re: [Rails-core] Predictable seed

2016-02-17 Thread Derek Prior
Interesting idea. If what you're after is consistent data, why are you randomizing anything? On Wed, Feb 17, 2016 at 9:48 AM, Ben Colon wrote: > Hey there, > > In many projects, I guess like everyone, we're using the seed file to > generate a bunch of models with random data. > Obviously, after

Re: [Rails-core] [Performance Improvement Idea] Add multiple columns to table using single ALTER statement

2015-10-17 Thread Derek Prior
I believe change_table, perhaps in combination with the bulk option, will do what you want. http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table > On Oct 17, 2015, at 7:25 AM, Gaurish Sharma wrote: > > To add 2 new cols to existing tab

[Rails-core] Make view and controller translation helpers consistent

2015-08-30 Thread Derek Prior
My co-workers and I are often tripped up by the slight differences between [ActionView::TranslationHelper#translate][1] and [AbstractController::Translation#translate][2]. Many people assume these are the same method, but they are not. There are some differences that likely make sense -- It's n