場所のリスト項目を持つページ オブジェクトがあります。
select_list(:locations, :id => 'locations)
そして、場所のリストを用意して、そのうちの1つを選択したいと思います。何かのようなもの:
def select_item_different_than d_item
list_items = :locations.items #This is wrong, but you get the point
list_items.each do |item|
if item != d_item
item.select
return
end
end
end
どうもありがとう :)