Sha256: 60c1e4bc099e44f391c5c70914417d82e22a232e630e1d07e298340c66f4d3fc

Contents?: true

Size: 752 Bytes

Versions: 60

Compression:

Stored size: 752 Bytes

Contents

class ApiController < ApplicationController
  
  before_filter :authenticate_user!, :only => [:create_key, :users]#, :activity_atom_feed]
  
  def create_key
    current_user.reset_authentication_token!
    if params[:api_settings].present?
      redirect_to settings_path(:api_settings => true)
      return
    end
    redirect_to :controller => :users, :action => :show, :id => current_user.to_param, :auth_token => params[:auth_token]
  end
  
  def users
    if !params[:id]
      params[:id]=current_user.to_param
    end
    
    if !params[:format]
      params[:format]='xml'
    end
        
    redirect_to :controller => :users, :action => :show, :format => params[:format], :id => params[:id], :auth_token => params[:auth_token]
  end
end

Version data entries

60 entries across 60 versions & 2 rubygems

Version Path
social_stream-2.2.2 base/app/controllers/api_controller.rb
social_stream-base-2.2.2 app/controllers/api_controller.rb
social_stream-2.2.1 base/app/controllers/api_controller.rb
social_stream-base-2.2.1 app/controllers/api_controller.rb
social_stream-2.2.0 base/app/controllers/api_controller.rb
social_stream-base-2.2.0 app/controllers/api_controller.rb
social_stream-2.1.1 base/app/controllers/api_controller.rb
social_stream-1.1.12 base/app/controllers/api_controller.rb
social_stream-base-1.1.11 app/controllers/api_controller.rb
social_stream-2.1.0 base/app/controllers/api_controller.rb
social_stream-base-2.1.0 app/controllers/api_controller.rb
social_stream-2.0.4 base/app/controllers/api_controller.rb
social_stream-base-2.0.4 app/controllers/api_controller.rb
social_stream-2.0.3 base/app/controllers/api_controller.rb
social_stream-base-2.0.3 app/controllers/api_controller.rb
social_stream-1.1.11 base/app/controllers/api_controller.rb
social_stream-base-1.1.10 app/controllers/api_controller.rb
social_stream-1.1.10 base/app/controllers/api_controller.rb
social_stream-base-1.1.9 app/controllers/api_controller.rb
social_stream-1.1.9 base/app/controllers/api_controller.rb