Sha256: 50846a592447e892f13835a9204a1b807666f722f4c96f0703d4e052b1cad15c

Contents?: true

Size: 611 Bytes

Versions: 104

Compression:

Stored size: 611 Bytes

Contents

class CheesecakeController < ApplicationController

  before_filter :authenticate_user!
  def index
    @actors = current_subject.contact_actors(:direction => :sent)
  end

  def update
    changes = JSON.parse params[:contacts_save_changes] if params[:contacts_save_changes].is_a? String

    if (actors = changes["actors"]).present? and actors.is_a? Array
      actors.each do |actor|
        next if (contact = Contact.find_by_id(actor["extraInfo"].to_i)).nil?
        contact.relation_ids = actor["subsectors"]
      end
    end

    @actors = current_subject.contact_actors(:direction => :sent)
  end

end

Version data entries

104 entries across 104 versions & 2 rubygems

Version Path
social_stream-1.1.12 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.11 app/controllers/cheesecake_controller.rb
social_stream-1.1.11 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.10 app/controllers/cheesecake_controller.rb
social_stream-1.1.10 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.9 app/controllers/cheesecake_controller.rb
social_stream-1.1.9 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.8 app/controllers/cheesecake_controller.rb
social_stream-1.1.8 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.7 app/controllers/cheesecake_controller.rb
social_stream-1.1.7 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.6 app/controllers/cheesecake_controller.rb
social_stream-1.1.6 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.5 app/controllers/cheesecake_controller.rb
social_stream-1.1.5 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.4 app/controllers/cheesecake_controller.rb
social_stream-1.1.4 base/app/controllers/cheesecake_controller.rb
social_stream-1.1.3 base/app/controllers/cheesecake_controller.rb
social_stream-base-1.1.3 app/controllers/cheesecake_controller.rb
social_stream-1.1.2 base/app/controllers/cheesecake_controller.rb