molten-trunk/molten5_withgrid/app/controllers/case_watchers_controller.rb
# Updates the current contact's account subscriptions
Updates the current contact's account subscriptions
Updates the current contact ' s account subscriptions
def update_contact_account_subscriptions
    accounts = params[:accounts]
    accounts_subscribing = params[:account_subscriptions].is_a?(Hash) ? params[:account_subscriptions].keys : []
    accounts_unsubscribing = accounts - accounts_subscribing
    accounts_unsubscribing.each do |a_id|
      Case_Watcher.remove_subscription!(current_contact.synced_record, 
                                        :account => Sfaccount.find(a_id).synced_record )
    end
    redirect_to :controller => 'contact', :action => 'settings', 
                :notice => "Account subscriptions updated."
  end
def update_contact_account_subscriptions accounts = params [ :accounts ] accounts_subscribing = params [ :account_subscriptions ] . is_a? ( Hash ) ? params [ :account_subscriptions ] . keys : [ ] accounts_unsubscribing = accounts - accounts_subscribing accounts_unsubscribing . each do | a_id | Case_Watcher . remove_subscription! ( current_contact . synced_record , :account => Sfaccount . find ( a_id ) . synced_record ) end redirect_to :controller => 'contact' , :action => 'settings' , :notice => "Account subscriptions updated." end
Updates the current contact's account subscriptions
Updates the current contact ' s account subscriptions