Explore Ruby on Rails: Random Questions and Expert Answers

Ruby on Rails Random Questions and Answers
Render vs redirect vs redirect_to
Joins vs Include
Resource vs Resources
Custom Exceptions
Yield
False and nil
String vs Symbol
REST vs RESTful
Asynchronous vs Synchronous vs Broadcast
Observer vs Callbacks
Association
Polychromic Association
Single Inheritance
Super vs super()
Dig, Float and Max
Blocks vs Proc vs Lambda
Threads
Collection
Select vs Pluck
Each vs Map vs Collect vs Detect vs Inject
Constant
Enum
Include vs Require
Extend vs Include vs Require vs Load
Definition vs Declare vs Initiate
Gem vs Plugins vs Engine
How should you use nested layouts?
What is the purpose of the rake file available in the demo directory in Ruby?
Delete vs Destroy
Find vs Find_by vs Where
What is the difference between &&, || operators and "and, or"?
Can you explain the difference between ActiveSupport’s “HashWithIndifferentAccess” and Ruby’s “Hash”?
String and Text
Save vs Save!
! (bang) Marks in Rails
Naming Conventions
Does Ruby Support Single Inheritance/Multiple Inheritance Or Both?
Content for vs Yield
form_with vs form_for
How would you choose between Belongs_to And Has_one?
What sort of problems you have faced with Ruby on Rails and how do you think the same can affect the projects?
How To Use Two Databases Into A Single Application?
Explain Ruby on Rails Exception Handling
Flatten
Compact
How to check if a specific key is present in a hash or not?
How Do I Find Only Duplicate Entries In A Database Table?
Rest-full Architecture
Session (max size 4kb) and Cookies
How To Serialise Data With Yaml?
Rest vs Soap
Singleton
Application Server vs Web Server
Member Routes vs Collection Routes
XML vs JSON vs BSON
to_proc method
Splat operator
Require vs Require Relative
Load vs Autoload
Is Ruby statically or dynamically typed?
Send in Ruby
Count vs Length vs Size
What are initializers in Rails?
Fat models, skinny controllers
Class Methods and Instance Methods
Poro
Does Ruby allow multiple inheritances?
Is Ruby strongly or weakly typed?
When do we use “self” in Ruby?
What is the difference between a class and a module?
What is the difference between select, map, and collect?
Can you call the base class method without creating an instance?
Method Overloading vs Method Overriding
How to achieve data abstraction?
Delegates
Shallow Copy and Deep Copy
Polymorphism
Explain Normalisation and De-Normalisation
Views in Database
Indexing in Database
Primary Key vs Composite Key vs Unique Key vs Foreign Key
Views and Stored Procedure
Delete vs Truncate vs Drop
Self Join and Self Join Condition
Where vs Having vs Group By vs Order By
How to Remove Duplicate Rows in SQL
Resolution Operator
Override ActiveRecord Method (to_params)
Freeze
to_s in Active Record
rescue_from
Static Variable or Static Function
Mixin
Encapsulation in Ruby
Multithreading
has_and_belongs_to_many vs has_many_through
class_eval, instance_eval
after_commit vs after_save vs after_create
Put vs Patch
Update vs update_all
Nullify
Can we use external file in Action Mailer format instead of inline?
Implicit block vs Explicit block
Bottleneck
Autoload
alias_method
Cacheable
Metaprogramming
How does Puma work?
How migration works in Rails?
Performance issue in Ruby on Rails
Best advice for Ruby on Rails
How to use CDN for assets in Ruby on Rails
Rails Deployments
Scroll to Top