Skip to content
Menu
Railshero
  • Blog
  • About Me
  • Contact Me
  • Privacy Policy
Railshero
Displaying Public Activity with rails

Displaying Public Activity with public_activity gem

Posted on July 21, 2021July 21, 2021 by Rails Hero

Activity Logs An activity log is a record of logs that track user actions performed in an app. Activity logs are useful, because if something goes wrong, an user can check their activity log and see where they messed things up. Activity logs are common in social media sites like facebook, even github has one….

Continue Reading
Adding Upvotes & Downvotes

Adding Upvotes & Downvotes in your rails app

Posted on July 21, 2021July 21, 2021 by Rails Hero

The Acts As Votable Gem We can add likes/dislikes like youtube or upvotes/downvotes like reddit with a gem called ‘acts_as_votable’. This gem provides an easy process to add a voting functionality in your app. With this gem we can add upvote/downvote buttons and also count the number of upvotes/downvotes and display them easily. Github Link:…

Continue Reading
Creating A Photo Album App With Rails

Creating A Photo Album App With Rails

Posted on July 18, 2021July 19, 2021 by Rails Hero

Creating a bare bone photo album app Today, i’ll show you how to create a basic photo album app with rails6, i’ll be using active_storage to manage uploads/attachments of our photo album. This app will be a very basic photo gallery/ablum app with just the bare bones, so no special styles, no file validations, authentication,…

Continue Reading
Adding Pagination With Kaminari

Adding Pagination With Kaminari

Posted on July 16, 2021July 16, 2021 by Rails Hero

Why Pagination ? As our list of record accumulates, we would not want to show the entire list of records in a single page, as this is impractical and will cause our rails app to get slower and slower and as well as degrade the performance of our database server. So, an easy way to…

Continue Reading
Adding search with ransack

Adding Search functionality with ransack

Posted on July 15, 2021July 16, 2021 by Rails Hero

Why a  search functionality ? Why not? why not to make life easier by adding a simple search button ? its perfectly fine if i have ten or hundreds of records. But what if i have thousands or tens of thousands of records, i or any other user would not want to waste time by…

Continue Reading
Active storage deletes previously uploaded attachments

Active storage deletes previously uploaded attachments ? how to fix

Posted on July 15, 2021July 16, 2021 by Rails Hero

The Issue So here’s the problem that i faced whenever i uploaded mutliple attachments with active record. This only happens with mutliple uploads. So i have a model called ‘albums’, and albums have ‘has_many_attached’ photos’ attachment. So that i can upload multiple photos in a single album. When creating a new album record, i didn’t…

Continue Reading
deploying fails on heroku ?

Deploying fails on heroku? here’s what you can do to fix

Posted on July 13, 2021July 15, 2021 by Rails Hero

Use heroku logs Heroku logs often provide in-depth useful information for debugging your rails apps, it shows us the exact block of code where the bug exists, sometimes it can be because of a typo or a problem with gem versions or something else. We can also use heroku logs with –tail to continuously get…

Continue Reading
custom error pages in rails

Adding custom error pages to our rails app

Posted on July 13, 2021July 15, 2021 by Rails Hero

Default Error Pages Rails already comes with its own error pages which is okay but too simple, but we can add our own custom error pages, just to make it look a lot nicer, here’s a quick and easy way on how you can do that. Popular Examples The default error pages that comes with…

Continue Reading

Serving Static Assets from an external server or CDN

Posted on July 12, 2021February 27, 2023 by Rails Hero

The Asset Pipeline The rails asset pipeline is the default way to serve assets to your rails apps, but it’s not the best and not the only way. By default rails will use the asset pipeline to serve static assets, its a quick and easy way to serve static assets, but it degrades the performance…

Continue Reading
  • Previous
  • 1
  • 2
  • 3

Tags

active record active storage assets assign to many associations attachment attachments authentication authorization avatar bootstrap cdn config database deploy deployments devise DRY environment variables file uploads Gemfile gems has_many helpers heroku index indexing initializer javascript pagination parameters postgres production public routes.rb ruby gem ruby gems search sendgrid server smtp stylesheets variants views voting

Recent Posts

  • Understanding the DRY Principle in Rails
  • Building Multi-tenant Applications with Rails
  • Rails Basics: Templating Engines
  • Deploying With Capistrano
  • Automated Testing in Rails

Archives

  • July 2023
  • June 2023
  • October 2021
  • September 2021
  • August 2021
  • July 2021

Categories

  • Active Record
  • Activity Logging
  • Apps
  • Assets
  • Attachments
  • Audio
  • Authentication
  • Authorization
  • Deployments
  • Error Pages
  • File Uploads
  • General
  • Heroku
  • Heroku
  • Pagination
  • Rails Basics
  • RubyGems
  • Search Engine Optimization
  • Search/Indexing
  • Testing
  • User Interface
  • Video
  • Views & Templating
  • Voting
  • Web Security
©2025 Railshero | Theme: Wordly by SuperbThemes
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT