Sha256: dab99a9d99d9fbfbad0ebdb02734fccf40e5b4f1465dbd60531a286637506821

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

class UsersController < ApplicationController

  def show
    @user = User.find_by_permalink!(params[:id])

    respond_to do |format|
      format.html # show.html.erb
      format.xml  { render :xml => @user }
    end
	end

  def edit
    @user = User.find_by_permalink!(params[:id])

    respond_to do |format|
      format.html # edit.html.erb
      format.xml  { render :xml => @user }
    end
  end
  
  def update
    
    @user = User.find_by_permalink!(params[:id])

    respond_to do |format|
      if @user.update_attributes(params[:user])
        #format.html { redirect_to(@user, :notice => 'User was successfully updated.') }
        #format.html { render :action => "edit", :notice => 'User was successfully updated.' }
        format.html { render :partial => "right_show", :notice => 'User was successfully updated.' }
        format.xml  { head :ok }
        format.js 
      else
        format.html { render :action => "edit" }
        format.xml  { render :xml => @user.errors, :status => :unprocessable_entity }
        format.js
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
social_stream-0.3.3 app/controllers/users_controller.rb
social_stream-0.3.2 app/controllers/users_controller.rb
social_stream-0.3.1 app/controllers/users_controller.rb
social_stream-0.3.0 app/controllers/users_controller.rb
social_stream-0.2.3 app/controllers/users_controller.rb