Adding translations to your Rails website

In this article I will explore the steps and code necessary to add I18n (internationalization: localization and translation) to this website. Topics included involve routing, static content, and dynamic content.

In Ruby On Rails By Leigh Halliday January 17, 2015

Leigh Halliday

Can I Use Angular in my Rails App?

Single Page Applications (SPA) aren’t incredibly new any more, but there are a lot of people with Rails applications using a more traditional server-side Rails approach to the website’s architecture. The question is whether we can use Angular inside of a more traditional Rails application? Here's how I was able to make it work.

In Ruby On Rails By Leigh Halliday January 06, 2015

Leigh Halliday

User Authentication in Rails

In this article I'd like to discuss how to implement user authentication into this blog. This is useful to be able to hide sensitive information that should only be invisible to a single user, or to limit access to entire sections (admin panel) of the website only to someone who has authenticated. I'll implement user authentication using the Sorcery gem.

In Ruby On Rails By Leigh Halliday January 03, 2015

Leigh Halliday

Building an admin section in Rails

This website, along with most of the other ones I create end up having an admin section; a place where data can be created and managed. It's only accessible to registered users (or possibly a subset of those users), and has a different look and feel to it than the rest of the website. In this article we'll go through how to set up the routing, controllers, a namespaced environment, and how to handle user access/permissions.

In Ruby On Rails By Leigh Halliday December 18, 2014

Leigh Halliday

Postgres Insights with PgHero

Here is a quick look at the PgHero gem. PgHero gives you some quick insights into the performance of your Postgres database, especially relating to slow queries and where you are not using indexes efficiently. It provides an easy to understand and nicely designed interface which is easy to install and access.

In Ruby On Rails By Leigh Halliday December 15, 2014

Leigh Halliday

How to model data in Rails

Now we're ready to start planning out what models we need in our application. The best way I think for deciding what models are needed is to think about our website and what features and pages it will have, and then to think about what models are needed to satisfy the desired features. After that we'll show how to determine how they are related to each other, and then how to create database tables and Rails classes.

In Ruby On Rails By Leigh Halliday December 14, 2014

Leigh Halliday

Getting Started with Ruby on Rails

After deciding to make a website with Ruby on Rails, you'll need to get your environment set up. This can seem daunting at the beginning, but in this article I'll try to point out some of the tools you'll need and resources you can use to get up and running. I'll walk through creating a git repo, installing some basic tools, creating a new rails app, and some foundational gems we'll use.

In Ruby On Rails By Leigh Halliday December 08, 2014

Leigh Halliday

Which technologies should I use for my website?

Now that I've decided to make this website from scratch, there are a number of decisions to make in terms of what technologies to choose from. I've broken things down into 4 sections: Frontend, backend, data, and hosting.

In Ruby On Rails By Leigh Halliday December 06, 2014

Leigh Halliday

Why make a blog?

What's it like to start a website from scratch? It could be a personal one like this one, or it could be the website for your company, or really anything you want to get online. There are inevitably a number of decisions and steps you need to take in order to take it from an idea to something concrete. I'm going to walk through as many of those steps that I can in this series of articles.

In Ruby On Rails By Leigh Halliday December 04, 2014

Leigh Halliday

Confident Ruby by Avdi Grimm reviewed

Confident Ruby by Avdi Grimm is a book about taking sheepish and nervous Ruby code and transforming it into confident and straight forward code. It's about focusing on the task at hand in front of you, rather than looking over your shoulder to make sure nobody is sneaking up behind you. In this article I take a look at what I got out of the book and give a quick overview of the topics that it discusses.

In Ruby On Rails By Leigh Halliday December 02, 2014

Leigh Halliday

Mail Interceptors and Observers for Logging and Development

ActionMailer gives you two ways to inject filters into your email messages either before the are sent (an Interceptor) or after they are sent (an Observer). Using Interceptors and Observers is a great way to modify behaviour in the development environment, by only emailing people from a white listed list of emails, and they are also a great way to log the mail that is being sent by your system.

In Ruby On Rails By Leigh Halliday November 28, 2014

Leigh Halliday

Responding with JSON in Rails

A high-level overview of the best options available for developers that are building an API that responds in JSON. What are the tools to use and what are some of the different JSON formats.

In Ruby On Rails By Leigh Halliday November 27, 2014

Leigh Halliday

Block Based Configuration

Have you ever wondered how the gems you use have implemented the block based configuration that you see? This tutorial will show you how to set it up, how to use it, and some tricks to deal with values that change after your app has already been initialized.

In Ruby On Rails By Leigh Halliday November 24, 2014

Leigh Halliday

RubyConf Portugal

What are programming conferences like? Who attends them? Why should you attend one? Recently I attended RubyConf Portugal, in Braga, Portugal. Here's what it was like.

In Ruby On Rails By Leigh Halliday November 16, 2014

Leigh Halliday

Translating Your Ruby on Rails Application

A guide on how I set up my Rails applications that are available in multiple languages. Which gems to use, how to set up your routes, and a general guide to this process. Buena suerte!

In Ruby On Rails By Leigh Halliday November 13, 2014

Leigh Halliday

Frontend (React, Javascript)


Software Development