class Admin::UserRoleModelsController < ApplicationController layout "admin" before_filter :authenticate_user! before_filter :is_admin? def index @user_role_models = UserRoleModel.all.entries end def show @user_role_model = UserRoleModel.find(params[:id]) end def new @user_role_model = UserRoleModel.new session[:last_page] = get_go_back || admin_user_role_models_url end def edit @user_role_model = UserRoleModel.find(params[:id]) @i18n_variable = @user_role_model.i18n_variable session[:last_page] = get_go_back || admin_user_role_models_url end def create @user_role_model = UserRoleModel.new(params[:user_role_model]) @user_role_model.save redirect_to :action => :index end def update @user_role_model = UserRoleModel.find(params[:id]) @user_role_model.update_attributes(params[:user_role_model]) redirect_to :action => :index end def destroy @user_role_model = UserRoleModel.find(params[:id]) @user_role_model.destroy @user_role_model.destroy_i18n_variables redirect_to :action => :index end end