Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

juozasgaigalas (at gmail)'s latest activity

Wednesday, November 25 2009
2435 "Polymorphic has_one and has_many should set proper polymorphic_type in case ... was updated in Ruby on Rails
  • juozasgaigalas (at gmail)
    juozasgaigalas (at gmail) commented at 9:53 AM

    Same code as above but with formatting.

    Votables

    class Poll < ActiveRecord::Base
      has_many :possibles 
    end
    
    class RankingPoll < Poll
      has_many :votes, :as =>...
  • juozasgaigalas (at gmail)
    • Tag set to belongs_to, polymorphic_association, sti
    • Assigned user cleared.
    by juozasgaigalas (at gmail) at 9:50 AM

    I have a case where I think this patch makes sense.

    Votables:

    class Poll < ActiveRecord::Base
    has_many :possibles end

    class RankingPoll < Poll
    has_many :votes, ...