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

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-05-16 16:42:43 +08:00
1 parent a31a9c4792
commit befd3bcdec
10 files changed
+73 -11

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