Class: Site::ClientsController

Inherits:
ApplicationController
  • Object
show all
Includes:
SocialStream::Controllers::Authorship, SocialStream::Controllers::Subjects
Defined in:
app/controllers/site/clients_controller.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



31
32
33
34
# File 'app/controllers/site/clients_controller.rb', line 31

def collection
  get_collection_ivar ||
    set_collection_ivar(build_collection)
end

#createObject



9
10
11
12
13
14
15
16
# File 'app/controllers/site/clients_controller.rb', line 9

def create
  create! do |success, error|
    success.html { 
      redirect_to polymorphic_path(resource, action: :edit, step: 2)
    }
    error.html { render :new }
  end
end

#destroyObject



27
28
29
# File 'app/controllers/site/clients_controller.rb', line 27

def destroy
  destroy! { :home }
end

#update_secretObject

Refresh the site client token



19
20
21
22
23
24
25
# File 'app/controllers/site/clients_controller.rb', line 19

def update_secret
  resource.refresh_secret!

  respond_to do |format|
    format.json { render json: { secret: resource.secret } }
  end
end