app/models/attendee.rb
#returns false if the supplied id was removed from this attendees sessions list
#returns true if the supplied id was added to this attendees sessions list
#returns nil if an invalid session_id was supplied
returns false if the supplied id was removed from this attendees sessions list
returns true if the supplied id was added to this attendees sessions list
returns nil if an invalid session_id was supplied
returns false if the supplied id was removed from this attendees sessions list returns true if the supplied id was added to this attendees sessions list returns nil if an invalid session_id was supplied
def toggle_session(session_id)
    if conference_session_ids.include? session_id
      conference_sessions.delete ConferenceSession.find(session_id)
      return false
    end
    begin
      conference_sessions << ConferenceSession.find(session_id)
      true
    rescue ActiveRecord::RecordNotFound
    end
  end
def toggle_session ( session_id ) if conference_session_ids . include? session_id conference_sessions . delete ConferenceSession . find ( session_id ) return false end begin conference_sessions << ConferenceSession . find ( session_id ) true rescue ActiveRecord :: RecordNotFound end end
returns false if the supplied id was removed from this attendees sessions list
returns true if the supplied id was added to this attendees sessions list
returns nil if an invalid session_id was supplied
returns false if the supplied id was removed from this attendees sessions list returns true if the supplied id was added to this attendees sessions list returns nil if an invalid session_id was supplied
session_id