Recently I’ve formed a bit of an unhealthy obsession with mechanical keyboards, and one of the first boards I’ve picked up is the infamous Vortex Core.
Continuing on from the chapter 1 runthrough of Rails 4 in Action updated for Rails 5, today I’ll cover the testing frameworks that we originally covered in chapter 2. Testing will once again save our bacon!
Lots of people have asked me, since the release of Rails 5, a couple of things:
1. Will there ever be a Rails 5 in Action? (if there is, I won’t be writing it)
and, more importantly:
2. Can Rails 4 in Action be read and used with Rails 5?
So far my response has been “it likely can, with a few gem version bumps” but I haven’t known the answer for sure. Time to find out, chapter by chapter, line of code by line of code! Let’s dig in.
Rubygems, the package manager for Ruby, has long had this neat little functionality to let you specify the version of a gem you want to use, when running a gem-related command. If you have two versions of Rails installed, say versions 4.2.8 and 5.0.2, you can specify which to use by prefixing the command with a specially-formatted version number.
Today I learned that by default, Ecto doesn’t read data back from the database, after writing new or updated data.
The scenario: A trigger in the database, that calculates the new value of a field before insert or update. The person who presented this problem was quite convinced that the trigger wasn’t running in their tests, based on code like the following:
So after I wrote my last post, I heard from several people that they’d vaguely heard of this Esperanto thing, didn’t know anything about it, could I please tell them a little more? Absolutely! Enjoy!
Note: Some of this may be somewhat factually inaccurate, as I am only a komencanto (beginner) and working off about six months casual learning.
(I’m undecided about writing this post. I’m not sure if it’s going to get laughed at, totally ridiculed, either, both, or something else entirely. Here goes!)
Some people know about my interest in foreign languages. They might even know that I’ve been following and learning Esperanto since it first appeared on Duolingo. Today I’m taking the next step in my learning :)
People who know me, know that I’m an avid reader. I spend hours every day soaking up news feeds, novels, and all kind of text.
But I don’t do a lot of writing. Sure, I’ve co-written a book, but that was so last year. I still have a lot of ideas buzzing around in my head, but I never seem to find the time to put pen to paper (or fingers to keyboard) and organize my thoughts into coherent blog posts, short stories, or instructional topics and guides.
Written using Phoenix 1.1
Internationalization - what is it?
Internationalization (henceforth called i18n, because programmers are lazy and hate typing long words) is the process of adapting a web application for use in different languages or cultures. Any application that allows you to change your language has implemented i18n. It’s a close sibling of localization (L10n) - the process of actually implementing a different language/culture in a web app. Once support for i18n has been included in an app, it can be localized. This may involve adding new text strings in a different language, or configuring different date formats.
- Page 1 of 2