Sha256: 4b4149914e337e87255e4dbce5638bbc4b0cac2e2292a5574159e8d2949addc4

Contents?: true

Size: 699 Bytes

Versions: 19

Compression:

Stored size: 699 Bytes

Contents

class UsersController < ApplicationController
  include SocialStream::Controllers::Subjects

  load_and_authorize_resource except: :current

  before_filter :authenticate_user!, only: :current

  respond_to :html, :xml, :js
  
  def index
    raise ActiveRecord::RecordNotFound
  end

  def current
    respond_to do |format|
      format.json { render json: current_user.to_json }
    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

19 entries across 19 versions & 2 rubygems

Version Path
social_stream-2.1.1 base/app/controllers/users_controller.rb
social_stream-2.1.0 base/app/controllers/users_controller.rb
social_stream-base-2.1.0 app/controllers/users_controller.rb
social_stream-2.0.4 base/app/controllers/users_controller.rb
social_stream-base-2.0.4 app/controllers/users_controller.rb
social_stream-2.0.3 base/app/controllers/users_controller.rb
social_stream-base-2.0.3 app/controllers/users_controller.rb
social_stream-2.0.2 base/app/controllers/users_controller.rb
social_stream-base-2.0.2 app/controllers/users_controller.rb
social_stream-2.0.1 base/app/controllers/users_controller.rb
social_stream-base-2.0.1 app/controllers/users_controller.rb
social_stream-2.0.0 base/app/controllers/users_controller.rb
social_stream-base-2.0.0 app/controllers/users_controller.rb
social_stream-2.0.0.beta3 base/app/controllers/users_controller.rb
social_stream-base-2.0.0.beta3 app/controllers/users_controller.rb
social_stream-2.0.0.beta2 base/app/controllers/users_controller.rb
social_stream-base-2.0.0.beta2 app/controllers/users_controller.rb
social_stream-2.0.0.beta1 base/app/controllers/users_controller.rb
social_stream-base-2.0.0.beta1 app/controllers/users_controller.rb