fix ad_banner. new ad_image with best size from ad_banner. content editable at tab

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-17 23:35:46 +08:00
1 parent 5d5e798b1a
commit 16ada34585
9 files changed
+159 -13

No files matched your search

@@ -6,7 +6,7 @@ class Admin::AdBannersController < OrbitBackendController
def rename
@ad_banner = AdBanner.find(params[:id])
@ad_banner.title = Nokogiri::HTML.fragment(params["body"]).at("a").children().to_s
@ad_banner.title = params[:body]
render :json => {:success =>@ad_banner.save!}
end
def destroy
@@ -18,7 +18,8 @@ class Admin::AdImagesController < ApplicationController
end
def new
@ad_image =AdImage.new
ad_banner = AdBanner.find params[:ad_banner_id]
@ad_image =ad_banner.ad_images.build
@ad_image.post_date = Date.today
@ad_image.unpost_date = Date.today + 30
#render :action => 'new',:url=> {:ad_banner_id => params.has_key?(:ad_banner_id)? params[:ad_banner_id],nil}