A
aidy
Hello,
Sorry to bother you again, but below is a method I have:
def enter_territory(country, depot, *rest)
@ie.select_list( :name, 'criteria.countryId').select(country)
@ie.select_list( :name, 'criteria.depotId').select(depot)
@ie.select_list( :name, 'criteria.lob').select(rest[0]) if rest[0] !=
nil
@ie.select_list( :name, 'criteria.territoryType').select(rest[1]) if
rest[1] != nil
@ie.select_list( :name, 'criteria.viewType').select(rest[2]) if
rest[2] != nil
end
The problem I am having is that sometimes I don't want to pass anything
to the first element of the argument array, but I would like to pass
something to the second element. How would I do this in Ruby?
Or should I be using setters?
Thanks
Aidy
Sorry to bother you again, but below is a method I have:
def enter_territory(country, depot, *rest)
@ie.select_list( :name, 'criteria.countryId').select(country)
@ie.select_list( :name, 'criteria.depotId').select(depot)
@ie.select_list( :name, 'criteria.lob').select(rest[0]) if rest[0] !=
nil
@ie.select_list( :name, 'criteria.territoryType').select(rest[1]) if
rest[1] != nil
@ie.select_list( :name, 'criteria.viewType').select(rest[2]) if
rest[2] != nil
end
The problem I am having is that sometimes I don't want to pass anything
to the first element of the argument array, but I would like to pass
something to the second element. How would I do this in Ruby?
Or should I be using setters?
Thanks
Aidy