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.
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 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.
I wanted to show some love for a gem I just discovered which helped migrate our FlipGive test suite from RSpec 2.x to the latest 3.x branch. The gem is called Transpec, written by Yuji Nakayama.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
How to generate barcodes (and more specifically QR codes) in Ruby on Rails using the Barby gem.
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!