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