Ruby on Rails
-
Running a Single-User Mastodon Instance
How I use my domain in my Mastodon username, settings I recommend for single-user servers, and migrating to a new instance.
-
This Gem is Mentionable
is a gem that provides support for inbound Webmentions and microformats in Rails apps.
-
has_few :god_objects
We can achieve better object design and smaller interfaces by defining associations in one direction only.
-
Flowing Text Around Images
Magazines, books, and other print layouts sometimes use images that overlap with the text, and have that text wrap around the shape of the image. It can make for an interesting effect, bringing a feeling of motion into a static medium. Done right, the text and image become conceptually closer in...
-
CSS-only Submenu Navigation with Post Tags
Our posts have categories, which I’ve used as a “collection” or “series” of posts that are on related topics. Recently, I’ve been writing up campaign notes for my D&D session as the characters themselves in a category simply called Campaign Logs. I’m also hoping to continue to write this type...
-
A Site Reborn
I’ve moved my Jekyll site into a Rails app, and I’ve done just enough work to have every post render without errors and added just enough style to make things readable. Some of the site still looks pretty bad, and none of it looks good yet. But that’s ok, because my plan is to rebuild and...
-
Need a Slug?
Rails provides its own slug generator, so you may not need another gem.
-
Multi-table Full Text Search in Postgres
Easily searching across an application’s data is a pervasive need. If you are lucky, you can get away with simple sorting or searching on a single column, but it is more likely that you need full text search across multiple models, all from a single search
<input>
.Thanks to the power of ...
-
Not Invented Here
Rails is a mixture of design patterns, practices, and magic. In this talk, we’ll explore how Rails embraces ideas from other frameworks and projects.
Active Record was born of Martin Fowler. MVC was the brainchild of Trygve Reenskaug. Rails 3 completely absorbed the Merb project, gaining...
-
Store Page Titles in I18n
While the title element is one of the only required tags in HTML, it is often overlooked by developers and designers alike until the end of the development process.
-
Strong Parameters as Documentation
Besides moving attribute whitelisting to the controller rather than the model, Rails 4’s move to Strong Parameters over
attr_accessible
provides great documentation about the data with which records are being created.