I am using Single Table Inheritance and have comments on all the subclasses. I am only using 1 controller for all the different STI types. When the form_for helper generates a U
Yep, just use AR::Base#becomes.
AR::Base#becomes
Say your base class is Account, which is subclassed to GuestAccount and LoginAccount.
Account
GuestAccount
LoginAccount
@account.is_a? LoginAccount? #=> true
Then you can just do a
form_for [@account.becomes(Account), @comment] do |f| ...