33 lines
773 B
Ruby
33 lines
773 B
Ruby
class Admin::ModuleAppsController < ApplicationController
|
|
layout "admin"
|
|
|
|
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
|
|
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 |