by zergsoft | Jul 8, 2017 | Uncategorized
A quick reference to format literals. %q[ ] Non-interpolated String (except for \\ \[ and \]) %Q[ ] Interpolated String (default) %r[ ] Interpolated Regexp (flags can appear after the closing delimiter) %i[ ] Non-interpolated Array of symbols, separated by whitespace...
by zergsoft | Oct 26, 2016 | Rails recipes
It is common to have custom data types in an application (whether implicitly coded or not). For example, I have an application which has a ‘sales month’ data type which is a year and month. I store it in the database as a date with the day field set to...
by zergsoft | Oct 22, 2016 | Rails recipes
The idea is with a one to many relationship you click a button on the form to add another child. For example, on a personal information form, you could click “new phone” and another phone number subform would be added. A key point is that this does *not*...
Recent Comments