Sha256: 858d8c35b9181ba7e164dd959356931c590a619f53f0beca3468d81f1006bb02
Contents?: true
Size: 620 Bytes
Versions: 108
Compression:
Stored size: 620 Bytes
Contents
class Wco::ProfilesController < Wco::ApplicationController def update @profile = Wco::Profile.find params[:id] authorize! :update, @profile # if params[:photo] # photo = Photo.new :photo => params[:photo] # @profile.profile_photo = photo # end flag = @profile.update params[:profile].permit! if flag flash_notice "Updated profile #{@profile.email}" else flash_alert "Cannot update profile: #{@profile.errors.full_messages}" end if params[:redirect_to] redirect_to params[:redirect_to] else redirect_to request.referrer end end end
Version data entries
108 entries across 108 versions & 1 rubygems