Displaying 1 result from an estimated 1 matches for "day_show_path".
2008 May 12
0
Problems with form_for, STI, and polymorphic routing
...e class, and
have DayShow and NightShow that inherit from it.
###
class Show < ActiveRecord::Base
end
class DayShow < Show
end
###
In my shows/edit.html.erb, I have:
<% form_for(@show) do |f| %>
However, when I use it with a @show that has class DayShow, I get:
undefined method `day_show_path'' for #<ActionView::Base:0x2382bb8>
So it''s trying to use the STI class name, instead of the base class
name, to generate the routes.
Digging around on Google, it seems that a few people have run into
this, but I haven''t been able to find a solution. Can I use...