I have two tables namely, liquids and unit,
in unit there is :name,:string which store various unit, e.g. L mL Sv
in liquids, there are
how should I define the relation between the two table, so that
liquid will display the unit name of A and B respectively
Can a liquid have more than one unit?
if not it is simple
liquid belongs_to :unit
with a unit_id in the table, instead of the :liquidAunit, :string
in a liquid table , there are many liquid and each liquid has one
Can you please paste your association? I would like to see how you
and make sure I understood your initial requirement.
Thank you Paul.
I have achieve what I want by following
I have followed exactly the example in
And I am using Activescaffold.
The field has been reconfig as follow
class CustomerController < ApplicationController
active_scaffold :customer do |config|
config.columns[:billing_address].ui_type = :select
config.columns[:shipping_address].ui_type = :select
So in my real implementation,
Customer => liquid
Address => unit