make design work with layout and testing with package andreas05 within r tag

This commit is contained in:
Kaito committed 2011-08-01 18:17:28 +08:00
1 parent b6db304579
commit c8d58e30aa
4 files changed
+9 -4

No files matched your search

+6 -2
View File
@@ -25,9 +25,13 @@ class Admin::DesignsController < ApplicationController
def apply
@design = Design.find(params[:id])
Layout.create(:name => @design.title,:description=>@design.intro,:content=>@design.layout.file.read)
#TODO do somehting to validate
debugger
doc = Nokogiri::HTML(@design.layout.file.read)
# doc = Nokogiri::HTML(@design.layout.file.read)
flash[:notice] = "Successfully applied design and created a layout."
redirect_to admin_designs_url
end
def edit_file