How to revise array


#1

I have the following code:

@@available_columns = [
QueryColumn.new(:tracker, :sortable =>
“#{Tracker.table_name}.position”),
QueryColumn.new(:root_cause, :sortable =>
“#{RootCause.table_name}.position”),
QueryColumn.new(:project, :sortable => “#{Project.table_name}.name”),

]

After array initalization I want to revise several elements and delete
them from the array. How can I delete?


#2

After array initalization I want to revise several elements and delete
them from the array. How can I delete?

@@available_columns.delete(obj)


#3

On 12 Nov 2008, at 13:47, Thani A. wrote:

After array initalization I want to revise several elements and
delete
them from the array. How can I delete?

@@available_columns.delete(obj)

reject, delete_if and friends are often useful too.

Fred