2

So I am starting to integrate my rails application with react, and I am using react-rails gem.

It works fine, but I have the following problem:

I am creating a component and I want to pass an instance variable as props to this component. But one of the information that I need comes from a join between tables like this:

@Model1.Model2.Model3.name

And inside my jsx file I cannot do this join like I can in erb files.

Any ideas how to solve this? I use delegates but I am not sure how to do a delegate to obtain the name value like the example above.

Gabriel Mesquita
  • 2,271
  • 1
  • 20
  • 30

0 Answers0