Change ad_banner preview from using title to id

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-04-25 16:10:11 +08:00
1 parent 72921d6dfd
commit 7f285f4719
5 files changed
+23 -23

No files matched your search

@@ -45,8 +45,8 @@ class Admin::AdBannersController < ApplicationController
end
def realtime_preview
@ad_banner = AdBanner.first(conditions: { title: params[:title] }).preview_clone
#@ad_banner.update_attributes(params[:ad_banner]).update_attributes(params[:ad_images])
@ad_banner = AdBanner.find( params[:id] ).preview_clone
@ad_banner.update_attributes(params[:ad_banner])#.update_attributes(params[:ad_images])
end
def index