Home > OS >  Ruby on Rails The kept [closed]
Ruby on Rails The kept [closed]

Time:09-17


od_practice.partnerships.kept.first&.omd_practice&.id

I have seen people use the word kept.first to pull data from database in ruby on rail . What does these words mean ? i have tried to do some research and i seem not find any solution. Can someone explain me please ?

CodePudding user response:

This is called a message send in Ruby. In some other languages, it might be called a method call.

It is sending the message kept with no arguments to the object that was the result of evaluating the beginning of the message chain. This message send will in turn result in an object being returned, and it is then sending the message first to that object, again with no arguments.

  • Related