Firstly, we check the definitions below. server This Server header seems to advertise the software being run on the server but you can remove or change this value. permissions-policy Permissions Policy is a new header…
Category: Ruby On Rails
How rails stores sessions and validate?
Devise, like any Rails application, uses Rails’ session storage mechanisms to manage user sessions. Where Devise stores session data on the server side depends on the session store configuration in your application….
Rails event-driven with pub/sub
As we know, Ruby on Rails is full stack framework, a monolith application. Good, there is no best architecture, only the “fit for purpose” architecture. We can find many pros and cons…
Restart Puma Server with zero downtime
As a ruby on rails developer, I also think about the performance and availability dimensions of system. We know that the blue green deployment help us this problem. But we don’t really…
Rails 7 Importmap pin import and preload
When we pin a file, it would go here which is a map of urls. This is the instruction for browser. Let’s say we have this directory. After “pin” we “import”. “Import”…
Importing CSV Big Data Into Rails
How do we import properly the csv file? Some time we deal with a big file. We don’t want to make too much memory consumption. Because you know, it needs to store…...
Dynamic schedule sidekiq jobs
Simple Scheduler In order to make scheduler in sidekiq, we install this gem. There are type ways of scheduler. We normally configure the fixed schedules in sidekiq.yml. But if we want to…...
How Rails 7 uses import maps
Rails has a big change for Javascript ecosystem. It migrates from webpack to import maps. We have different way to import a javascript file. So how do the import maps work? Import…
Rails Rspec testing configuration
We use factory bot rails for creating factories which are model data. Faker to create fake data for factories. Shoulda matcher for matching the expectations. Database cleaner for proactively cleaning database active…
Rails console tips
Autocomplet using TAB Sandbox rails c –sandbox API request app.post “http://localhost:3000/users/toggle_verified”, params: {id:1} List tables ActiveRecord::Base.connection.tables Hide sql