While working on Rails 2.3.18 to Rails 3.2.x migration I am facing name issue in type
column
Here is the relation that is defined.
app/models/reservation.rb
class Reservation
end
class Reservation::Guest < Reservation
end
class Reservation::Event < Reservation
end
While saving Reservation::Guest
Or Reservation::Event
instance, the type
value being saved is Reservation::Guest
and Reservation::Event
in Rails 3. But in Rails 2 it saves without namespace i.e., Guest
or Event
.
It requires lots of efforts to migrate existing data and change all the places which expects type
without namespace.
Would it be possible to save type
without namespace and rest work without making lots of modification across the application?
Guest = Reservation::Guest
, I don't think its best to change the type at runtime, as there might be many dependent things. – Perspire