what is the difference between the Observers and Callbacks in Ruby on Rails?



what is the difference between the Observers and Callbacks in Ruby on Rails?..

Answer / Karan Majumdar

In Ruby on Rails, both observers and callbacks are used for handling events. However, observers allow you to observe multiple models at once and execute code when associated events occur. Callbacks, on the other hand, are methods that get executed automatically when a specific event occurs within a model.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby on Rails Interview Questions

iam new to the ruby on rails. suggest me some pdf and online books for ruby and rails

1 Answers  


What role do sub-directory app/helpers and app/controllers play?

1 Answers  


what is session and cookies

4 Answers  


how many types of callbacks available in ror?

1 Answers  


What is the current version of ruby on rails?

0 Answers  


Why we use migration in rails?

1 Answers  


When are self.up and self.down methods used?

1 Answers  


How can you protect filter methods in rails?

1 Answers  


How many filters are there in rails.

1 Answers  


what is Mixin in Rails?

1 Answers  


How many types of relationships does a model has?

1 Answers  


What is action cable?

1 Answers  


Categories