From 83827f82ec04800dff095c7390651c9ef9ba16b5 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Tue, 24 Jan 2012 15:11:42 +0800 Subject: [PATCH] Fix custom image class --- app/models/design/design.rb | 2 +- app/models/page.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/design/design.rb b/app/models/design/design.rb index eb1f5e64..d499b2d8 100644 --- a/app/models/design/design.rb +++ b/app/models/design/design.rb @@ -16,7 +16,7 @@ class Design embeds_many :themes embeds_many :javascripts embeds_many :images - embeds_many :custom_images, as: :design_image + embeds_many :custom_images, :class_name => 'Image', as: :design_image validates_presence_of :title validates_presence_of :author diff --git a/app/models/page.rb b/app/models/page.rb index 1e716d4d..3c376b97 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -8,7 +8,7 @@ class Page < Item has_many :page_parts belongs_to :module_app - embeds_many :custom_images, as: :design_image + embeds_many :custom_images, :class_name => 'Image', as: :design_image def create_parts page_design = self.design