All pastes #818045 Raw Edit

Stuff

public text v1 · immutable
·published 2007-12-16 01:24 UTC
rendered paste body
  def generate 
    @site_uuid = params[:id]            
    
    begin
      @id_token = IdentityToken.generate(@site_uuid, current_user_id)
      action = "generate"
    rescue ActiveRecord::RecordNotFound
      action, status = "invalid_site_uuid", 404
    end

    respond_to do |format|
      format.html { render :action => action } 
      format.xml  { render :action => action }
    end
  end