app/controllers/classifications_controller.rb
# Sorry this is slightly obfuscated, but it's mostly just forcing everything into an array, putting that array in
# the session, and then (usefully) returning an array of objects to be manipulated or queried. It's okay to call
# this multiple times (though it could be *slightly* expensive)...
Sorry this is slightly obfuscated, but it's mostly just forcing everything into an array, putting that array in
the session, and then (usefully) returning an array of objects to be manipulated or queried. It's okay to call
this multiple times (though it could be *slightly* expensive)
Sorry this is slightly obfuscated but it ' s mostly just forcing everything into an array putting that array in the session and then ( usefully ) returning an array of objects to be manipulated or queried . It ' s okay to call this multiple times ( though it could be * slightly * expensive )
def add_entries_to_session
    debug '#add_entries_to_session'
    session[:split_hierarchy_entry_id] = [Array(session[:split_hierarchy_entry_id]) +
      Array(params[:split_hierarchy_entry_id])].flatten.compact.uniq
    Array(HierarchyEntry.find(session[:split_hierarchy_entry_id]))
  end
def add_entries_to_session debug '#add_entries_to_session' session [ :split_hierarchy_entry_id ] = [ Array ( session [ :split_hierarchy_entry_id ] ) + Array ( params [ :split_hierarchy_entry_id ] ) ] . flatten . compact . uniq Array ( HierarchyEntry . find ( session [ :split_hierarchy_entry_id ] ) ) end
Sorry this is slightly obfuscated, but it's mostly just forcing everything into an array, putting that array in
the session, and then (usefully) returning an array of objects to be manipulated or queried.
Sorry this is slightly obfuscated but it ' s mostly just forcing everything into an array putting that array in the session and then ( usefully ) returning an array of objects to be manipulated or queried .