Sha256: 1e81d001b681c205032b130a79a60d3588e3d46525e3c2db8cae1a2da109c271
Contents?: true
Size: 1012 Bytes
Versions: 1
Compression:
Stored size: 1012 Bytes
Contents
class ApiController < ApplicationController before_filter :authenticate_user!, :only => [:create_key, :users, :activity_atom_feed] def create_key current_user.reset_authentication_token! 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 def activity_atom_feed if !params[:page] params[:page] = 1 end @user = current_user if params[:id] != nil @user = User.find_by_slug!(params[:id]) end @page = params[:page] @activities = current_user.home_wall.paginate(:page => params[:page], :per_page => 10) respond_to do |format| format.atom end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
social_stream-0.4.0 | app/controllers/api_controller.rb |