Understanding Threads and Processes in Ruby

In Ruby, threads and processes are essential concepts for concurrent programming, allowing you to execute multiple tasks concurrently. Let’s delve into these concepts and explore when to use each one.

May 7, 2022 · 6 min · 1194 words · Bá Tới

Understanding Access Control in Rails: Private, Protected, and Public

In Ruby on Rails, access control plays a crucial role in determining which methods or attributes of a class can be accessed from outside the class. Rails provides three access control levels: private, protected, and public. Let’s explore each of these levels and their implications in Rails development.

April 7, 2022 · 2 min · 323 words · Bá Tới

Preparing for a Ruby on Rails Web Development Interview

Preparing for a Ruby on Rails web development interview requires a solid understanding of web development concepts, Ruby programming language, and the Rails framework. Here’s a list of common interview questions that cover various aspects of web development and Ruby on Rails.

January 8, 2022 · 16 min · 3318 words · Bá Tới

Understanding Sidekiq: A Powerful Background Job Processing Solution

In today’s web development landscape, handling background job processing efficiently has become crucial for building robust and scalable applications. Sidekiq stands out as a popular choice among developers due to its simplicity, reliability, and powerful features.

March 2, 2020 · 4 min · 786 words · Bá Tới

Understanding CSRF in Ruby on Rails

CSRF (Cross-Site Request Forgery) is a type of attack where an attacker tricks a user into performing unintended actions on a web application in which the user is authenticated. In Rails, CSRF protection is implemented to prevent such attacks. This article explains what CSRF is, how it works in Rails, and the mechanisms used to prevent CSRF attacks.

January 7, 2020 · 3 min · 483 words · Bá Tới

Ruby on Rails Best Practices

In Ruby on Rails, following best practices is essential for writing clean, maintainable, and efficient code. By adhering to established conventions and guidelines, developers can optimize their codebase, improve performance, and enhance the overall quality of their Rails applications. Let’s explore some of the best practices for Ruby on Rails development.

October 4, 2016 · 5 min · 868 words · Bá Tới

Prevent Content Type Spoofing on Paperclip

If you have ever used paperclip, maybe you have seen the message like that: Image has contents that are not what they are reported to be. For this bug, we will have two solutions: specify an extension that cannot otherwise be mapped or override media_type_spoof_detector method.

October 3, 2016 · 2 min · 221 words · Bá Tới

Ruby Best Practices

In Ruby, following best practices is essential for writing clean, maintainable, and efficient code. By adhering to established conventions and guidelines, developers can optimize their codebase, improve performance, and enhance the overall quality of their Ruby applications. Let’s explore some of the best practices for Ruby development.

October 3, 2016 · 2 min · 417 words · Bá Tới

Proc, Lambda, and Block in Ruby

In Ruby, you can invoke, execute, or run Threads, Anonymous functions, Strings, and even methods that have been turned into objects. Let’s delve into the Callable and Runnable nature of Objects in Ruby.

October 2, 2016 · 4 min · 684 words · Bá Tới