Class: PaprsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/paprs_controller.rb

Instance Method Summary collapse

Instance Method Details

#authenticateObject

– proxies – twitter /twitter/authenticate



24
25
26
27
28
29
# File 'app/controllers/paprs_controller.rb', line 24

def authenticate
  response = Paprite::Proxy.authenticate(params[:domain], request.remote_ip)
  respond_to do |format|
    format.text { render :text => response }
  end
end

#callbackObject

/twitter/callback



40
41
42
# File 'app/controllers/paprs_controller.rb', line 40

def callback
  name = Paprite::Proxy.callback(params[:oauth_verifier], request.remote_ip)
end

#confirmObject

– papr



45
46
47
48
49
50
# File 'app/controllers/paprs_controller.rb', line 45

def confirm
  response = Paprite::Proxy.(params[:user])
  respond_to do |format|
    format.text { render :text => response }
  end
end

#ping_loopObject

/twitter/ping_loop



32
33
34
35
36
37
# File 'app/controllers/paprs_controller.rb', line 32

def ping_loop
  response = Paprite::Proxy.ping_loop(request.remote_ip)
  respond_to do |format|
    format.text { render :text => response }
  end
end

#redirObject



17
18
19
# File 'app/controllers/paprs_controller.rb', line 17

def redir
  @ext = params[:ext]
end

#submitObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/paprs_controller.rb', line 4

def submit
  c = Comment.new({ :content => params[:content], :article_id => params[:id].to_i})
  if c.save!
    respond_to do |format|
      format.text { render :text => 'true' }
    end
  else
    respond_to do |format|
      format.text { render :text => 'false' }
    end
  end
end