Sha256: fac1f08f42957e6fa3c18b299e33cf64767b28fcd637e0084a0168afe15e9a9e

Contents?: true

Size: 859 Bytes

Versions: 13

Compression:

Stored size: 859 Bytes

Contents

class Site::ClientsController < ApplicationController
  before_filter :authenticate_user!

  before_filter :set_author_ids, only: [ :create, :update ]

  def index
    @developer_clients = current_subject.developer_site_clients
  end

  def show
    @client = Site::Client.find params[:id]
  end

  def new
    @client = Site::Client.new
  end

  def create
    @client = Site::Client.new params[:site_client]

    if @client.save
      respond_to do |format|
        format.html { redirect_to @client }
      end
    else
      respond_to do |format|
        format.html { render :new }
      end
    end
  end

  private

  def set_author_ids
    params[:site_client][:author_id]      = current_subject.actor_id
    params[:site_client][:user_author_id] = current_user.actor_id
    params[:site_client][:owner_id]       = current_subject.actor_id
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
social_stream-2.0.3 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-oauth2_server-2.0.2 app/controllers/site/clients_controller.rb
social_stream-2.0.2 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-oauth2_server-2.0.1 app/controllers/site/clients_controller.rb
social_stream-2.0.1 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-2.0.0 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-oauth2_server-2.0.0 app/controllers/site/clients_controller.rb
social_stream-2.0.0.beta3 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-oauth2_server-2.0.0.beta3 app/controllers/site/clients_controller.rb
social_stream-2.0.0.beta2 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-oauth2_server-2.0.0.beta2 app/controllers/site/clients_controller.rb
social_stream-2.0.0.beta1 oauth2_server/app/controllers/site/clients_controller.rb
social_stream-oauth2_server-2.0.0.beta1 app/controllers/site/clients_controller.rb