I have a price model associated to a venue model.
The price table
create_table "prices", force: :cascade do |t|
t.string "price_range"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
The price_range column holds the strings:
Up to $20,00
$20.01 to $40.00
$40.01 to $60.00
$60.01 to $80.00
More than $80.00
I want to associate the strings with the price rating ($$$$$) and colored the dollar signal according to the price_range string.
What is the best approach to do that? (Add new column to table? Javascript / Jquery?)
Aucun commentaire:
Enregistrer un commentaire