I’m new to Ruby on Rails and I couldn’t understand the reason. Can you help me? I’m new to Ruby on Rails and I couldn’t understand the reason. What does ‘<=>’ mean in Ruby on Rails? The problem is: I’m setting up a component structure using phlex in Rails dynamically. My product is full when initialized with prod_col, but when I do div(class: @comp.props[‘_class’]) { @product.send(@comp.props['source']) }, I get an error."
def initialize(comp, product:)
@comp = comp
@product = product
end
def template
if @comp._folder == 'prod_catalog'
plain(@product.send(@comp.props['source']))
else
div(class: @comp.props['_class']) { @product.send(@comp.props['source']) }
end
end
I’m actually sending the column of the products in the database, and I want to get the unit name or unit names of the relevant product as a return. However, I encounter this error.