What part of the code below causes the method #decrypt_data to be run? class MyModel < ApplicationRecord after_find :decrypt_data end

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
What part of the code below causes the method #decrypt_data to be run?
class MyModel < ApplicationRecord
after_find :decrypt_data
end

1.MyModel.first.update(field: ‘example’)

2.MyModel.where(id: 42)

3.MyModel.first.destroy

4. MyModel.new(field: ‘new instance’)

Posted Date:-2022-09-17 04:10:29


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!