In Ruby on Rails, an enum is an attribute where the values map to integers in the database and can be queried by name.
For example, we could define an enum for the
status attribute, where the possible values are
Ruby on Rails added support for enums in Rails 4.1.
Adding an enum to an existing model is as simple as adding an integer column to that table. You can generate a new migration by using the following bash command:
$ bundle exec rails g migration AddStatusToUsers status:integers
This will generate the following migration:
In the last article, we went through all the steps needed to set up our development environment with Ruby and Ruby on Rails, we installed ActiveAdmin into our application and created the model and AA resource for Clients. The code is available here.
SEO can be a gold mine for people looking to drive free traffic to their website. It can be extremely challenging since Google’s Ranking Algorithm is proprietary (we don’t know how it works) and all we can do is guess based on how Google responds to search queries. The more you read about how to get started with SEO the most confused you might get. Truth be told, SEO is hard. But there might an easier approach to getting started.
First of all, the SEO landscape is not the same as it was 15–20 years ago. Back then, Google’s algorithm…
Ruby on Rails and Django are two of the best and most popular web development frameworks out there. How do you choose the right one for your new project in 2021?
Both Ruby on Rails and Django are long-lived web development frameworks, but they are still two of the most preferred. They share a lot of similarities, but each is unique in its own way. Their resemblances revolve around the fact that both programming languages are dynamic and object-oriented. How can you choose the one that suits you best?
Certainly, the best way to choose is according to your needs…
Website Redirects are very important for both visitors interacting with the website and search engines. Redirects are crucial to preserving the SEO of websites. Top ranking websites in terms of SEO require the user experience to be faster, more comfortable, and more secure. In this blog, we will discuss the nuts and bolts of website redirects.
Website redirects are web code commands. A redirect happens when a web page is visited at an old URL and it later changes into a new URL. Consider this example: a user opens website.com/home in their browser and is then redirected to website.com/about-us.
I’m a senior Ruby on Rails engineer with a background in building enterprise software for SaaS companies. My co-founder is also a senior engineer with a background in building enterprise data processing pipelines. We co-founded a start-up to build an appointment management system for dental clinics and beauty salons. Building the MVP, around 2018, was the best experience!
My co-founder had a dentist friend who was eager to use our CRM in her dental practice. …
Building a Customer Relationship Management system is an extremely hot topic among software engineers nowadays. With the current health environment pushing more and more businesses to consider going online, the demand for CRMs is higher than ever.
While there are some obvious champions in this field (yes, of course, I’m talking about Salesforce), some businesses don’t want something as complex and expensive as that.
I’ve also noticed a trend recently, where people prefer using niche CRMs rather than generic solutions. The owner of a beauty clinic would rather use a CRM where the customer is called a client, where they…
Our lives are inevitably moving more and more towards being 100% online. On average, every US consumer had 12 digital subscriptions as of January 2020, with Millenials leading the stats with over 17 digital subscriptions. With this number also comes a subtle pain felt by every digital subscriber...
Our first customer interview for the SEO tool we are building surfaced unexpected pains of small business owners when it comes to digital subscription services.
Talking to your customers early on when building a product is probably the first piece of advice you read when researching what entrepreneurship is all about. …
Meta Descriptions hold a prominent place behind the success of SEO campaigns. If you are planning to get the most out of your SEO efforts, you need to have a clear picture of what they are and how to use them.
The Meta Description is the summary of a web page. This meta description will be shown when that specific website is displayed on search engine results pages.
The Page Title, also called the Title Tag, Meta Title or SEO Title, is the HTML element representing the title of the web page.
The Page Title is a piece of HTML code, part of the Head section, representing the title of the webpage.
Titles are important for usability, are pivotal for SEO and displaying links being shared on Social Media (Facebook and Twitter).
The title is meant to be an accurate and brief description of the content.
The Meta Title is displayed on the Search Engine Results Page (SERP) and is the clickable part for every result.
Ruby on Rails Software Engineer Consultant. Bristol University alumnus. Founder of Organisely. Author of Modern Rails.