Orbit/app/controllers/admin/module_apps_controller.rb

33 lines
773 B
Ruby
Raw Normal View History

2011-12-20 08:47:17 +00:00
class Admin::ModuleAppsController < ApplicationController
layout "admin"
2011-12-20 08:47:17 +00:00
def index
@module_apps = ModuleApp.all.entries
end
def reload_frontend_pages
@module_app = ModuleApp.find(params[:id])
respond_to do |format|
format.js {}
end
2011-12-20 08:47:17 +00:00
end
2012-01-12 06:13:41 +00:00
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
2011-12-20 08:47:17 +00:00
end