Sha256: 47b250ae01bbb049cc47eb68334892230b5ec0d54dd88ce60d55663e4edf225c

Contents?: true

Size: 761 Bytes

Versions: 10

Compression:

Stored size: 761 Bytes

Contents

class UsersController < InheritedResources::Base
  load_and_authorize_resource

  respond_to :html, :xml, :js
  
  def index
    @users = User.alphabetic.
                  letter(params[:letter]).
                  search(params[:search]).
                  tagged_with(params[:tag]).
                  page(params[:page]).per(10)

    index! do |format|
      format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') }
    end
  end

  # Supported through devise
  def new; end; def create; end
  # Not supported yet
  def destroy; end

  protected

  # Overwrite resource method to support slug
  # See InheritedResources::BaseHelpers#resource
  def resource
    @user ||= end_of_association_chain.find_by_slug!(params[:id])
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
social_stream-base-0.7.2 app/controllers/users_controller.rb
social_stream-base-0.7.1 app/controllers/users_controller.rb
social_stream-base-0.7.0 app/controllers/users_controller.rb
social_stream-base-0.6.8 app/controllers/users_controller.rb
social_stream-base-0.6.6 app/controllers/users_controller.rb
social_stream-base-0.6.5 app/controllers/users_controller.rb
social_stream-base-0.6.3 app/controllers/users_controller.rb
social_stream-base-0.6.2 app/controllers/users_controller.rb
social_stream-base-0.6.1 app/controllers/users_controller.rb
social_stream-base-0.6.0 app/controllers/users_controller.rb