ese-unibe-ch / ese2012-team4

5 stars 1 forks source link

factor out some more useful methods #89

Closed misch closed 11 years ago

misch commented 11 years ago

"Some missing methods, e.g. Models::Holding.get_all.select {|s| s.item.id.to_s.eql?(params[:id].to_s) } should be encapsulated somewhere."

"You can implement your own equality relationship, or use a comparator instead of this code: self.list_items.detect{|i| i.name== item.name and i.price == item.price and i.description==item.description})"

misch commented 11 years ago

refactor the "redirect /... unless..."-thing in controllers...! E.g. method "authenticated?"