TL;DR: If using :group => :some_field you might want to :order => 'NULL'. According to the man By default, MySQL...
datetime = DateTime.now date = datetime.to_date #or Date.today will assert: datetime.is_a? Date == true datetime.is_a? DateTime == true datetime.instance_of...
As you know, time zones make stuff a bit more difficult but are necessary. A time-zoned record is converted...
Wether you modify an existing named scope or add a new one, or when you write a new query, make...
If you really, really have a good reason to write raw SQL (generally a bad practice), make sure you use...
It's a good pratice to chain several named scopes like: Property.listable.for_2_or_more_guests.best_10_properties Now, to make the lesson more...
Best results in other decks
I recently encountered this error as I was trying to build assets: $ node esbuild.config.js .../node_modules/esbuild-plugin-browserslist/dist/resolveToEsbuildTarget.js:43 throw new Error('Could...
Postgres supports multiple built-in range datatypes: int4range int8range numrange tsrange (range with timestamp without timezone) tstzrange (range with timestamp...