From 4f9aa630455ebc0da09e27b4e7e95fe23c4e0856 Mon Sep 17 00:00:00 2001 From: chris Date: Mon, 3 Dec 2012 18:45:32 +0800 Subject: [PATCH] Remove extra end --- app/models/page.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/page.rb b/app/models/page.rb index 7797b237..f6e95a03 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -31,8 +31,7 @@ class Page < Item page_design.layout.layout_parts.each do |layout_part| current_part = self.page_parts.detect{|page_part| page_part.name.eql?(layout_part.name)} current_part = self.page_parts.build(:name => layout_part.name) unless current_part - current_part.save if current_part.new_record? - end + current_part.save if current_part.new_record? end end