Class: Site::ClientsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Site::ClientsController
- Includes:
- SocialStream::Controllers::Authorship, SocialStream::Controllers::Subjects
- Defined in:
- app/controllers/site/clients_controller.rb
Instance Method Summary collapse
- #collection ⇒ Object
- #create ⇒ Object
- #destroy ⇒ Object
-
#update_secret ⇒ Object
Refresh the site client token.
Instance Method Details
#collection ⇒ Object
31 32 33 34 |
# File 'app/controllers/site/clients_controller.rb', line 31 def collection get_collection_ivar || set_collection_ivar(build_collection) end |
#create ⇒ Object
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 |
#destroy ⇒ Object
27 28 29 |
# File 'app/controllers/site/clients_controller.rb', line 27 def destroy destroy! { :home } end |
#update_secret ⇒ Object
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 |