I have the following models:
class MainService < ActiveRecord::Base
class TravelService < ActiveRecord::Base
I can use the following:
@main_service.travel_service = TravelService.new
But I can’t use the following:
@main_service.send(“travel_service”) = TravelService.new
It says " unexpected ‘=’, expecting $ "
What’s the correct way of using the “send” method?
(I think this is mainly due to my bad ruby knowledge )
Thanks in advance for any help.