Modifications asset pipeline

This commit is contained in:
chris2tof committed 2011-08-20 22:54:07 +08:00
1 parent 20afb23a5f
commit e74f2931b1
667 files changed
+20 -128620

No files matched your search

+2 -4
View File
@@ -61,7 +61,6 @@ class Admin::DesignsController < ApplicationController
['themes', 'javascripts', 'images'].each do |type|
eval("#{type}_entries").each do |entry|
#incompleted
filename = File.basename entry.to_s
temp_file = File.new(dir + '/' + filename, 'w+')
temp_file.binmode
@@ -69,7 +68,6 @@ class Admin::DesignsController < ApplicationController
build_and_store = eval("design.#{type}").build
build_and_store.file = temp_file
build_and_store.file_filename = filename
# build_and_store._type = (File.extname entry.to_s).delete '.'
build_and_store.to_save = true
end
end
@@ -91,7 +89,7 @@ class Admin::DesignsController < ApplicationController
@design = Design.find(params[:id])
if @design.update_attributes(params[:design])
flash[:notice] = "Successfully updated design and tasks."
redirect_to admin_designs_path(@design)
redirect_to admin_designs_url(@design)
else
render :action => 'edit'
end
@@ -133,7 +131,7 @@ class Admin::DesignsController < ApplicationController
@design = Design.new(params[:design])
if @design.save
flash[:notice] = "Successfully created design and tasks."
redirect_to admin_designs_path
redirect_to admin_designs_url
else
render :action => 'new'
end
@@ -68,7 +68,7 @@ class Admin::PurchasesController < ApplicationController
design.structure_css = temp
['themes', 'javascripts', 'images'].each do |type|
eval("design.#{type}").each do |object|
design.send(type).each do |object|
title = object.file_filename
temp = File.new(dir + '/' + title, 'w+')
temp.write orig_zip.read(zip_name + '/' + type + '/' + title)