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

Version Path
wco_models-3.1.0.107 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.106 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.105 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.104 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.103 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.102 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.101 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.100 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.99 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.98 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.97 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.96 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.95 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.94 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.93 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.92 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.91 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.90 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.89 app/controllers/wco/profiles_controller.rb
wco_models-3.1.0.88 app/controllers/wco/profiles_controller.rb