AdImage and AnBanner JS fixed

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-04-23 14:07:13 +08:00
1 parent 81b0046f42
commit 0c46b4da23
6 files changed
+22 -9

No files matched your search

+10 -5
View File
@@ -22,9 +22,14 @@ class Admin::AdBannersController < ApplicationController
def create
@ad_banner = AdBanner.new(params[:ad_banner])
@ad_banner.save
redirect_to admin_ad_banners_url
if @ad_banner.save
@active = @ad_banner
respond_to do |format|
format.js {render 'new_created_node'}
end
else
render 'create_error_msg'
end
end
def edit
@@ -40,8 +45,8 @@ class Admin::AdBannersController < ApplicationController
end
def realtime_preview
@ad_banner = AdBanner.find(conditions: { title: params[:title] }).preview_clone
#@ad_banner.update_attributes(params[:ad_banner]).update_attributes(params[:ad_images])
@ad_banner = AdBanner.first(conditions: { title: params[:title] }).preview_clone
@ad_banner.update_attributes(params[:ad_banner]).update_attributes(params[:ad_images])
end
def index