Case:
I have a model (” ride_request “)
in ride_request there are two fields ( pickup_location , dropoff_location )
both fields (pickup and dropoff) are instances of one model (location)
Here is my migrate
create_table :ride_requests do |t|
t.integer :pickup_location
t.integer :dropoff_location
Question:
How do I create a relation to location in the fields pickup/drop when normaly you would use location_id?
you can use :class_name and :foreign_key to indicate the differences