AdBanner reopen new banner and delete. Rename title with content editable tag.

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-17 06:44:14 +08:00
1 parent 7f2564a81e
commit a3acd865d7
9 files changed
+70 -7

No files matched your search

@@ -4,6 +4,11 @@ class Admin::AdBannersController < OrbitBackendController
before_filter :for_app_manager,:except => [:index,:show]
before_filter :for_app_sub_manager
def rename
@ad_banner = AdBanner.find(params[:id])
@ad_banner.title = Nokogiri::HTML.fragment(params["body"]).at("a").children().to_s
render :json => {:success =>@ad_banner.save!}
end
def destroy
@ad_banner = AdBanner.find(params[:id])
@ad_banner.destroy