I’ve used composite_primary_keys to define a legacy table in my
application -
class AircraftHistory < ActiveRecord::Base
def self.table_name() “t1010aircraft_history” end
set_primary_keys :aircraft_id, :aircraft_sequence
belongs_to :aircraft
end
I’ve generated the controller and views using -
script/generate scaffold aircraft_history
The “list” functionality works fine, but when I click on “show” or
“edit” I
get the error message -
no route found to match “/aircraft_history/show/35707,4” with
{:method=>:get}
The “35704,4” are the values for “aircraft_id,aircraft_sequence”
How to I make it able to use the combined value. I see an explanation
on the
web page about using to_s or to_param, but I’m not sure exactly how.
Thanks
Phil