Listing for Module-apps

This commit is contained in:
Matthew Fu committed 2012-01-12 14:13:41 +08:00
1 parent 3d9fd359ed
commit c0efb5d1bc
4 files changed
+83 -38

No files matched your search

@@ -12,4 +12,22 @@ class Admin::ModuleAppsController < ApplicationController
format.js {}
end
end
def edit
@module_app = ModuleApp.find(params[:id])
end
def update
@module_app = ModuleApp.find(params[:id])
unless params['module_app']['enable_frontend'].nil?
@module_app.update_attribute('enable_frontend',params['module_app']['enable_frontend'])
@module_app.save!
end
@attribute = @module_app
respond_to do |format|
format.html { redirect_to :action => :index }
format.js { render 'admin/attributes/toggle_enable' }
end
end
end