Class: Admin::Atreides::FacebookController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/atreides/facebook_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



32
33
34
35
# File 'app/controllers/admin/atreides/facebook_controller.rb', line 32

def destroy
  Atreides::FacebookUser.clear
  redirect_to("/admin/facebook")
end

#indexObject



20
21
# File 'app/controllers/admin/atreides/facebook_controller.rb', line 20

def index
end

#updateObject



23
24
25
26
27
28
29
30
# File 'app/controllers/admin/atreides/facebook_controller.rb', line 23

def update
  Atreides::FacebookUser.find_or_create(params)
  if Atreides::FacebookUser.authorize_page(Settings.facebook.page_id)
    render :nothing => true, :status => :ok
  else
    render :nothing => true, :status => :error
  end
end