25. Array
admin= nil
for element in @array
if element.name == quot;adminquot;
admin = element
break
end
end
admin = @array.detect{|e| e.name == quot;adminquot; }
75. Acts as List
position
class Note < ActiveRecord::Base
has_many :lines, :order => quot;positionquot;
end
class Line < ActiveRecord::Base
rails 2.0
belongs_to :note
acts_as_list :scope => :note
end
position