eager load page tags
git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@38 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7master
parent
c713c6f321
commit
f4eb783a8a
|
@ -23,7 +23,8 @@ module ActiveRecord # :nodoc:
|
||||||
|
|
||||||
class_eval do
|
class_eval do
|
||||||
has_one :page, :foreign_key => 'owner_id', :dependent => :destroy,
|
has_one :page, :foreign_key => 'owner_id', :dependent => :destroy,
|
||||||
:conditions => "pages.owner_type = '#{options[:owner_class]}'"
|
:conditions => "pages.owner_type = '#{options[:owner_class]}'",
|
||||||
|
:include => 'tags'
|
||||||
before_save :ensure_tuxwiki_page_valid
|
before_save :ensure_tuxwiki_page_valid
|
||||||
after_save :save_tuxwiki_page
|
after_save :save_tuxwiki_page
|
||||||
end
|
end
|
||||||
|
|
Reference in New Issue