Sha256: 368e51baa5e3fb457c3f7f8ccbb1152f6dbeaa99268b7ea2de775ee5a6704104
Contents?: true
Size: 895 Bytes
Versions: 6
Compression:
Stored size: 895 Bytes
Contents
class IshManager::UserProfilesController < IshManager::ApplicationController def index @user_profiles = IshModels::UserProfile.all authorize! :index, IshModels::UserProfile end def show @user_profile = IshModels::UserProfile.find params[:id] authorize! :show, @user_profile end def edit @profile = IshModels::UserProfile.find params[:id] authorize! :edit, @profile end def update @profile = IshModels::UserProfile.find params[:id] authorize! :update, @profile flag = @profile.update_attributes params[:ish_models_user_profile].permit! if flag flash[:notice] = "Updated profile #{@profile.email}" else flash[:alert] = "Cannot update profile: #{pp_errors @profile.errors.messages}" end if params[:redirect_to] redirect_to params[:redirect_to] else redirect_to :action => :index end end end
Version data entries
6 entries across 6 versions & 1 rubygems